-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(swagger): use swagger-ui-express to display simple and administration api doc #85
Conversation
- add api documentation in docker image - convert yaml to josn with YAML node module - serve swagger-ui with swagger-ui-express
I personally think that's a great way to display the API documentation. |
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.
Hi,
Thank you for this idea. I think it is a good way to complete the getcapabilities.
May I suggest you a few more steps for this feature ?
- convert the YAMLs to JSONs, so it will avoid one dependency.
- read the new JSONs during the init step of the each API (we can talk about this if you want ;) )
- serve those new pages on /{api}/1.0.0/openapi.
- create the page for the admin API too, so the project will be completely available for humans.
- update the changelog
You mean replacing
If the API is described with JSON file we can just use this file directly for swagger-ui-express: var swaggerDocument = require('./api.json');
router.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); |
@jmkerloch Yes, I think we could replace it. I've seen it could be a JSON => https://spec.openapis.org/oas/latest.html#format For the init step, you have a init file where you can do what you need to prepare your data. |
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.
that's ok for me :)
Simple and administration openapi are available.
related #84