express-mongoose-es6-rest-api
express-mongoose-es6-rest-api copied to clipboard
Adding Automated Documentation via Optic
Hi @kunalkapadia!
I really appreciated this boilerplate you built - JWT is often implemented really confusingly but your implementation made it super straightforward and nice.
I've been contributing to the Optic Project and helped write integration guides on how you can use it on various API frameworks in the past, and wanted to go a step further by PR-ing my work into awesome boilerplates. When I started using this boilerplate, I added Optic early on, and thought it'd be really useful to contribute back and add auto docs to the project.
Did I implement this correctly? Would love to add this feature!
Key Changes
- added 4 new scripts to
package.jsonnpm run api-installinstalls the Optic Clientnpm run api-diffruns your API with the Optic proxy, and monitors changes to the api (this lets you document changes you might have made, updating the documentation without having to manually write OpenAPI specifications)npm run api-docsopens up the current documentation for the apinpm run generate-openapigenerates a OpenAPI spec for the user to use
- Modified
config/config.jsto look for theOPTIC_API_PORT(this enables optic to run) - this won't stop you from running the api like normal vianpm start)
Pull Request Test Coverage Report for Build 1103
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.05%) to 93.333%
| Totals | |
|---|---|
| Change from base Build 1102: | 0.05% |
| Covered Lines: | 229 |
| Relevant Lines: | 239 |
💛 - Coveralls
Update: Resolved via #465