Skip to content

feat: x-ogen-validate extension#1533

Merged
ernado merged 1 commit intoogen-go:mainfrom
ngalaiko:push-sukkltxupxlk
Sep 20, 2025
Merged

feat: x-ogen-validate extension#1533
ernado merged 1 commit intoogen-go:mainfrom
ngalaiko:push-sukkltxupxlk

Conversation

@ngalaiko
Copy link
Contributor

One of the features that I really miss is an ability to add custom validation on the schema-level. I would like to use CEL validation language to describe more complex rules for my schema.

Enforcing CEL into ogen is probably too much, so I suggest to add a new x-ogen-validate extension to allow registering custom validators.

Why not use x-oapi-codegen-extra-tags?

I understand from examples that extra tags is one way of doing it.

However, this doesn't allow to register validation on a request struct level, which I think is very useful for writing powerful validations.

@ernado ernado merged commit c80140c into ogen-go:main Sep 20, 2025
15 checks passed
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