-
Notifications
You must be signed in to change notification settings - Fork 5
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
Chore – Add OpenAPI documentation #215
base: develop
Are you sure you want to change the base?
Conversation
…n of OpenAPI docs and Swagger UI with springdoc-openapi
This tries to make the paths, volumes, etc. as portable as possible
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.
LGTM! simple and nice with fewer dependencies.
In my view, each API documentation tools have pros and cons. So, we need to pick the right tool based on our targeted end-user.
@openapi:
Pros:
- We have Swagger UI to interact with REST API. End-user can play around with our API.
- Non-tech users also can reach API easily.
Cons:
- Need to change actual code base implementation for the documentation. In our case, our endpoint is 3 lines, but documentation annotations are around 15-20 lines. Documentation code is more than actual.
@RestDocs:
Pros:
- Generate Documentation through tests. So, we will not touch the codebase to generate API documentation.
- Whenever we change the code base, we will fix the broken test cases. So, documentation is always in synch with Rest API.
- Other Developers can go through the documentation and use API.
Cons:
- No UI to interact with APIs like Open API. So, this documentation may not be that user-friendly for non-tech users.
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.
All looks good to me.
I converted this PR to a draft in order to move this to RestDocs combined with https://github.com/ePages-de/restdocs-api-spec. |
fbbb055
to
31e769e
Compare
…n of OpenAPI docs and Swagger UI with springdoc-openapi
…gene-expression-group/atlas-web-single-cell into chore/openapi-documentation
The best thing would be to read
openapi/README.md
and give it a go to see that you can generate the docs and start the Swager UI server. I have changed several variables in Docker Compose to make things more flexible and less tied in to a specific directory layout in our host machines.@upendrakumbham I’m very interested in your thoughts regarding this solution as compared to RestDocs, which you used in your API project.
@haideriqbal @lingyun1010 Please have a look at this since I’d like to document the whole application with this approach.
Accompanied by ebi-gene-expression-group/atlas-web-core#76.