You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the same generator on v7.13.0 or latest results in the following. The output misses the @NotNull and @Pattern validation annotations, which is unexpected because no such regression was documented in the release:
jothepro
changed the title
[BUG][Kotlin-Spring] Bean Validation missing since 7.13.0
[BUG][Kotlin-Spring] Query Parameter Bean Validation missing since 7.13.0
May 7, 2025
pstorch
added a commit
to pstorch/openapi-generator
that referenced
this issue
May 9, 2025
Uh oh!
There was an error while loading. Please reload this page.
Bug Report Checklist
Description
In 7.13.0 the bean validation in the kotlin-spring generator is missing. Apparently it was removed in this PR: https://github.com/OpenAPITools/openapi-generator/pull/20885/files#diff-31eb66768f4412e178af87d063b704a1e3a3ef250e1a69af791ec24298cea6c7
I could not find any explanation on why it was removed in the PR or the Release notes for 7.13.0.
openapi-generator version
This is a regression since 7.13.0
OpenAPI declaration file content or url
Example spec that defines a regex pattern for a query parameter:
Generation Details
This was executed in order to generate the code:
According to this documentation
useBeanValidation
is enabled by default. No special configurations where given to the generator.Steps to reproduce
/example
endpoint in the openapi-spec provided above:@NotNull
and@Pattern
validation annotations, which is unexpected because no such regression was documented in the release:The bean validation is now missing. This is also reflected in these adjustments to the testing in the Misk Kotlin Generator PR.
Related issues/PRs
Suggest a fix
I suggest to undo the changes from https://github.com/OpenAPITools/openapi-generator/pull/20885/files#diff-31eb66768f4412e178af87d063b704a1e3a3ef250e1a69af791ec24298cea6c7 that introduced the regression.
The text was updated successfully, but these errors were encountered: