Skip to content
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

Added ability to change the description and parameters of the API endpoints generated by grape-swagger. #124

Merged
merged 1 commit into from Jul 28, 2014

Conversation

dblock
Copy link
Member

@dblock dblock commented Jul 22, 2014

You can now specify additional options for the API endpoints generated by grape-swagger, including the description. In our API we also inject additional options that are processed by middleware (for authentication).

add_swagger_documentation \
   api_documentation: { desc: 'First', params: { x: 1 }, xx: 11 },
   specific_api_documentation: { desc: 'Second', params: { y: 42 }, yy: 4242 }

I am not in love with the names of these options (open to suggestions).

@CraigCottingham, mind taking a look?

@krisalyssa
Copy link
Contributor

@dblock The names "api_documentation" and "specific_api_documentation" look okay to me, but to be honest I'm not entirely clear on what in Swagger these are overriding. Is it :description in sections 5.1.3 and 5.2.2 of https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md respectively?

@dblock
Copy link
Member Author

dblock commented Jul 28, 2014

It's the summary of the operation, but we always called it description in the Grape context. I'll merge this, and maybe lets clarify the docs a bit about what is overriding what? Feel free to make PRs and I'll take a look at that too.

dblock added a commit that referenced this pull request Jul 28, 2014
Added ability to change the description and parameters of the API endpoints generated by grape-swagger.
@dblock dblock merged commit e81d305 into ruby-grape:master Jul 28, 2014
@dblock dblock deleted the api-desc-and-params branch August 6, 2014 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants