SmallRye OpenAPI is an implementation of Eclipse MicroProfile OpenAPI.
Compile and install this project:
mvn clean install-
core - The core OpenAPI code, independent of entry point dependencies.
-
extension-jaxrs - The JAX-RS entry point. This module depends on JAX-RS and core.
-
extension-spring - The Spring entry point. This module depends on Spring and core.
-
extension-vertx - The Vert.x entry point. This module depends on Vert.x and core.
-
implementation - Implementation of the Eclipse MicroProfile OpenAPI specification. This just pulls in Core and the JAX-RS extension .
-
model - Base model classes used by core and extensions to represent an OpenAPI document
-
testsuite - Test Suites and Data
-
-
gradle-plugin - Gradle plugin that creates the OpenAPI Schema on build.
-
maven-plugin - Maven plugin that creates the OpenAPI Schema on build.
-
model-apt - APT processor to generate model classes (in core) based on annotations (not for general-purpose use)
-
-
Property Naming Strategy
mp.openapi.extensions.smallrye.property-naming-strategyDefine a naming strategy to be used globally for all schema properties. Set to one of the following:
-
A standard JSON-B naming strategy (listed in
jakarta.json.bind.config.PropertyNamingStrategy/javax.json.bind.config.PropertyNamingStrategy) -
A fully-qualified class name of an implementation of a JSON-B property naming strategy (
jakarta.json.bind.config.PropertyNamingStrategyorjavax.json.bind.config.PropertyNamingStrategy) -
A fully-qualified class name of an implementation of a Jackson property naming strategy base class (
com.fasterxml.jackson.databind.PropertyNamingStrategies.NamingBase). Only thetranslatemethod is utilized.
-
-
Removal of unused schemas
mp.openapi.extensions.smallrye.remove-unused-schemas.enableSet to
trueenable automatic removal of unused schemas fromcomponents/schemasin the OpenAPI model. Unused schemas will be removed following annotation scanning but prior to running anyOASFilterthat may be configured. Default value isfalse. -
Automatic Schema Inheritance
mp.openapi.extensions.smallrye.auto-inheritanceConfigures handling of schema inheritance. Allowed values include
NONE(default),BOTH, andPARENT_ONLY.-
NONEdisables automatic schema inheritance. Parent class properties will be includes in the properties map of each child class unless@Schema(allOf = { … })has been specified on the child class. -
BOTHenables automatic schema inheritance by placing both the child and parent class within the child schema’sallOfproperty unless@Schema(allOf = { … })has already been specified on the child class.BOTHprocessing can be selectively disabled on individual classes by setting@Schema(allOf = void.class)on the child class and noallOfwill be set on the resulting schema - parent and child properties will be present in the child schema as ifNONEwere used. -
PARENT_ONLYenables automatic schema inheritance by placing only the parent class within the child schema’sallOfproperty unless@Schema(allOf = { … })has already been specified on the child class.PARENT_ONLYprocessing can be selectively disabled on individual classes by setting@Schema(allOf = void.class)on the child class and noallOfwill be set on the resulting schema - parent and child properties will be present in the child schema as ifNONEwere used.
-
-
Duplicate Operation ID Behavior
mp.openapi.extensions.smallrye.duplicateOperationIdBehaviorSet to
FAILto abort in case of duplicate operationIds, set toWARNto log warnings when the build encounters duplicate operationIds. Default value isWARN. -
Maximum Static File Size
mp.openapi.extensions.smallrye.maximumStaticFileSizeSet this value in order to change the maximum threshold for processed static files, when generating model from them. If not set, it will default to 3 MB.
-
Merge Schema Examples
mp.openapi.extensions.smallrye.merge-schema-examplesSet this boolean value to disable the merging of the deprecated
@Schemaexampleproperty into theexamplesarray introduced in OAS 3.1.0. If not set, it will default totruethe deprecatedexamplewill be mapped to theexamplesarray in the OpenAPI model. -
Sorted Parameters
mp.openapi.extensions.smallrye.sorted-parameters.enableSet this boolean value to enable or disable the sorting of parameter array entries during annotation scanning. When enabled (set to
true), parameters will be order either by their order within a@Parametersannotation on an operation method or (in the absence of that annotation) by their$ref,in, andnameattributes. When disabled (set tofalse), parameters will be in the order they are encountered in the Java code. If not set, it will default totrue. -
Generic Responses use
defaultcodemp.openapi.extensions.smallrye.generic-response-use-defaultSet this boolean value to enable the automatic use of the
defaultresponse code for framework response types (e.g. Jakarta REST’sResponsetype) when no@APIResponseannotations have been used and the HTTP response code for an operation cannot be determined. When unset orfalse, the response code will be set to200. -
Operation ID Strategy
mp.openapi.extensions.smallrye.operationIdStrategySpecify a strategy to be used globally for generating operation IDs when not specified via an annotation or static OpenAPI input. If not set, operation IDs will not be generated. Set to one of the following:
-
METHOD(may result in duplicate operation IDs in an application where REST endpoint method names are not unique) -
CLASS_METHOD(may result in duplicate operation IDs in an application where REST endpoint simple class name + method names are not unique) -
PACKAGE_CLASS_METHOD -
A fully-qualified class name of an implementation of
io.smallrye.openapi.api.OperationIdGenerator(as of 4.1.2, see JavaDoc)
-
-
YAML Alias Expansion (as of 4.1.2)
mp.openapi.extensions.smallrye.yaml-alias-expansion.enableSet this boolean value to enable or disable the expansion of YAML aliases when loading a static OpenAPI file. When enabled (set to
true), aliases encountered in the YAML will expand to the value of the YAML node having an anchor of the same name (see more about YAML anchors and aliases in the YAML 1.1 specification). When disabled (set tofalse), aliases will not be expanded. If not set, it will default totrue.