Package io.micronaut.openapi.generator
Interface KotlinMicronautServerOptionsBuilder
- All Superinterfaces:
GeneratorOptionsBuilder
Configures options which are specific to the server code.
-
Method Summary
Modifier and TypeMethodDescriptionwithAot
(boolean aot) If set to true, generated compatible code with micronaut-aot.withAuthentication
(boolean useAuth) If set to true, generated code will add support for authentication.withControllerPackage
(String controllerPackage) Sets the package name of generated controller classes.withFluxForArrays
(boolean fluxForArrays) If set to true, generated code will be with Flux<?> instead Mono<List<?>>.withGenerateControllerFromExamples
(boolean generateControllerFromExamples) If set to true, controllers will be generated using examples.withGeneratedAnnotation
(boolean generatedAnnotation) If set to true, generated code will be with jakarta.annotation.Generated annotation.withGenerateImplementationFiles
(boolean generateImplementationFiles) Whether to generate controller implementations that need to be filled in.withGenerateOperationsToReturnNotImplemented
(boolean generateOperationsToReturnNotImplemented) If set to true, controller operations will return not implemented status.withKsp
(boolean ksp) If set to true, generated code will be fully compatible with KSP, but not 100% with KAPT.withPlural
(boolean plural) If set to true, the generated code will pluralize parameters and properties for arrays.
-
Method Details
-
withControllerPackage
Sets the package name of generated controller classes.- Parameters:
controllerPackage
- the package name- Returns:
- this builder
-
withGenerateImplementationFiles
KotlinMicronautServerOptionsBuilder withGenerateImplementationFiles(boolean generateImplementationFiles) Whether to generate controller implementations that need to be filled in.- Parameters:
generateImplementationFiles
- the implementation files flag- Returns:
- this builder
-
withGenerateOperationsToReturnNotImplemented
KotlinMicronautServerOptionsBuilder withGenerateOperationsToReturnNotImplemented(boolean generateOperationsToReturnNotImplemented) If set to true, controller operations will return not implemented status.- Parameters:
generateOperationsToReturnNotImplemented
- the not implemented flag- Returns:
- this builder
-
withGenerateControllerFromExamples
KotlinMicronautServerOptionsBuilder withGenerateControllerFromExamples(boolean generateControllerFromExamples) If set to true, controllers will be generated using examples.- Parameters:
generateControllerFromExamples
- the examples flag- Returns:
- this builder
-
withAuthentication
If set to true, generated code will add support for authentication.- Parameters:
useAuth
- the authentication flag- Returns:
- this builder
-
withFluxForArrays
If set to true, generated code will be with Flux<?> instead Mono<List<?>>.- Parameters:
fluxForArrays
- generate code with Flux<?> instead Mono<List<?>> or not- Returns:
- this builder
-
withPlural
If set to true, the generated code will pluralize parameters and properties for arrays.- Parameters:
plural
- generate pluralized parameters and properties for arrays- Returns:
- this builder
-
withGeneratedAnnotation
If set to true, generated code will be with jakarta.annotation.Generated annotation.- Parameters:
generatedAnnotation
- generate code with jakarta.annotation.Generated annotation or not- Returns:
- this builder
-
withAot
If set to true, generated compatible code with micronaut-aot.- Parameters:
aot
- generate compatible code with micronaut-aot or not- Returns:
- this builder
-
withKsp
If set to true, generated code will be fully compatible with KSP, but not 100% with KAPT.- Parameters:
ksp
- do we need to generate code compatible only with KSP- Returns:
- this builder
-