Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,89 @@ h|[.header-title]##Configuration property##
h|Type
h|Default

3+|No configuration properties found.
a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator-server_quarkus-openapi-generator-spec]] [.property-path]##link:#quarkus-openapi-generator-server_quarkus-openapi-generator-spec[`quarkus.openapi.generator.spec`]##
ifdef::add-copy-button-to-config-props[]
config_property_copy_button:+++quarkus.openapi.generator.spec+++[]
endif::add-copy-button-to-config-props[]


[.description]
--
The OpenAPI specification filename.


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_OPENAPI_GENERATOR_SPEC+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_OPENAPI_GENERATOR_SPEC+++`
endif::add-copy-button-to-env-var[]
--
|string
|

a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator-server_quarkus-openapi-generator-input-base-dir]] [.property-path]##link:#quarkus-openapi-generator-server_quarkus-openapi-generator-input-base-dir[`quarkus.openapi.generator.input-base-dir`]##
ifdef::add-copy-button-to-config-props[]
config_property_copy_button:+++quarkus.openapi.generator.input-base-dir+++[]
endif::add-copy-button-to-config-props[]


[.description]
--
The input base dir where the OpenAPI specification is.


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_OPENAPI_GENERATOR_INPUT_BASE_DIR+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_OPENAPI_GENERATOR_INPUT_BASE_DIR+++`
endif::add-copy-button-to-env-var[]
--
|string
|`src/main/resources/openapi`

a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator-server_quarkus-openapi-generator-reactive]] [.property-path]##link:#quarkus-openapi-generator-server_quarkus-openapi-generator-reactive[`quarkus.openapi.generator.reactive`]##
ifdef::add-copy-button-to-config-props[]
config_property_copy_button:+++quarkus.openapi.generator.reactive+++[]
endif::add-copy-button-to-config-props[]


[.description]
--
Whether it must generate with reactive code.


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_OPENAPI_GENERATOR_REACTIVE+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_OPENAPI_GENERATOR_REACTIVE+++`
endif::add-copy-button-to-env-var[]
--
|boolean
|`false`

a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator-server_quarkus-openapi-generator-base-package]] [.property-path]##link:#quarkus-openapi-generator-server_quarkus-openapi-generator-base-package[`quarkus.openapi.generator.base-package`]##
ifdef::add-copy-button-to-config-props[]
config_property_copy_button:+++quarkus.openapi.generator.base-package+++[]
endif::add-copy-button-to-config-props[]


[.description]
--
The base package to be used to generated sources.


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_OPENAPI_GENERATOR_BASE_PACKAGE+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_OPENAPI_GENERATOR_BASE_PACKAGE+++`
endif::add-copy-button-to-env-var[]
--
|string
|`io.apicurio.api`

|===

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,89 @@ h|[.header-title]##Configuration property##
h|Type
h|Default

3+|No configuration properties found.
a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator-server_quarkus-openapi-generator-spec]] [.property-path]##link:#quarkus-openapi-generator-server_quarkus-openapi-generator-spec[`quarkus.openapi.generator.spec`]##
ifdef::add-copy-button-to-config-props[]
config_property_copy_button:+++quarkus.openapi.generator.spec+++[]
endif::add-copy-button-to-config-props[]


[.description]
--
The OpenAPI specification filename.


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_OPENAPI_GENERATOR_SPEC+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_OPENAPI_GENERATOR_SPEC+++`
endif::add-copy-button-to-env-var[]
--
|string
|

a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator-server_quarkus-openapi-generator-input-base-dir]] [.property-path]##link:#quarkus-openapi-generator-server_quarkus-openapi-generator-input-base-dir[`quarkus.openapi.generator.input-base-dir`]##
ifdef::add-copy-button-to-config-props[]
config_property_copy_button:+++quarkus.openapi.generator.input-base-dir+++[]
endif::add-copy-button-to-config-props[]


[.description]
--
The input base dir where the OpenAPI specification is.


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_OPENAPI_GENERATOR_INPUT_BASE_DIR+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_OPENAPI_GENERATOR_INPUT_BASE_DIR+++`
endif::add-copy-button-to-env-var[]
--
|string
|`src/main/resources/openapi`

