-
Notifications
You must be signed in to change notification settings - Fork 263
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
Updated Swagger #506
Updated Swagger #506
Conversation
@btyy77c, Thanks for this! I'll test this in just a moment and see if this works on my machine. |
This comment has been minimized.
This comment has been minimized.
This looks pretty good! The CSS does need a bit of updating, sure, but it's functional.
I'm not sure if we should allow the All-around, my impression is that it's better to have this as a nodejs dependency than pasted into the repo as html/css/js files. So I'd personally be happy to merge once we're finished reviewing and perhaps polishing the appearance and/or tweaking the configs a bit. |
I have a pull request that makes it easier to test this sort of thing: #508 |
Overall this looks really great to me. My only concern is adding a POST, although this is something we obviously want to do. I don't want to end up polluting the db with a lot of random requests. |
Can you help me understand where you are seeing the new |
My apologies for the mixup, I can see now that POST is not functionally new in this pull request.
When you submit an API request through the docs page, the new interface exposes what methods are allowed: (The old interface didn't show that info.)
Yep. That's what happened. (Whoops.) Conclusion: If we want to discuss or address the fact we appear to (already, regardless of this pull request) allow POST through the API, I think we can move that discussion out of this pull request. I'd also like to do some work on the CSS, and maybe even consider the older version of the package; This isn't powering the underlying API backend, just the documentation interface (front end). If the older package was more user-friendly, we may as well go with that, barring any security patches that may have been added. Will look into this when I get time. (I'm sort of taking the day off, but wanted to respond to this.) Thanks for pointing that out. Best, -DeeDeeG |
This comment has been minimized.
This comment has been minimized.
There is actually a stylesheet included in the node package See: https://github.com/swagger-api/swagger-ui/blob/master/dist/swagger-ui.css I'm really unfamiliar with JavaScript programming, and with the Rails asset pipeline, (and with Webpacker...) so it's unclear to me how to use this. I actually prefer what this Pull Request has so far over that stylesheet, though. So maybe we can update the stylesheet slightly so it looks more like what we have in production. (Or if someone understands better how this all works, we might be able to use the |
2.x branch of |
2e9c676
to
839d701
Compare
I think we can/should merge this as-is and do any fixups we need later. It would be nice to have up-to-date Grape and Swagger-UI. (CSS tweaks or tweaks to the API code could come later if we want. But neither of those is strictly needed, they're just nice-to-haves.) |
a3777b5
to
f3e53c7
Compare
Would like to finally merge this soon. I have a work-in-progress branch that fixes up the CSS foor the API docs page, done so as to mostly match the visual style of the 2.x branch of swagger-ui. But it would be great to have this merged. Particularly since it upgrades grape. Would want to co-ordinate with mobile app folks on this. Want to make sure this will not change the I already know this would have the exact same formatting as it does now: https://refugerestrooms.org/api/v1/restrooms.json But this file would change a bunch: https://refugerestrooms.org/api/swagger_doc.json (becomes much longer and more detailed, none of the fields seem to stay the same.) URLs are stable from before this update to after, so there shouldn't be a need to update request URLs or anything. |
Merging so we can test the mobile apps against the (Once I update this branch (rebase it on top of develop), and assuming that passes CI) |
… route, controller and view
… Rails view folders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, and sorry it took so long!
This updates our grape
gem (API backend framework) and swagger-ui
(API documentation and demonstration UI).
Looks good to me.
Context
Summary of Changes
WARNING: Since I updated swagger, the classes changed and the css is no longer valid. I added some basic CSS but the swagger layout is completely different now.
Checklist
Screenshots
Before
After