-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for primitive data types in responses #902
Comments
Hi @pablomg92z … in general I agree with a PR, but have one question. |
Hi @LeFnord , thanks for your quick reply! and good catch, I should have not included the I will proceed to create the PR then where I add support for the PS: What I can include in a future PR as well is the addition of the |
Is there any progress on introducing these primitive types into a successful response? Or if there's a way to make this happen now I would love to know.... 🙏 |
@LeFnord @Sashasugar Hi, I also need this feature. Any update? |
@mopp I opened a PR to address that |
Hi,
As far as I can see, grape-swagger supports object and file schema types grape-swagger#response-documentation but it does not support primitive data types (unless wrapped in a grape entity) as swagger 2.0 specification does Swagger 2.0#responsesDefinitionsObject.
This causes that the next response specification which is valid for swagger 2.0 cannot be generated using grape swagger:
So ideally I would like grape-swagger to support the schema
type
key to the responses, allowing us to specify responses using primitive data types like swagger 2.0 specifies.As an example, adding the schema
type
key would allow us to describe primitive data type in responses:which should generate the next specification:
Also the
type
schema should allow us to describe primitive data types directly into object schema types without the need to wrap them in a grape entity, as an example:which should generate the next specification:
Would it be possible to add support for primitive data types as described in this issue? I can work on a PR if you agree. Thanks!
The text was updated successfully, but these errors were encountered: