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

Chore – Add OpenAPI documentation #215

Draft
wants to merge 24 commits into
base: develop
Choose a base branch
from

Conversation

alfonsomunozpomer
Copy link
Member

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.

upendrakumbham
upendrakumbham previously approved these changes Nov 18, 2021
Copy link
Contributor

@upendrakumbham upendrakumbham left a 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.

upendrakumbham
upendrakumbham previously approved these changes Nov 22, 2021
Copy link
Contributor

@upendrakumbham upendrakumbham left a 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.

@alfonsomunozpomer alfonsomunozpomer marked this pull request as draft December 2, 2021 11:28
@alfonsomunozpomer
Copy link
Member Author

alfonsomunozpomer commented Dec 2, 2021

I converted this PR to a draft in order to move this to RestDocs combined with https://github.com/ePages-de/restdocs-api-spec.

@ke4 ke4 added the enhancement New feature or request label Sep 28, 2023
@ke4 ke4 self-assigned this Sep 28, 2023
@ke4 ke4 added the feature label Sep 28, 2023
@ke4 ke4 removed the request for review from haideriqbal April 25, 2024 14:09
@ke4 ke4 added technical debt Technical debt documentation Add/improve our documentation and removed feature enhancement New feature or request labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Add/improve our documentation technical debt Technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants