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

fix 1336 with corrected start and stop annotations #1337

Merged

Conversation

willr3
Copy link
Collaborator

@willr3 willr3 commented Feb 19, 2024

Should generate a corrected openapi.yaml. We should also look at testing the generated openapi.yaml with all endpoints?

closes: #1336

@stalep
Copy link
Member

stalep commented Feb 19, 2024

We should have a look at how we format date/time in Horreum. In TestService.listLabelValues we use strings as the type, but we accept either iso-like or epoch. I think the intention was to default to that, but it has not been communicated well.

@willr3
Copy link
Collaborator Author

willr3 commented Feb 19, 2024

TestService.listLabelValues supports different time formats for the before and after query parameters to make it easier for users to request data from Horreum. The issue this addresses is how we describe the data that Horreum provides.

When Horreum encodes an Instant into json it is currently encoded as a Long but the annotations told openapi to create an openapi.yaml that claims the values will be an ISO style string. The PR changes the annotations to match the data type Horreum is already using.

We can discuss if Long or an ISO String is more appropriate for integration with other tools but for now this PR is a bug fix for incorrect annotations.

Copy link

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@stalep stalep merged commit 8d77ec8 into Hyperfoil:master Feb 19, 2024
3 checks passed
@johnaohara
Copy link
Member

This PR is missing the changes to openapi.yaml. Please can we ensure that if we change the openapi annotations, that the corresponding generated openapi.yaml is also checked in with the PR otherwise what we publish on the website is out of sync with the actual API

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.

openapi.yaml ProtectedTimeType has incorrect type and format
4 participants