Skip to content

feat: add Schema.Const#1004

Merged
wolveix merged 1 commit into
danielgtaylor:mainfrom
seanwu1105:main
May 28, 2026
Merged

feat: add Schema.Const#1004
wolveix merged 1 commit into
danielgtaylor:mainfrom
seanwu1105:main

Conversation

@seanwu1105

Copy link
Copy Markdown
Contributor

Add support for const in Schema.

@wolveix

wolveix commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Hey @seanwu1105! Thanks for opening this PR :) I'm intrigued, I'm not sure I've ever seen a need for this before. Could you give a little more context on what your use-case looks like? From @leonklingele's reaction, it seems you're not the only one that would benefit from it :D

@seanwu1105

Copy link
Copy Markdown
Contributor Author

Hey @wolveix, the main use case for me is the enum with name and value: https://stackoverflow.com/questions/66465888/how-to-define-enum-mapping-in-openapi

@wolveix
wolveix merged commit 2a14580 into danielgtaylor:main May 28, 2026
@wolveix

wolveix commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Cool! Thanks so much!

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