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

DEVPROD-9733 Add OpenAPI version to generated spec #8625

Merged
merged 6 commits into from
Jan 23, 2025

Conversation

ZackarySantana
Copy link
Contributor

DEVPROD-9733

Description

S&I wanted some consistent versioning for our openapi generated spec (we use swaggo/swagger). This adds a second file that keeps track of the sha256 of the swagger.json and the current version number. If the sha256 changes, the version number gets incremented by one. This means we don't use semantic versioning for our swagger.json which goes against openapi specifications- but I don't think that's worrisome since the depending service seemingly only uses the version number for reliable historic builds.

Testing

I ran this which started the versioning at 2. I ran a duplicate task here and it generated a swagger.json with version=2 again. Then I ran a third task that changes the swagger docs to a new title, and it generated a swagger.json with version=3.

I also ran the script locally with simulated envs to confirm the behavior.

@ZackarySantana ZackarySantana requested a review from a team January 14, 2025 16:15
@ZackarySantana ZackarySantana self-assigned this Jan 14, 2025
self-tests.yml Outdated Show resolved Hide resolved
service/service.go Outdated Show resolved Hide resolved
self-tests.yml Outdated Show resolved Hide resolved
@ZackarySantana ZackarySantana merged commit b67a377 into evergreen-ci:main Jan 23, 2025
8 of 10 checks passed
@ZackarySantana ZackarySantana deleted the DEVPROD-9733 branch January 23, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants