- generate api interfaces (see declarative client)
- generate model objects with fluent and property accessors
- generate interfaces for api tests based on method name and return code
- generate client interfaces with micronaut clientId
- add validation annotations
- clientId: id for generated clients (if no client id is provided no interface will be generated)
- introspected: add
@io.micronaut.core.annotation.Introspected
to models (defaulttrue
) - dateTimeRelaxed: add type registrar for relaxed time converter (default
true
) - useBeanValidation: generate validation annotations (default
true
) - useGenericResponse: return generic container or specific model, e.g.
Model
vs.HttpResponse<Model>
(defaulttrue
) - useOptional: optional parameters are generated as
java.util.Optional
(defaulttrue
) - useJavaxGenerated: add
@javax.annotation.processing.Generated
to all classes (defaulttrue
) - useLombokGenerated: add
@lombok.Generated
to all classes (defaultfalse
), useful for jacoco - jacksonDatabindNullable: add container
JsonNullable
to model objects that are nullable (defaulttrue
) - supportAsync: use reactivex return types, see Reactive HTTP Request Processing
- useReferencedSchemaAsDefault: use the referenced schema's type for instantiation of default values
- visitable: generate visitor for subtypes with a discriminator (default
true
) - pagable: generate provider for pagable (default
false
)
Jackson Inclusions:
required=true
&nullable=false
:JsonInclude.ALWAYS
required=true
&nullable=true
:JsonInclude.ALWAYS
required=false
&nullable=false
:JsonInclude.NON_ABSENT
required=false
&nullable=true
:JsonInclude.NON_NULL
Container (array/map):
required=true
&nullable=false
: empty containers are set as default valuerequired=true
&nullable=true
: containers have no default valuerequired=false
&nullable=false
: containers have no default valuerequired=false
&nullable=true
: containers have no default value
If jacksonDatabindNullable=true
is configured always JsonNullable.undefined()
is set.
Do not forget to add the dependency to pom.xml
:
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>0.2.1</version>
</dependency>
And register Jackson Module:
@Factory
public class ApplicationFactory {
@Singleton
JsonNullableModule jsonNullableModule() {
return new JsonNullableModule();
}
}
- no project (e.g.
pom.xml
) is generated, only interfaces to implement - no support for java <11
Run single test:
mvn verify -Dinvoker.parallelThreads=1 -Dinvoker.streamLogs=true -Dinvoker.test=basic
Display dependency updates:
mvn versions:display-property-updates -U
Update dependencies:
mvn versions:update-properties
Run:
mvn release:prepare release:perform release:clean -B