-
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
Swagger documentation #42
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apriltuesday
approved these changes
Aug 25, 2023
Comment on lines
50
to
54
description = "The desired output's level", | ||
example = "1 or 2", |
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.
I would do it this way, as I think the UI uses the example values to auto-fill sample requests.
Suggested change
description = "The desired output's level", | |
example = "1 or 2", | |
description = "The desired output's level (1 or 2)", | |
example = "1", |
"objects, a service for the retrieval of seqCol objects given their " + | ||
"level 0 digests and a service for the comparison of two seqCol objects.") | ||
.version("v1.0") | ||
.license(new License().name("Apache-2.0").url("https://raw.githubusercontent.com/EBIvariation/contig-alias/master/LICENSE")) |
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.
Suggested change
.license(new License().name("Apache-2.0").url("https://raw.githubusercontent.com/EBIvariation/contig-alias/master/LICENSE")) | |
.license(new License().name("Apache-2.0").url("https://raw.githubusercontent.com/EBIvariation/eva-seqcol/main/LICENSE")) |
sundarvenkata-EBI
approved these changes
Aug 25, 2023
waterflow80
force-pushed
the
swagger-docs
branch
from
August 26, 2023 15:52
8f2053b
to
2473da1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #38
Documented the API with swagger v3: Implementation:
springdoc-openapi-ui
, and added request redirects for the swagger page. So each of the following endpoints will redirect to the swagger home page:http://localhost:8081/eva/webservices/seqcol/
http://localhost:8081/eva/webservices/seqcol/collection
http://localhost:8081/eva/webservices/seqcol/comparison
http://localhost:8081/eva/webservices/seqcol/seqcol-documentation
http://localhost:8081/eva/webservices/seqcol/swagger-ui/index.html
The reason why we chose swagger v3 over v2, is that version 2 had a lot of conflicts and problems with spring boot 2.7.x (our version) and it seemed like it is not supported. Here are some discussions about the issues I've been struggling with:
Some enhancements have been done in swagger v3 (OpenAPI 3) so I don't think there's gonna be an issue in using it to document our API.
A screenshot of the swagger page: