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

Style swagger documentation #766

Merged
merged 5 commits into from
May 23, 2017
Merged

Style swagger documentation #766

merged 5 commits into from
May 23, 2017

Conversation

jeremiak
Copy link
Contributor

@jeremiak jeremiak commented May 18, 2017

@brendansudol I think this is ready for your review.

I didn't want to check in the Swagger files since that always seems to be more hassle than its worth if we ever wanted to upgrade. I made added swagger as an npm script and included it in postinstall so that it will run after the packages are all installed but not on every build. If you pull this down and run npm install to install swagger, the "build" task for swagger should run as well.

Right now the swagger route is /docs. Since there are a bunch of different things that could be documentation on this project, I think it would be nice if the route was /api. However, we currently use that route for our API proxy. I imagine a few potential solutions, which I listed in order of my preference:

  1. Moving the proxy route to something like /proxy or /api-proxy and using /api for the swagger
  2. Keeping /api as the proxy route, changing the route for "Downloads and Docs" to /downloads (since that page is mostly downloads anyway) and using /docs for the swagger page.
  3. Using some other route like /api-docs for the Swagger page and keeping everything else as is.

What do you think about the route naming?

Also, the Swagger CSS selectors were really specific so I needed to use !important quite a bit. I tried to leverage our current class names where I could.

Right now this documentation is built with a local Swagger file. Once we address https://github.com/18F/crime-data-api/issues/510 we should be able to pull it directly from the production API application so that it stays in sync.

Closes https://github.com/18F/crime-data-api/issues/496

Switch over to using jQuery since its in the project anyway and
increases readability
}


.flex-justify {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brendansudol I know that this is referenced in the BassCSS docs but the selector is never found so I added it here

Key is limited to 500 requests per day per IP address
@jeremiak
Copy link
Contributor Author

Going to switch to the API proxy using /api-proxy and the API docs will be available at /api

@brendansudol
Copy link
Contributor

looks great

@brendansudol brendansudol merged commit e21faa7 into master May 23, 2017
@brendansudol brendansudol deleted the jk-swagger branch May 23, 2017 17:24
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.

2 participants