Document all used vendor extensions in specific generator (#11797)

This commit is contained in:
Oleh Kurpiak 2022-03-06 17:21:55 +02:00 committed by GitHub
parent be8567f656
commit 382e2a22a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 308 additions and 4 deletions

View File

@ -61,6 +61,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -95,6 +95,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |false| |virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
|x-spring-paginated|Add org.springframework.data.domain.Pageable to controller method. Can be used to handle page & size query parameters|OPERATION|false
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -63,6 +63,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -69,6 +69,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations| |true| |useBeanValidation|Use BeanValidation API annotations| |true|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -71,6 +71,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations| |true| |useBeanValidation|Use BeanValidation API annotations| |true|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -69,6 +69,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useTags|use tags for creating interface and controller classnames| |false| |useTags|use tags for creating interface and controller classnames| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -70,6 +70,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|zipkinUri|Zipkin URI| |null| |zipkinUri|Zipkin URI| |null|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -73,6 +73,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true| |wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -63,6 +63,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -63,6 +63,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -66,6 +66,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null| |vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -84,6 +84,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false| |useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
|x-webclient-blocking|Specifies if method for specific operation should be blocking or non-blocking(ex: return `Mono<T>/Flux<T>` or `return T/List<T>/Set<T>` & execute `.block()` inside generated method)|OPERATION|false
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -76,6 +76,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useTags|use tags for creating interface and controller classnames| |false| |useTags|use tags for creating interface and controller classnames| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -67,6 +67,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useLoggingFeatureForTests|Use Logging Feature for tests| |false| |useLoggingFeatureForTests|Use Logging Feature for tests| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -90,6 +90,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useWadlFeature|Use WADL Feature| |false| |useWadlFeature|Use WADL Feature| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -85,6 +85,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useWadlFeature|Use WADL Feature| |false| |useWadlFeature|Use WADL Feature| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -70,6 +70,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useTags|use tags for creating interface and controller classnames| |false| |useTags|use tags for creating interface and controller classnames| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -70,6 +70,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useTags|use tags for creating interface and controller classnames| |false| |useTags|use tags for creating interface and controller classnames| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -69,6 +69,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useTags|use tags for creating interface and controller classnames| |false| |useTags|use tags for creating interface and controller classnames| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -76,6 +76,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useTags|use tags for creating interface and controller classnames| |false| |useTags|use tags for creating interface and controller classnames| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -88,6 +88,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |false| |virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
|x-spring-paginated|Add org.springframework.data.domain.Pageable to controller method. Can be used to handle page & size query parameters|OPERATION|false
## IMPORT MAPPING ## IMPORT MAPPING
| Type/Alias | Imports | | Type/Alias | Imports |

View File

@ -24,6 +24,7 @@ import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenConfigLoader; import org.openapitools.codegen.CodegenConfigLoader;
import org.openapitools.codegen.GeneratorNotFoundException; import org.openapitools.codegen.GeneratorNotFoundException;
import org.openapitools.codegen.VendorExtension;
import org.openapitools.codegen.meta.FeatureSet; import org.openapitools.codegen.meta.FeatureSet;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -89,6 +90,10 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
"--markdown-header"}, title = "markdown header", description = "When format=markdown, include this option to write out markdown headers (e.g. for docusaurus).") "--markdown-header"}, title = "markdown header", description = "When format=markdown, include this option to write out markdown headers (e.g. for docusaurus).")
private Boolean markdownHeader; private Boolean markdownHeader;
@Option(name = {
"--supported-vendor-extensions"}, title = "supported vendor extensions", description = "List supported vendor extensions")
private Boolean supportedVendorExtensions;
@Option(name = {"--full-details"}, title = "full generator details", description = "displays CLI options as well as other configs/mappings (implies --instantiation-types, --reserved-words, --language-specific-primitives, --import-mappings, --feature-set)") @Option(name = {"--full-details"}, title = "full generator details", description = "displays CLI options as well as other configs/mappings (implies --instantiation-types, --reserved-words, --language-specific-primitives, --import-mappings, --feature-set)")
private Boolean fullDetails; private Boolean fullDetails;
@ -108,6 +113,7 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
importMappings = Boolean.TRUE; importMappings = Boolean.TRUE;
featureSets = Boolean.TRUE; featureSets = Boolean.TRUE;
metadata = Boolean.TRUE; metadata = Boolean.TRUE;
supportedVendorExtensions = Boolean.TRUE;
} }
try { try {
@ -198,6 +204,27 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
}); });
} }
private void generateMdSupportedVendorExtensions(StringBuilder sb, CodegenConfig config) {
List<VendorExtension> supportedVendorExtensions = config.getSupportedVendorExtensions();
if (supportedVendorExtensions.isEmpty()) {
return;
}
sb
.append(newline).append("## SUPPORTED VENDOR EXTENSIONS").append(newline).append(newline)
.append("| Extension name | Description | Applicable for | Default value |").append(newline)
.append("| -------------- | ----------- | -------------- | ------------- |").append(newline);
supportedVendorExtensions.forEach(
extension -> sb.append("|").append(extension.getName())
.append("|").append(extension.getDescription())
.append("|").append(extension.getLevels().stream().map(Objects::toString).collect(Collectors.joining(", ")))
.append("|").append(extension.getDefaultValue())
.append(newline)
);
sb.append(newline);
}
private void generateMdImportMappings(StringBuilder sb, CodegenConfig config) { private void generateMdImportMappings(StringBuilder sb, CodegenConfig config) {
sb.append(newline).append("## IMPORT MAPPING").append(newline).append(newline); sb.append(newline).append("## IMPORT MAPPING").append(newline).append(newline);
@ -332,6 +359,10 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
generateMdConfigOptionsHeader(sb, config); generateMdConfigOptionsHeader(sb, config);
generateMdConfigOptions(sb, config); generateMdConfigOptions(sb, config);
if (Boolean.TRUE.equals(supportedVendorExtensions)) {
generateMdSupportedVendorExtensions(sb, config);
}
if (Boolean.TRUE.equals(importMappings)) { if (Boolean.TRUE.equals(importMappings)) {
generateMdImportMappings(sb, config); generateMdImportMappings(sb, config);
} }

View File

@ -305,13 +305,15 @@ public interface CodegenConfig {
Schema unaliasSchema(Schema schema, Map<String, String> usedImportMappings); Schema unaliasSchema(Schema schema, Map<String, String> usedImportMappings);
public String defaultTemplatingEngine(); String defaultTemplatingEngine();
public GeneratorLanguage generatorLanguage(); GeneratorLanguage generatorLanguage();
/* /*
the version of the language that the generator implements the version of the language that the generator implements
For python 3.9.0, generatorLanguageVersion would be "3.9.0" For python 3.9.0, generatorLanguageVersion would be "3.9.0"
*/ */
public String generatorLanguageVersion(); String generatorLanguageVersion();
List<VendorExtension> getSupportedVendorExtensions();
} }

View File

@ -7407,5 +7407,8 @@ public class DefaultCodegen implements CodegenConfig {
return null; return null;
} }
; @Override
public List<VendorExtension> getSupportedVendorExtensions() {
return new ArrayList<>();
}
} }

