-
-
Notifications
You must be signed in to change notification settings - Fork 535
Closed
Labels
wontfixThis will not be worked onThis will not be worked on
Description
In spring it is possible to create multiple endpoints on the same path, that only differ by parameters.
@RestController
public class SearchController {
@GetMapping(path = "/items", params = "name")
public Object searchItemsByName(String name) {
}
@GetMapping(path = "/items", params = "description")
public Object searchItemsByDescription(String description) {
}
}
It would be nice if springdoc could render those endpoints as 2 distinct endpoints, so that both are shown individually.
If we'd make the query parameters a bean here, maybe you could detect the overloaded endpoints, and generate parameters.schema.oneOf
? But I'm not sure if that would help.
{
"path": {
"/items:" {
"get": {
"parameters": [
{
"name": "req",
"in": "query",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/FirstFilter"
},
{
"$ref": "#/components/schemas/SecondFilter"
}
]
}
}
]
}
}
}
Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on