Update restrooms API for newer grape and grape-swagger (enables support for the OpenAPI 2.0 spec)
DeeDeeG opened this issue · 3 comments
Context
The latest grape
and grape-swagger
gems would update our API to the OpenAPI spec version 2.0. We should double-check to make sure our API works as expected with the OpenAPI 2.0 specification and format.
Impact
Allows us to confidently use up-to-date grape
and grape-swagger
gems.
How to actually do this
Change this file I think: https://github.com/RefugeRestrooms/refugerestrooms/blob/ee25f6af625d06269c77377a3ea594308a644de4/app/controllers/api/v1/restrooms.rb
For upgrading to match the new grape
gem, see:
https://github.com/ruby-grape/grape/blob/master/UPGRADING.md
For upgrading to match the new grape-swagger
gem, see:
https://github.com/ruby-grape/grape-swagger/blob/master/UPGRADING.md
Whoops, it seems like this is actually not a problem.
#506 works just fine, and that pairs our current API code with the new and updated grape
and grape-swagger
Gems. If we can confirm this isn't a problem, it's fine to close this issue.
I updated this issue to more accurately reflect the situation. We can optionally go in and make sure this works 100% perfectly with the new gems. But it already works fine apparently in #506.
I think addressing this issue can only really affect the docs page. The results given by the API (actual json
-formatted restroom entries) in PR #506 look the same as before, at least to my eyes.
Our API code doesn't appear to need any changes after all. I suppose we weren't using any off-the-beaten-path features of the grape
and grape-swagger
gems.
Closing this issue.