diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8f27159e..1e46d5f34 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: cache: 'maven' - name: Build with Maven - run: mvn '-Dorg.slf4j.simpleLogger.log.org.openapitools=off' -B formatter:validate impsort:check verify --file pom.xml + run: mvn '-Dorg.slf4j.simpleLogger.log.org.openapitools=off' -B formatter:validate impsort:check install --file pom.xml build_reactive: name: Build - RESTEasy Reactive @@ -79,4 +79,4 @@ jobs: cache: 'maven' - name: Build with Maven - run: mvn -Presteasy-reactive '-Dorg.slf4j.simpleLogger.log.org.openapitools=off' -B formatter:validate impsort:check verify --file pom.xml + run: mvn -Presteasy-reactive '-Dorg.slf4j.simpleLogger.log.org.openapitools=off' -B formatter:validate impsort:check install --file pom.xml diff --git a/docs/modules/ROOT/pages/includes/quarkus-openapi-generator_quarkus.adoc b/docs/modules/ROOT/pages/includes/quarkus-openapi-generator_quarkus.adoc new file mode 100644 index 000000000..73cce0732 --- /dev/null +++ b/docs/modules/ROOT/pages/includes/quarkus-openapi-generator_quarkus.adoc @@ -0,0 +1,1199 @@ +[.configuration-legend] +icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime +[.configuration-reference.searchable, cols="80,.^10,.^10"] +|=== + +h|[.header-title]##Configuration property## +h|Type +h|Default + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-skip-form-model]] [.property-path]##link:#quarkus-openapi-generator_quarkus-skip-form-model[`quarkus.skip-form-model`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.skip-form-model+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Whether to skip the generation of models for form parameters + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SKIP_FORM_MODEL+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SKIP_FORM_MODEL+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-type-mappings-type-mappings]] [.property-path]##link:#quarkus-openapi-generator_quarkus-type-mappings-type-mappings[`quarkus.type-mappings."type-mappings"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.type-mappings."type-mappings"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Type Mapping is an OpenAPI Generator configuration specifying which Java types (the values) should be used for a given OAS datatype (the keys of this map) + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_TYPE_MAPPINGS__TYPE_MAPPINGS_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_TYPE_MAPPINGS__TYPE_MAPPINGS_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-import-mappings-import-mappings]] [.property-path]##link:#quarkus-openapi-generator_quarkus-import-mappings-import-mappings[`quarkus.import-mappings."import-mappings"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.import-mappings."import-mappings"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Import Mapping is an OpenAPI Generator configuration specifying which Java types (the values) should be imported when a given OAS datatype (the keys of this map) is used + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_IMPORT_MAPPINGS__IMPORT_MAPPINGS_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_IMPORT_MAPPINGS__IMPORT_MAPPINGS_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-schema-mappings-schema-mappings]] [.property-path]##link:#quarkus-openapi-generator_quarkus-schema-mappings-schema-mappings[`quarkus.schema-mappings."schema-mappings"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.schema-mappings."schema-mappings"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Schema Mapping is an OpenAPI Generator configuration specifying which Java types (the values) should be imported when a given schema type (the keys of this map) is used + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SCHEMA_MAPPINGS__SCHEMA_MAPPINGS_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SCHEMA_MAPPINGS__SCHEMA_MAPPINGS_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-additional-model-type-annotations]] [.property-path]##link:#quarkus-openapi-generator_quarkus-additional-model-type-annotations[`quarkus.additional-model-type-annotations`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.additional-model-type-annotations+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +The specified annotations will be added to the generated model files + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_ADDITIONAL_MODEL_TYPE_ANNOTATIONS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_ADDITIONAL_MODEL_TYPE_ANNOTATIONS+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-additional-enum-type-unexpected-member]] [.property-path]##link:#quarkus-openapi-generator_quarkus-additional-enum-type-unexpected-member[`quarkus.additional-enum-type-unexpected-member`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.additional-enum-type-unexpected-member+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines if the enums should have an `UNEXPECTED` member to convey values that cannot be parsed. Default is `false`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_ADDITIONAL_ENUM_TYPE_UNEXPECTED_MEMBER+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_ADDITIONAL_ENUM_TYPE_UNEXPECTED_MEMBER+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-additional-api-type-annotations]] [.property-path]##link:#quarkus-openapi-generator_quarkus-additional-api-type-annotations[`quarkus.additional-api-type-annotations`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.additional-api-type-annotations+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +The specified annotations will be added to the generated api files + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_ADDITIONAL_API_TYPE_ANNOTATIONS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_ADDITIONAL_API_TYPE_ANNOTATIONS+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-additional-request-args]] [.property-path]##link:#quarkus-openapi-generator_quarkus-additional-request-args[`quarkus.additional-request-args`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.additional-request-args+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Add custom/additional HTTP Headers or other args to every request + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_ADDITIONAL_REQUEST_ARGS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_ADDITIONAL_REQUEST_ARGS+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-return-response]] [.property-path]##link:#quarkus-openapi-generator_quarkus-return-response[`quarkus.return-response`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.return-response+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines if the methods should return `jakarta.ws.rs.core.Response` or a model. Default is `false`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_RETURN_RESPONSE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_RETURN_RESPONSE+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-enable-security-generation]] [.property-path]##link:#quarkus-openapi-generator_quarkus-enable-security-generation[`quarkus.enable-security-generation`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.enable-security-generation+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines if security support classes should be generated + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_ENABLE_SECURITY_GENERATION+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_ENABLE_SECURITY_GENERATION+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-open-api-normalizer-normalizer]] [.property-path]##link:#quarkus-openapi-generator_quarkus-open-api-normalizer-normalizer[`quarkus.open-api-normalizer."normalizer"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.open-api-normalizer."normalizer"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines the normalizer options. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_OPEN_API_NORMALIZER__NORMALIZER_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_OPEN_API_NORMALIZER__NORMALIZER_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-mutiny]] [.property-path]##link:#quarkus-openapi-generator_quarkus-mutiny[`quarkus.mutiny`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.mutiny+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable SmallRye Mutiny support. If you set this to `true`, all return types will be wrapped in `io.smallrye.mutiny.Uni`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_MUTINY+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_MUTINY+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-mutiny-return-response]] [.property-path]##link:#quarkus-openapi-generator_quarkus-mutiny-return-response[`quarkus.mutiny.return-response`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.mutiny.return-response+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines with SmallRye Mutiny enabled if methods should return `jakarta.ws.rs.core.Response` or a model. Default is `false`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_MUTINY_RETURN_RESPONSE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_MUTINY_RETURN_RESPONSE+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-mutiny-operation-ids-mutiny-multi-operation-ids]] [.property-path]##link:#quarkus-openapi-generator_quarkus-mutiny-operation-ids-mutiny-multi-operation-ids[`quarkus.mutiny.operation-ids."mutiny-multi-operation-ids"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.mutiny.operation-ids."mutiny-multi-operation-ids"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Handles the return type for each operation, depending on the configuration. The following cases are supported: + +1. If `mutiny` is enabled and the operation ID is specified to return `Multi`: - The return type will be wrapped in `io.smallrye.mutiny.Multi`. - If `mutiny.return-response` is enabled, the return type will be `io.smallrye.mutiny.Multi`. - If the operation has a void return type, it will return `io.smallrye.mutiny.Multi`. - Otherwise, it will return `io.smallrye.mutiny.Multi`. + +2. If `mutiny` is enabled and the operation ID is specified to return `Uni`: - The return type will be wrapped in `io.smallrye.mutiny.Uni`. - If `mutiny.return-response` is enabled, the return type will be `io.smallrye.mutiny.Uni`. - If the operation has a void return type, it will return `io.smallrye.mutiny.Uni`. - Otherwise, it will return `io.smallrye.mutiny.Uni`. + +3. If `mutiny` is enabled but no specific operation ID is configured for `Multi` or `Uni`: - The return type defaults to `Uni`. - If `mutiny.return-response` is enabled, the return type will be `io.smallrye.mutiny.Uni`. - If the operation has a void return type, it will return `io.smallrye.mutiny.Uni`. - Otherwise, it will return `io.smallrye.mutiny.Uni``. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_MUTINY_OPERATION_IDS__MUTINY_MULTI_OPERATION_IDS_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_MUTINY_OPERATION_IDS__MUTINY_MULTI_OPERATION_IDS_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-generate-part-filename]] [.property-path]##link:#quarkus-openapi-generator_quarkus-generate-part-filename[`quarkus.generate-part-filename`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.generate-part-filename+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines, whether the `PartFilename` (`org.jboss.resteasy.reactive.PartFilename` or `org.jboss.resteasy.annotations.providers.multipart.PartFilename`) annotation should be generated for MultipartForm POJOs. By setting to `false`, the annotation will not be generated. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_GENERATE_PART_FILENAME+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_GENERATE_PART_FILENAME+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-part-filename-value]] [.property-path]##link:#quarkus-openapi-generator_quarkus-part-filename-value[`quarkus.part-filename-value`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.part-filename-value+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines the filename for a part in case the `PartFilename` annotation (`org.jboss.resteasy.reactive.PartFilename` or `org.jboss.resteasy.annotations.providers.multipart.PartFilename`) is generated. In case no value is set, the default one is `File` or `file`, depending on the `CommonItemConfig++#++useFieldNameInPartFilename` configuration. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_PART_FILENAME_VALUE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_PART_FILENAME_VALUE+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-use-field-name-in-part-filename]] [.property-path]##link:#quarkus-openapi-generator_quarkus-use-field-name-in-part-filename[`quarkus.use-field-name-in-part-filename`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.use-field-name-in-part-filename+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines, whether the filename should also include the property name in case the `PartFilename` annotation (`org.jboss.resteasy.reactive.PartFilename` or `org.jboss.resteasy.annotations.providers.multipart.PartFilename`) is generated. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_USE_FIELD_NAME_IN_PART_FILENAME+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_USE_FIELD_NAME_IN_PART_FILENAME+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-use-bean-validation]] [.property-path]##link:#quarkus-openapi-generator_quarkus-use-bean-validation[`quarkus.use-bean-validation`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.use-bean-validation+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable bean validation. If you set this to `true`, validation annotations are added to generated sources E.g. `@Size`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_USE_BEAN_VALIDATION+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_USE_BEAN_VALIDATION+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-generate-apis]] [.property-path]##link:#quarkus-openapi-generator_quarkus-generate-apis[`quarkus.generate-apis`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.generate-apis+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable the generation of APIs. If you set this to `false`, APIs will not be generated. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_GENERATE_APIS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_GENERATE_APIS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-generate-models]] [.property-path]##link:#quarkus-openapi-generator_quarkus-generate-models[`quarkus.generate-models`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.generate-models+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable the generation of models. If you set this to `false`, models will not be generated. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_GENERATE_MODELS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_GENERATE_MODELS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-equals-hashcode]] [.property-path]##link:#quarkus-openapi-generator_quarkus-equals-hashcode[`quarkus.equals-hashcode`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.equals-hashcode+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable the generation of equals and hashcode in models. If you set this to `false`, the models will not have equals and hashcode. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_EQUALS_HASHCODE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_EQUALS_HASHCODE+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-verbose]] [.property-path]##link:#quarkus-openapi-generator_quarkus-verbose[`quarkus.verbose`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.verbose+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Whether to log the internal generator codegen process in the default output or not. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_VERBOSE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_VERBOSE+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +|`false` + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-input-base-dir]] [.property-path]##link:#quarkus-openapi-generator_quarkus-input-base-dir[`quarkus.input-base-dir`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.input-base-dir+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Option to change the directory where OpenAPI files must be found. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_INPUT_BASE_DIR+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_INPUT_BASE_DIR+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-template-base-dir]] [.property-path]##link:#quarkus-openapi-generator_quarkus-template-base-dir[`quarkus.template-base-dir`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.template-base-dir+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Option to change the directory where template files must be found. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_TEMPLATE_BASE_DIR+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_TEMPLATE_BASE_DIR+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-validatespec]] [.property-path]##link:#quarkus-openapi-generator_quarkus-validatespec[`quarkus.validateSpec`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.validateSpec+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Whether or not to skip validating the input spec prior to generation. By default, invalid specifications will result in an error. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_VALIDATESPEC+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_VALIDATESPEC+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +|`true` + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-include]] [.property-path]##link:#quarkus-openapi-generator_quarkus-include[`quarkus.include`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.include+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Option to specify files for which generation should be executed only + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_INCLUDE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_INCLUDE+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-exclude]] [.property-path]##link:#quarkus-openapi-generator_quarkus-exclude[`quarkus.exclude`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.exclude+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Option to exclude file from generation + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_EXCLUDE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_EXCLUDE+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-default-security-scheme]] [.property-path]##link:#quarkus-openapi-generator_quarkus-default-security-scheme[`quarkus.default-security-scheme`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.default-security-scheme+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Create security for the referenced security scheme + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_DEFAULT_SECURITY_SCHEME+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_DEFAULT_SECURITY_SCHEME+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-skip-form-model]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-skip-form-model[`quarkus.spec."spec-item".skip-form-model`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".skip-form-model+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Whether to skip the generation of models for form parameters + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__SKIP_FORM_MODEL+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__SKIP_FORM_MODEL+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-type-mappings-type-mappings]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-type-mappings-type-mappings[`quarkus.spec."spec-item".type-mappings."type-mappings"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".type-mappings."type-mappings"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Type Mapping is an OpenAPI Generator configuration specifying which Java types (the values) should be used for a given OAS datatype (the keys of this map) + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__TYPE_MAPPINGS__TYPE_MAPPINGS_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__TYPE_MAPPINGS__TYPE_MAPPINGS_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-import-mappings-import-mappings]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-import-mappings-import-mappings[`quarkus.spec."spec-item".import-mappings."import-mappings"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".import-mappings."import-mappings"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Import Mapping is an OpenAPI Generator configuration specifying which Java types (the values) should be imported when a given OAS datatype (the keys of this map) is used + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__IMPORT_MAPPINGS__IMPORT_MAPPINGS_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__IMPORT_MAPPINGS__IMPORT_MAPPINGS_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-schema-mappings-schema-mappings]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-schema-mappings-schema-mappings[`quarkus.spec."spec-item".schema-mappings."schema-mappings"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".schema-mappings."schema-mappings"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Schema Mapping is an OpenAPI Generator configuration specifying which Java types (the values) should be imported when a given schema type (the keys of this map) is used + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__SCHEMA_MAPPINGS__SCHEMA_MAPPINGS_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__SCHEMA_MAPPINGS__SCHEMA_MAPPINGS_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-additional-model-type-annotations]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-additional-model-type-annotations[`quarkus.spec."spec-item".additional-model-type-annotations`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".additional-model-type-annotations+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +The specified annotations will be added to the generated model files + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__ADDITIONAL_MODEL_TYPE_ANNOTATIONS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__ADDITIONAL_MODEL_TYPE_ANNOTATIONS+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-additional-enum-type-unexpected-member]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-additional-enum-type-unexpected-member[`quarkus.spec."spec-item".additional-enum-type-unexpected-member`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".additional-enum-type-unexpected-member+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines if the enums should have an `UNEXPECTED` member to convey values that cannot be parsed. Default is `false`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__ADDITIONAL_ENUM_TYPE_UNEXPECTED_MEMBER+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__ADDITIONAL_ENUM_TYPE_UNEXPECTED_MEMBER+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-additional-api-type-annotations]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-additional-api-type-annotations[`quarkus.spec."spec-item".additional-api-type-annotations`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".additional-api-type-annotations+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +The specified annotations will be added to the generated api files + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__ADDITIONAL_API_TYPE_ANNOTATIONS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__ADDITIONAL_API_TYPE_ANNOTATIONS+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-additional-request-args]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-additional-request-args[`quarkus.spec."spec-item".additional-request-args`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".additional-request-args+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Add custom/additional HTTP Headers or other args to every request + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__ADDITIONAL_REQUEST_ARGS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__ADDITIONAL_REQUEST_ARGS+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-return-response]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-return-response[`quarkus.spec."spec-item".return-response`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".return-response+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines if the methods should return `jakarta.ws.rs.core.Response` or a model. Default is `false`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__RETURN_RESPONSE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__RETURN_RESPONSE+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-enable-security-generation]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-enable-security-generation[`quarkus.spec."spec-item".enable-security-generation`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".enable-security-generation+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines if security support classes should be generated + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__ENABLE_SECURITY_GENERATION+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__ENABLE_SECURITY_GENERATION+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-open-api-normalizer-normalizer]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-open-api-normalizer-normalizer[`quarkus.spec."spec-item".open-api-normalizer."normalizer"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".open-api-normalizer."normalizer"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines the normalizer options. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__OPEN_API_NORMALIZER__NORMALIZER_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__OPEN_API_NORMALIZER__NORMALIZER_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-mutiny]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-mutiny[`quarkus.spec."spec-item".mutiny`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".mutiny+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable SmallRye Mutiny support. If you set this to `true`, all return types will be wrapped in `io.smallrye.mutiny.Uni`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__MUTINY+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__MUTINY+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-mutiny-return-response]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-mutiny-return-response[`quarkus.spec."spec-item".mutiny.return-response`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".mutiny.return-response+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines with SmallRye Mutiny enabled if methods should return `jakarta.ws.rs.core.Response` or a model. Default is `false`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__MUTINY_RETURN_RESPONSE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__MUTINY_RETURN_RESPONSE+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-mutiny-operation-ids-mutiny-multi-operation-ids]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-mutiny-operation-ids-mutiny-multi-operation-ids[`quarkus.spec."spec-item".mutiny.operation-ids."mutiny-multi-operation-ids"`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".mutiny.operation-ids."mutiny-multi-operation-ids"+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Handles the return type for each operation, depending on the configuration. The following cases are supported: + +1. If `mutiny` is enabled and the operation ID is specified to return `Multi`: - The return type will be wrapped in `io.smallrye.mutiny.Multi`. - If `mutiny.return-response` is enabled, the return type will be `io.smallrye.mutiny.Multi`. - If the operation has a void return type, it will return `io.smallrye.mutiny.Multi`. - Otherwise, it will return `io.smallrye.mutiny.Multi`. + +2. If `mutiny` is enabled and the operation ID is specified to return `Uni`: - The return type will be wrapped in `io.smallrye.mutiny.Uni`. - If `mutiny.return-response` is enabled, the return type will be `io.smallrye.mutiny.Uni`. - If the operation has a void return type, it will return `io.smallrye.mutiny.Uni`. - Otherwise, it will return `io.smallrye.mutiny.Uni`. + +3. If `mutiny` is enabled but no specific operation ID is configured for `Multi` or `Uni`: - The return type defaults to `Uni`. - If `mutiny.return-response` is enabled, the return type will be `io.smallrye.mutiny.Uni`. - If the operation has a void return type, it will return `io.smallrye.mutiny.Uni`. - Otherwise, it will return `io.smallrye.mutiny.Uni``. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__MUTINY_OPERATION_IDS__MUTINY_MULTI_OPERATION_IDS_+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__MUTINY_OPERATION_IDS__MUTINY_MULTI_OPERATION_IDS_+++` +endif::add-copy-button-to-env-var[] +-- +|Map +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-generate-part-filename]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-generate-part-filename[`quarkus.spec."spec-item".generate-part-filename`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".generate-part-filename+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines, whether the `PartFilename` (`org.jboss.resteasy.reactive.PartFilename` or `org.jboss.resteasy.annotations.providers.multipart.PartFilename`) annotation should be generated for MultipartForm POJOs. By setting to `false`, the annotation will not be generated. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__GENERATE_PART_FILENAME+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__GENERATE_PART_FILENAME+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-part-filename-value]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-part-filename-value[`quarkus.spec."spec-item".part-filename-value`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".part-filename-value+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines the filename for a part in case the `PartFilename` annotation (`org.jboss.resteasy.reactive.PartFilename` or `org.jboss.resteasy.annotations.providers.multipart.PartFilename`) is generated. In case no value is set, the default one is `File` or `file`, depending on the `CommonItemConfig++#++useFieldNameInPartFilename` configuration. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__PART_FILENAME_VALUE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__PART_FILENAME_VALUE+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-use-field-name-in-part-filename]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-use-field-name-in-part-filename[`quarkus.spec."spec-item".use-field-name-in-part-filename`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".use-field-name-in-part-filename+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Defines, whether the filename should also include the property name in case the `PartFilename` annotation (`org.jboss.resteasy.reactive.PartFilename` or `org.jboss.resteasy.annotations.providers.multipart.PartFilename`) is generated. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__USE_FIELD_NAME_IN_PART_FILENAME+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__USE_FIELD_NAME_IN_PART_FILENAME+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-use-bean-validation]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-use-bean-validation[`quarkus.spec."spec-item".use-bean-validation`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".use-bean-validation+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable bean validation. If you set this to `true`, validation annotations are added to generated sources E.g. `@Size`. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__USE_BEAN_VALIDATION+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__USE_BEAN_VALIDATION+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-generate-apis]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-generate-apis[`quarkus.spec."spec-item".generate-apis`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".generate-apis+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable the generation of APIs. If you set this to `false`, APIs will not be generated. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__GENERATE_APIS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__GENERATE_APIS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-generate-models]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-generate-models[`quarkus.spec."spec-item".generate-models`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".generate-models+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable the generation of models. If you set this to `false`, models will not be generated. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__GENERATE_MODELS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__GENERATE_MODELS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-equals-hashcode]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-equals-hashcode[`quarkus.spec."spec-item".equals-hashcode`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".equals-hashcode+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Enable the generation of equals and hashcode in models. If you set this to `false`, the models will not have equals and hashcode. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__EQUALS_HASHCODE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__EQUALS_HASHCODE+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-base-package]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-base-package[`quarkus.spec."spec-item".base-package`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".base-package+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Base package for where the generated code for the given OpenAPI specification will be added. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__BASE_PACKAGE+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__BASE_PACKAGE+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-api-name-suffix]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-api-name-suffix[`quarkus.spec."spec-item".api-name-suffix`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".api-name-suffix+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Suffix name for generated api classes + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__API_NAME_SUFFIX+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__API_NAME_SUFFIX+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-model-name-suffix]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-model-name-suffix[`quarkus.spec."spec-item".model-name-suffix`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".model-name-suffix+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Suffix name for generated model classes + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__MODEL_NAME_SUFFIX+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__MODEL_NAME_SUFFIX+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-model-name-prefix]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-model-name-prefix[`quarkus.spec."spec-item".model-name-prefix`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".model-name-prefix+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Prefix name for generated model classes + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__MODEL_NAME_PREFIX+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__MODEL_NAME_PREFIX+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-remove-operation-id-prefix]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-remove-operation-id-prefix[`quarkus.spec."spec-item".remove-operation-id-prefix`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".remove-operation-id-prefix+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Remove operation id prefix + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__REMOVE_OPERATION_ID_PREFIX+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__REMOVE_OPERATION_ID_PREFIX+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-remove-operation-id-prefix-delimiter]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-remove-operation-id-prefix-delimiter[`quarkus.spec."spec-item".remove-operation-id-prefix-delimiter`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".remove-operation-id-prefix-delimiter+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Remove operation id prefix + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__REMOVE_OPERATION_ID_PREFIX_DELIMITER+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__REMOVE_OPERATION_ID_PREFIX_DELIMITER+++` +endif::add-copy-button-to-env-var[] +-- +|string +| + +a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator_quarkus-spec-spec-item-remove-operation-id-prefix-count]] [.property-path]##link:#quarkus-openapi-generator_quarkus-spec-spec-item-remove-operation-id-prefix-count[`quarkus.spec."spec-item".remove-operation-id-prefix-count`]## +ifdef::add-copy-button-to-config-props[] +config_property_copy_button:+++quarkus.spec."spec-item".remove-operation-id-prefix-count+++[] +endif::add-copy-button-to-config-props[] + + +[.description] +-- +Remove operation id prefix + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_SPEC__SPEC_ITEM__REMOVE_OPERATION_ID_PREFIX_COUNT+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_SPEC__SPEC_ITEM__REMOVE_OPERATION_ID_PREFIX_COUNT+++` +endif::add-copy-button-to-env-var[] +-- +|int +| + +|=== + diff --git a/server/integration-tests/codestarts/pom.xml b/server/integration-tests/codestarts/pom.xml new file mode 100644 index 000000000..6f1941e5f --- /dev/null +++ b/server/integration-tests/codestarts/pom.xml @@ -0,0 +1,109 @@ + + + + quarkus-openapi-generator-server-integration-tests-parent + io.quarkiverse.openapi.generator + 3.0.0-SNAPSHOT + ../pom.xml + + 4.0.0 + + quarkus-openapi-generator-server-integration-tests-codestarts + Quarkus - Openapi Generator - Server - Integration Tests - Codestarts + + + + io.quarkiverse.openapi.generator + quarkus-openapi-generator-server + ${project.version} + + + io.quarkus + quarkus-devtools-testing + test + + + + + + + + io.quarkus + quarkus-maven-plugin + ${quarkus.version} + + + maven-surefire-plugin + ${version.surefire.plugin} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-failsafe-plugin + ${failsafe-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-compiler-plugin + ${compiler-plugin.version} + + + -parameters + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + + copy-resources + generate-resources + + copy-resources + + + ${project.build.outputDirectory} + + + + ${project.basedir}/../runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java + + false + + + + + + + + io.quarkus + quarkus-maven-plugin + + + + build + generate-code + + + + + + + diff --git a/server/integration-tests/codestarts/src/main/resources/application.properties b/server/integration-tests/codestarts/src/main/resources/application.properties new file mode 100755 index 000000000..e69de29bb diff --git a/server/integration-tests/codestarts/src/test/java/io/quarkiverse/openapi/server/generator/it/QuarkusOpenAPIGeneratorServerCodestartsTest.java b/server/integration-tests/codestarts/src/test/java/io/quarkiverse/openapi/server/generator/it/QuarkusOpenAPIGeneratorServerCodestartsTest.java new file mode 100644 index 000000000..d9a480c1b --- /dev/null +++ b/server/integration-tests/codestarts/src/test/java/io/quarkiverse/openapi/server/generator/it/QuarkusOpenAPIGeneratorServerCodestartsTest.java @@ -0,0 +1,27 @@ +package io.quarkiverse.openapi.server.generator.it; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; + +import io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartCatalog; +import io.quarkus.devtools.testing.codestarts.QuarkusCodestartTest; + +public class QuarkusOpenAPIGeneratorServerCodestartsTest { + + @RegisterExtension + public static QuarkusCodestartTest codestartTest = QuarkusCodestartTest.builder() + .languages(QuarkusCodestartCatalog.Language.JAVA) + .setupStandaloneExtensionTest("io.quarkiverse.openapi.generator:quarkus-openapi-generator-server").build(); + + @Test + void testContent() throws Throwable { + codestartTest + .assertThatGeneratedFile(QuarkusCodestartCatalog.Language.JAVA, "src/main/resources/application.properties") + .content() + .contains("quarkus.openapi.generator.spec=openapi.yml"); + codestartTest + .assertThatGeneratedFile(QuarkusCodestartCatalog.Language.JAVA, "src/main/resources/openapi/openapi.yml") + .content() + .contains("title: Generated API"); + } +} diff --git a/server/integration-tests/pom.xml b/server/integration-tests/pom.xml index 985bb0a7d..1b319fe13 100755 --- a/server/integration-tests/pom.xml +++ b/server/integration-tests/pom.xml @@ -16,6 +16,7 @@ reactive resteasy + codestarts - \ No newline at end of file + diff --git a/server/runtime/pom.xml b/server/runtime/pom.xml index b350a97aa..e9ac007a3 100755 --- a/server/runtime/pom.xml +++ b/server/runtime/pom.xml @@ -59,6 +59,26 @@ + + maven-jar-plugin + + + generate-codestart-jar + generate-resources + + jar + + + ${project.basedir}/src/main + + codestarts/** + + codestarts + true + + + + diff --git a/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/codestart.yml b/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/codestart.yml new file mode 100644 index 000000000..69006d404 --- /dev/null +++ b/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/codestart.yml @@ -0,0 +1,17 @@ +name: openapi-generator-server +ref: openapi-generator-server +type: code +tags: extension-codestart +metadata: + title: OpenAPI Generator Codestart - Server Extension + description: This codestart generates a simple API with OpenAPI documentation. + related-guide-section: https://docs.quarkiverse.io/quarkus-openapi-generator/dev/server.html +language: + base: + data: + resource: + class-name: YourResource + path: "/your-api" + dependencies: + - io.quarkus:quarkus-resteasy + - io.quarkus:quarkus-smallrye-openapi \ No newline at end of file diff --git a/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/README.tpl.qute.md b/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/README.tpl.qute.md new file mode 100644 index 000000000..0d8dc1409 --- /dev/null +++ b/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/README.tpl.qute.md @@ -0,0 +1,24 @@ +{#include readme-header /} + +## Requirements + +If you do not have added the `io.quarkus:quarkus-smallrye-openapi` extension in your project, add it first: + +### SmallRye OpenAPI: + +Quarkus CLI: + +```bash +quarkus ext add io.quarkus:quarkus-smallrye-openapi +``` + +Maven: +```bash +./mvnw quarkus:add-extension -Dextensions="io.quarkus:quarkus-smallrye-openapi" +``` + +Gradle: + +```bash +./gradlew addExtension --extensions="io.quarkus:quarkus-smallrye-openapi" +``` \ No newline at end of file diff --git a/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/src/main/resources/application.yml b/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/src/main/resources/application.yml new file mode 100644 index 000000000..ea7674128 --- /dev/null +++ b/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/src/main/resources/application.yml @@ -0,0 +1,5 @@ +quarkus: + openapi: + generator: + spec: + openapi.yml \ No newline at end of file diff --git a/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/src/main/resources/openapi/openapi.yml b/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/src/main/resources/openapi/openapi.yml new file mode 100644 index 000000000..707eca341 --- /dev/null +++ b/server/runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java/src/main/resources/openapi/openapi.yml @@ -0,0 +1,42 @@ +openapi: 3.0.3 +info: + title: Generated API + version: "1.0" +paths: + /pets: + get: + responses: + 200: + description: OK + content: + application/json: { } + post: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + responses: + 200: + description: OK + content: + application/json: { } + delete: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + responses: + 200: + description: OK + content: + application/json: { } +components: + schemas: + Pet: + properties: + description: + type: string + name: + type: string \ No newline at end of file diff --git a/server/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/server/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 000000000..fce904e16 --- /dev/null +++ b/server/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,19 @@ +name: "OpenAPI Generator - REST Server Generator" +description: "Provides personalized code generation to get started in a Server project " +artifact: ${project.groupId}:${project.artifactId}:${project.version} +metadata: + keywords: + - "openapi" + - "openapi-generator-server" + - "rest" + - "server" + categories: + - "web" + guide: "https://docs.quarkiverse.io/quarkus-openapi-generator/dev/index.html" + icon-url: "https://raw.githubusercontent.com/quarkiverse/quarkus-openapi-generator/main/docs/modules/ROOT/assets/images/openapi.svg" + status: "preview" + codestart: + name: "openapi-generator-server" + languages: + - "java" + artifact: "io.quarkiverse.openapi.generator:quarkus-openapi-generator-server:codestarts:jar:${project.version}" \ No newline at end of file