-
Notifications
You must be signed in to change notification settings - Fork 477
Open
Description
Ruby on Rails supports optional path segments, such as:
get 'photos(/:id)'
would match both photos/:id
and photos
paths.
However, grape-swagger
does not recognise these optional path segments. For example:
get 'photos(/:id)'
would generate:
"paths": {
"/api/v2/photos(/{id})": {
"get": {
...
"parameters": [
{
"in": "path", "name": "id"
...
}
}
instead of the expected:
"paths": {
"/api/v2/photos": {
"get": {
...
}
...
"/api/v2/photos/{id}": {
"get": {
...
"parameters": [
{
"in": "path", "name": "id"
...
}
}
grape-swagger
should also handle Rails optional path segments in a predictable manner.
Metadata
Metadata
Assignees
Labels
No labels