Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@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 inpostinstall
so that it will run after the packages are all installed but not on every build. If you pull this down and runnpm 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:/proxy
or/api-proxy
and using/api
for the swagger/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./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