View File

@ -0,0 +1,53 @@
package org.openapitools.codegen;
import java.util.Collections;
import java.util.List;
public enum VendorExtension {
X_IMPLEMENTS("x-implements", ExtensionLevel.MODEL, "Ability to specify interfaces that model must implements", "empty array"),
X_SPRING_PAGINATED("x-spring-paginated", ExtensionLevel.OPERATION, "Add org.springframework.data.domain.Pageable to controller method. Can be used to handle page & size query parameters", "false"),
X_DISCRIMINATOR_VALUE("x-discriminator-value", ExtensionLevel.MODEL, "Used with model inheritance to specify value for discriminator that identifies current model", ""),
X_SETTER_EXTRA_ANNOTATION("x-setter-extra-annotation", ExtensionLevel.FIELD, "Custom annotation that can be specified over java setter for specific field", "When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value"),
X_WEBCLIENT_BLOCKING("x-webclient-blocking", ExtensionLevel.OPERATION, "Specifies if method for specific operation should be blocking or non-blocking(ex: return `Mono<T>/Flux<T>` or `return T/List<T>/Set<T>` & execute `.block()` inside generated method)", "false")
;
private final String name;
private final List<ExtensionLevel> levels;
private final String description;
private final String defaultValue;
VendorExtension(final String name, final List<ExtensionLevel> levels, final String description, final String defaultValue) {
this.name = name;
this.levels = levels;
this.description = description;
this.defaultValue = defaultValue;
}
VendorExtension(final String name, final ExtensionLevel level, final String description, final String defaultValue) {
this(name, Collections.singletonList(level), description, defaultValue);
}
public String getName() {
return name;
}
public List<ExtensionLevel> getLevels() {
return levels;
}
public String getDescription() {
return description;
}
public String getDefaultValue() {
return defaultValue;
}
public enum ExtensionLevel {
FIELD,
MODEL,
OPERATION
}
}

View File

@ -2002,4 +2002,12 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
} }
} }
@Override
public List<VendorExtension> getSupportedVendorExtensions() {
List<VendorExtension> extensions = super.getSupportedVendorExtensions();
extensions.add(VendorExtension.X_DISCRIMINATOR_VALUE);
extensions.add(VendorExtension.X_IMPLEMENTS);
extensions.add(VendorExtension.X_SETTER_EXTRA_ANNOTATION);
return extensions;
}
} }

View File

@ -1059,4 +1059,11 @@ public class JavaClientCodegen extends AbstractJavaCodegen
} }
} }
} }
@Override
public List<VendorExtension> getSupportedVendorExtensions() {
List<VendorExtension> extensions = super.getSupportedVendorExtensions();
extensions.add(VendorExtension.X_WEBCLIENT_BLOCKING);
return extensions;
}
} }

View File

@ -48,6 +48,7 @@ import org.openapitools.codegen.CodegenResponse;
import org.openapitools.codegen.CodegenSecurity; import org.openapitools.codegen.CodegenSecurity;
import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.VendorExtension;
import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.BeanValidationFeatures;
import org.openapitools.codegen.languages.features.DocumentationProviderFeatures; import org.openapitools.codegen.languages.features.DocumentationProviderFeatures;
import org.openapitools.codegen.languages.features.OptionalFeatures; import org.openapitools.codegen.languages.features.OptionalFeatures;
@ -983,4 +984,11 @@ public class SpringCodegen extends AbstractJavaCodegen
public void setUseSwaggerUI(boolean useSwaggerUI) { public void setUseSwaggerUI(boolean useSwaggerUI) {
this.useSwaggerUI = useSwaggerUI; this.useSwaggerUI = useSwaggerUI;
} }
@Override
public List<VendorExtension> getSupportedVendorExtensions() {
List<VendorExtension> extensions = super.getSupportedVendorExtensions();
extensions.add(VendorExtension.X_SPRING_PAGINATED);
return extensions;
}
} }