a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator-server_quarkus-openapi-generator-reactive]] [.property-path]##link:#quarkus-openapi-generator-server_quarkus-openapi-generator-reactive[`quarkus.openapi.generator.reactive`]##
ifdef::add-copy-button-to-config-props[]
config_property_copy_button:+++quarkus.openapi.generator.reactive+++[]
endif::add-copy-button-to-config-props[]


[.description]
--
Whether it must generate with reactive code.


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_OPENAPI_GENERATOR_REACTIVE+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_OPENAPI_GENERATOR_REACTIVE+++`
endif::add-copy-button-to-env-var[]
--
|boolean
|`false`

a|icon:lock[title=Fixed at build time] [[quarkus-openapi-generator-server_quarkus-openapi-generator-base-package]] [.property-path]##link:#quarkus-openapi-generator-server_quarkus-openapi-generator-base-package[`quarkus.openapi.generator.base-package`]##
ifdef::add-copy-button-to-config-props[]
config_property_copy_button:+++quarkus.openapi.generator.base-package+++[]
endif::add-copy-button-to-config-props[]


[.description]
--
The base package to be used to generated sources.


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++QUARKUS_OPENAPI_GENERATOR_BASE_PACKAGE+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_OPENAPI_GENERATOR_BASE_PACKAGE+++`
endif::add-copy-button-to-env-var[]
--
|string
|`io.apicurio.api`

|===

4 changes: 4 additions & 0 deletions docs/modules/ROOT/pages/server.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ include::includes/want-to-contribute.adoc[]
== Getting Started

include::./includes/server-getting-started.adoc[leveloffset=+1, opts=optional]

== Configuration Properties

include::./includes/quarkus-openapi-generator-server.adoc[opts=optional, leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
@ConfigMapping(prefix = CodegenConfig.CODEGEN_TIME_CONFIG_PREFIX)
public interface CodegenConfig {
public interface CodegenConfig extends ServerCodegenConfig {

String CODEGEN_TIME_CONFIG_PREFIX = "quarkus.openapi.generator";
String CODEGEN_BASE_PACKAGE = CODEGEN_TIME_CONFIG_PREFIX + ".base-package";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package io.quarkiverse.openapi.server.generator.deployment;

import java.util.Optional;

import io.smallrye.config.WithDefault;

public interface ServerCodegenConfig {

String DEFAULT_PACKAGE = "io.apicurio.api";

/**
* The OpenAPI specification filename.
*/
Optional<String> spec();

/**
* The input base dir where the OpenAPI specification is.
*/
@WithDefault("src/main/resources/openapi")
Optional<String> inputBaseDir();

/**
* Whether it must generate with reactive code.
*/
@WithDefault("false")
boolean reactive();

/**
* The base package to be used to generated sources.
*/
@WithDefault(DEFAULT_PACKAGE)
Optional<String> basePackage();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static io.quarkiverse.openapi.server.generator.deployment.CodegenConfig.getBasePackagePropertyName;
import static io.quarkiverse.openapi.server.generator.deployment.CodegenConfig.getCodegenReactive;
import static io.quarkiverse.openapi.server.generator.deployment.ServerCodegenConfig.DEFAULT_PACKAGE;

import java.io.File;
import java.io.FileInputStream;
Expand All @@ -26,7 +27,6 @@
public class ApicurioCodegenWrapper {

private static final Logger log = LoggerFactory.getLogger(ApicurioCodegenWrapper.class);
private static final String DEFAULT_PACKAGE = "io.apicurio.api";

private final File outdir;
private final JaxRsProjectSettings projectSettings;
Expand Down