Javalin fixes and validation#20981
Merged
wing328 merged 4 commits intoOpenAPITools:masterfrom Mar 29, 2025
Merged
Conversation
When a default value is present the parameter is moved to non-nullable. This works because we could replace the null with a default value. This will actually set the default value.
Option to set: `useBeanValidation` to `true`. This will insert validation rules from the `jakarta.validation` package much like it does with the spring generator. Aso sneaked in `JsonProperty` annotations in order to more formally adhere to the name in the spec as opposed to configuring ObjectMappers in order to translate names to match the spec.
Member
|
thank for the PR, which has been merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several smaller fixes and additions to the javalin5 and javalin6 generators
Bugfix for having a nullable property with a default value. It is assumed the interface can have a non-nullable field as an implementation for this. However, it is required to then set the default value.
Adding validations to the beans (largely copied from the jaxrs implementation)
Adding explicit basenames in the ObjectMapper Property annotations so that we do not have to rely on ObjectMappers' property name translations
@dr4ke616, @karismann, @Zomzog, @andrewemery, @4brunu, @yutaka0m, @stefankoppier, @e5l