I expected that when using the plugin, classes with Jakarta annotations would be generated. For example, a parameter that cannot be null would have the @NotNull annotation in the generated class and this would be validated.
However, I'm encountering the class being generated with comments about the attribute that serve no purpose.
For example, I have a "name" attribute that is required and in the generated class it is presented like this:
/**
*
* (Required)
*
*/
@JsonProperty("name")
private String name;
Is it possible to generate with these Jakarta Validation annotations? If so, how to configure the maven plugin to achieve this result.
Below is my current configuration:
<plugin>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-codegen-maven-plugin</artifactId>
<version>${apicurio-codegen-maven.version}</version>
<executions>
<execution>
<id>generate-tpfee-resources</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectSettings>
<javaPackage>org.acme.application.rest.resources
</javaPackage>
</projectSettings>
<inputSpec>src/main/resources/api.json</inputSpec>
<outputDir>./src/main/java/</outputDir>
</configuration>
</execution>
</executions>
</plugin>
I expected that when using the plugin, classes with Jakarta annotations would be generated. For example, a parameter that cannot be null would have the @NotNull annotation in the generated class and this would be validated.
However, I'm encountering the class being generated with comments about the attribute that serve no purpose.
For example, I have a "name" attribute that is required and in the generated class it is presented like this:
Is it possible to generate with these Jakarta Validation annotations? If so, how to configure the maven plugin to achieve this result.
Below is my current configuration: