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

feat(version): generate OpenAPI doc version on fly #2829

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GMishx
Copy link
Member

@GMishx GMishx commented Dec 17, 2024

Please provide a summary of your changes here.

Use git-commit-id-maven-plugin plugin to read git properties and generate version for OpenAPI doc on the fly.

The version uses major and minor version from git and number of commits between HEAD and last tag as the patch version.

This helps in providing a reliable way of identifying updates in REST API until we have stable REST API to use custom API version.

Suggest Reviewer

@heliocastro @hoangnt2 @smrutis1

How To Test?

Open the OpenAPI docs and check the API version.

Use git-commit-id-maven-plugin plugin to read git properties and
generate version for OpenAPI doc on the fly.

The version uses major and minor version from git and number of commits
between HEAD and last tag as the patch version.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
@GMishx GMishx added needs code review needs special test Opposed to general testing, this requires dedicated check at some party's deployment labels Dec 17, 2024
@heliocastro
Copy link
Contributor

@GMishx Something special to test ? I want to add the new API page address as the one for footer in the frontend. What you think i should add ?

@GMishx
Copy link
Member Author

GMishx commented Dec 23, 2024

@GMishx Something special to test ?

@heliocastro just need to test if the version is updated even if the repository does not contain the tag information (how the github checkout action works).

I want to add the new API page address as the one for footer in the frontend. What you think i should add ?

It can be the link to the Swagger UI. The user/developer can fetch the OpenAPI docs from the same page.

However, this link can be changed in backend with springdoc.swagger-ui.path property in application.yml.

The default is http://localhost:8080/resource/swagger-ui/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs code review needs special test Opposed to general testing, this requires dedicated check at some party's deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants