Package dk.mada.jaxrs.generator.mpclient
Class ValidationGenerator
java.lang.Object
dk.mada.jaxrs.generator.mpclient.ValidationGenerator
Validation generator.
Prepared bean validation contexts for template rendering.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a validation context for required values.makeValidation
(Imports imports, Type type, @Nullable Validation validation) Generate validation rendering context from type and validation information.
-
Constructor Details
-
ValidationGenerator
Constructs new instance.- Parameters:
opts
- the generator options
-
-
Method Details
-
makeValidation
public Optional<CtxValidation> makeValidation(Imports imports, Type type, @Nullable Validation validation) Generate validation rendering context from type and validation information.- Parameters:
imports
- the api/dto importstype
- the type to make validation forvalidation
- the reference validation information- Returns:
- an optional validation rendering context
-
makeRequired
Returns a validation context for required values.- Returns:
- a validation context for required values
-