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

AllowedValues on all (primitive) types #52

Merged

Conversation

ralfhandl
Copy link
Contributor

No description provided.

@ralfhandl
Copy link
Contributor Author

@chgeo Please review

@hjboth
Copy link

hjboth commented Oct 30, 2024

@ralfhandl would you please add some reviewers?

@ralfhandl
Copy link
Contributor Author

I can't, insufficient privileges for this repo.

@hjboth hjboth requested a review from chgeo October 30, 2024 10:44
@hjboth
Copy link

hjboth commented Oct 30, 2024

@ralfhandl any candidates you'd like to add?

@ralfhandl
Copy link
Contributor Author

You 😎

@ralfhandl
Copy link
Contributor Author

The relevant portions are

"typeExamples.single/int32": {
"@Validation.AllowedValues": [{ Value: 1 }, { Value: 2 }],
},

and

int32: { format: "int32", type: "integer", enum: [1, 2] },

proving that integer enums are correctly reflected in OpenAPI

@hjboth hjboth self-requested a review October 30, 2024 10:50
@chgeo
Copy link
Member

chgeo commented Oct 30, 2024

Please review

No, I am no maintainer here. @RoshniNaveenaS maybe?

@chgeo chgeo removed their request for review October 30, 2024 12:09
@hjboth hjboth merged commit 0f14390 into cap-js:main Oct 30, 2024
4 checks passed
@ralfhandl ralfhandl deleted the fix/AllowedValues-for-non-string-types branch November 8, 2024 08:53
@RoshniNaveenaS
Copy link
Collaborator

Hello @ralfhandl
I have tested this PR, looks good to me. I will add a changelog entry and this is good to go.

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.

5 participants