From 72a5547ae5f268b65d2c80040bacecfee4f27a1a Mon Sep 17 00:00:00 2001 From: Pavel Slabko Date: Thu, 12 Feb 2026 12:56:04 +0100 Subject: [PATCH 1/2] update python sdk Strip any directory traversal --- docs/generators/crystal.md | 4 +- docs/generators/groovy.md | 2 - docs/generators/java-camel.md | 6 +- docs/generators/java-dubbo.md | 2 - docs/generators/java-helidon-client.md | 2 - docs/generators/java-helidon-server.md | 2 - docs/generators/java-inflector.md | 2 - docs/generators/java-micronaut-client.md | 2 - docs/generators/java-micronaut-server.md | 2 - docs/generators/java-microprofile.md | 2 - docs/generators/java-msf4j.md | 2 - docs/generators/java-pkmst.md | 2 - docs/generators/java-play-framework.md | 2 - docs/generators/java-undertow-server.md | 2 - docs/generators/java-vertx-web.md | 2 - docs/generators/java-vertx.md | 2 - docs/generators/java-wiremock.md | 2 - docs/generators/java.md | 2 - docs/generators/jaxrs-cxf-cdi.md | 2 - docs/generators/jaxrs-cxf-client.md | 2 - docs/generators/jaxrs-cxf-extended.md | 2 - docs/generators/jaxrs-cxf.md | 2 - docs/generators/jaxrs-jersey.md | 2 - docs/generators/jaxrs-resteasy-eap.md | 2 - docs/generators/jaxrs-resteasy.md | 2 - docs/generators/jaxrs-spec.md | 2 - docs/generators/kotlin-server.md | 7 +- docs/generators/kotlin-spring.md | 6 +- docs/generators/protobuf-schema.md | 1 - docs/generators/python-fastapi.md | 2 +- docs/generators/spring.md | 6 +- docs/generators/swift5.md | 2 +- docs/generators/typescript-angular.md | 4 +- docs/generators/typescript-axios.md | 2 +- docs/generators/typescript.md | 1 - .../main/resources/python/api_client.mustache | 2 +- samples/client/others/c/bearerAuth/README.md | 2 +- .../c/bearerAuth/include/keyValuePair.h | 17 -- .../petstore/ada/.openapi-generator/VERSION | 2 +- .../src/client/samples-petstore-clients.adb | 2 +- .../src/client/samples-petstore-clients.ads | 2 +- .../ada/src/model/samples-petstore-models.adb | 2 +- .../ada/src/model/samples-petstore-models.ads | 2 +- .../petstore/apex/.openapi-generator/VERSION | 2 +- samples/client/petstore/bash/docs/Name.md | 13 - .../c-useJsonUnformatted/model/order.c | 233 ------------------ samples/client/petstore/c/model/category.h | 40 --- .../.openapi-generator/VERSION | 2 +- .../avro-schema/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../fastendpoints/.openapi-generator/VERSION | 2 +- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Program.cs | 33 --- .../Formatters/InputFormatterStream.cs | 45 ---- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Startup.cs | 150 ----------- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Program.cs | 33 --- .../src/Org.OpenAPITools/Program.cs | 33 --- .../Formatters/InputFormatterStream.cs | 45 ---- .../src/Org.OpenAPITools/Program.cs | 33 --- .../model/Category.cpp | 144 ----------- .../model/OuterType.cpp | 94 ------- 74 files changed, 30 insertions(+), 1272 deletions(-) diff --git a/docs/generators/crystal.md b/docs/generators/crystal.md index ea2b3cc400db..ba481b67e4da 100644 --- a/docs/generators/crystal.md +++ b/docs/generators/crystal.md @@ -94,7 +94,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • if
  • in
  • include
  • -
  • instance_sizeof
  • +
  • instance
  • is_a?
  • lib
  • macro
  • @@ -102,11 +102,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • next
  • nil
  • nil?
  • -
  • object_id
  • of
  • out
  • pointerof
  • -
  • previous_def
  • private
  • protected
  • require
  • diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index d5cdff849435..e2f1314c4bb1 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -30,12 +30,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 0651cc84e31d..b50d9b4728c1 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -44,13 +44,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |configPackage|configuration package for generated code| |org.openapitools.configuration| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |delegatePattern|Whether to generate the server files using the delegate pattern| |false| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| @@ -87,7 +85,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |resourceFolder|resource folder for generated resources| |src/main/resources| |responseWrapper|wrap the responses in given type (Future, Callable, CompletableFuture,ListenableFuture, DeferredResult, RxObservable, RxSingle or fully qualified type)| |null| |returnSuccessCode|Generated server returns 2xx code| |false| -|schemaImplements|Ability to supply interfaces per schema that should be implemented (serves similar purpose as vendor extension `x-implements`, but is fully decoupled from the api spec). Example: yaml `schemaImplements: {Pet: com.some.pack.WithId, Category: [com.some.pack.CategoryInterface], Dog: [com.some.pack.Canine, com.some.pack.OtherInterface]}` implements interfaces in schemas `Pet` (interface `com.some.pack.WithId`), `Category` (interface `com.some.pack.CategoryInterface`), `Dog`(interfaces `com.some.pack.Canine`, `com.some.pack.OtherInterface`)| |empty map| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| @@ -112,14 +109,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useOptional|Use Optional container for optional parameters| |false| |useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true| |useSealed|Whether to generate sealed model interfaces and classes| |false| -|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false| +|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false| |useSpringBuiltInValidation|Disable `@Validated` at the class level when using built-in validation.| |false| |useSpringController|Annotate the generated API as a Spring Controller| |false| |useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true| |useTags|use tags for creating interface and controller classnames| |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| -|xImplementsSkip|Ability to choose interfaces that should NOT be implemented in the models despite their presence in vendor extension `x-implements`. Takes a list of fully qualified interface names. Example: yaml `xImplementsSkip: [com.some.pack.WithPhotoUrls]` skips implementing the interface `com.some.pack.WithPhotoUrls` in any schema| |empty list| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/java-dubbo.md b/docs/generators/java-dubbo.md index 2ea83de8db02..fa64f3d35955 100644 --- a/docs/generators/java-dubbo.md +++ b/docs/generators/java-dubbo.md @@ -34,12 +34,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |configPackage|configuration package for generated code| |org.openapitools.configuration| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md index 06f803388070..5f309c81ce6b 100644 --- a/docs/generators/java-helidon-client.md +++ b/docs/generators/java-helidon-client.md @@ -33,8 +33,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |configKey|Config key in @RegisterRestClient. Default to none.| |null| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md index f456ed9ce064..b4d8db132743 100644 --- a/docs/generators/java-helidon-server.md +++ b/docs/generators/java-helidon-server.md @@ -32,8 +32,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 7054f33501ac..3adfffad38df 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 645025f315d8..37a2d8907ee1 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -41,12 +41,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |dateFormat|Specify the format pattern of date as a string| |null| |dateLibrary|Option. Date library to use|
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| |datetimeFormat|Specify the format pattern of date-time as a string| |null| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 73fb9dd977ad..4a21268afbd5 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -36,12 +36,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |dateFormat|Specify the format pattern of date as a string| |null| |dateLibrary|Option. Date library to use|
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| |datetimeFormat|Specify the format pattern of date-time as a string| |null| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-microprofile.md b/docs/generators/java-microprofile.md index 7f87f275d343..9e02b37145ef 100644 --- a/docs/generators/java-microprofile.md +++ b/docs/generators/java-microprofile.md @@ -37,12 +37,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |configKeyFromClassName|If true, set tag as key in @RegisterRestClient. Default to false. Only `microprofile` supports this option.| |null| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 25842d8df871..7251308c1440 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index fc5e849f837b..e2299587c5f2 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -33,12 +33,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index f30134f8ec8c..c5f80ab75d16 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -35,12 +35,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |controllerOnly|Whether to generate only API interface stubs without the server files.| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 1356bc33f589..c258e9aa5df4 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index e4156c53a887..473c40d1af7d 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 5a8d19f0ee4f..dd2722079b63 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java-wiremock.md b/docs/generators/java-wiremock.md index e6f238f31ffc..39b0a40d6edf 100644 --- a/docs/generators/java-wiremock.md +++ b/docs/generators/java-wiremock.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/java.md b/docs/generators/java.md index 85da80e56a9e..b98c5386e4e5 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -37,12 +37,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |configKeyFromClassName|If true, set tag as key in @RegisterRestClient. Default to false. Only `microprofile` supports this option.| |null| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index eb7f94c2993d..02f6b177827e 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index bed567bf4f05..e735d8f0ef4b 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -33,12 +33,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 00971949946b..aeb82d2dce55 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -34,12 +34,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 7325c0b5965b..b9b120e2f8d9 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -34,12 +34,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 59186e03fa91..a5d3e9a3c51a 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index ce5dd75fe065..85a3ea082300 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index f451f945b804..c03831051659 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index a36ac50aef17..03c2d043bf78 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -32,12 +32,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |legacy| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 86859ea27401..733e819e6ce3 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -30,7 +30,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true| |featureMetrics|Enables metrics feature.| |true| |featureResources|Generates routes in a typed way, for both: constructing URLs and reading the parameters.| |true| -|fixJacksonJsonTypeInfoInheritance|When true (default), ensures Jackson polymorphism works correctly by: (1) always setting visible=true on @JsonTypeInfo, and (2) adding the discriminator property to child models with appropriate default values. When false, visible is only set to true if all children already define the discriminator property.| |true| |groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |interfaceOnly|Whether to generate only API interface stubs without the server files. This option is currently supported only when using jaxrs-spec library.| |false| |library|library template (sub-template)|
    **ktor**
    ktor framework
    **ktor2**
    ktor (2.x) framework
    **jaxrs-spec**
    JAX-RS spec only
    **javalin5**
    Javalin 5
    **javalin6**
    Javalin 6
    |ktor| @@ -263,11 +262,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ---- | --------- | ---------- | |Simple|✓|OAS2,OAS3 |Composite|✓|OAS2,OAS3 -|Polymorphism|✓|OAS2,OAS3 +|Polymorphism|✗|OAS2,OAS3 |Union|✗|OAS3 -|allOf|✓|OAS2,OAS3 +|allOf|✗|OAS2,OAS3 |anyOf|✗|OAS3 -|oneOf|✓|OAS3 +|oneOf|✗|OAS3 |not|✗|OAS3 ### Security Feature diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 0c4e836ad7fa..9dfba5d3e6c8 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -43,8 +43,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |parcelizeModels|toggle "@Parcelize" for generated models| |null| |reactive|use coroutines for reactive behavior| |false| |requestMappingMode|Where to generate the class level @RequestMapping annotation.|
    **api_interface**
    Generate the @RequestMapping annotation on the generated Api Interface.
    **controller**
    Generate the @RequestMapping annotation on the generated Api Controller Implementation.
    **none**
    Do not add a class level @RequestMapping annotation.
    |controller| -|schemaImplements|A map of single interface or a list of interfaces per schema name that should be implemented (serves similar purpose as `x-kotlin-implements`, but is fully decoupled from the api spec). Example: yaml `schemaImplements: {Pet: com.some.pack.WithId, Category: [com.some.pack.CategoryInterface], Dog: [com.some.pack.Canine, com.some.pack.OtherInterface]}` implements interfaces in schemas `Pet` (interface `com.some.pack.WithId`), `Category` (interface `com.some.pack.CategoryInterface`), `Dog`(interfaces `com.some.pack.Canine`, `com.some.pack.OtherInterface`)| |empty map| -|schemaImplementsFields|A map of single field or a list of fields per schema name that should be prepended with `override` (serves similar purpose as `x-kotlin-implements-fields`, but is fully decoupled from the api spec). Example: yaml `schemaImplementsFields: {Pet: id, Category: [name, id], Dog: [bark, breed]}` marks fields to be prepended with `override` in schemas `Pet` (field `id`), `Category` (fields `name`, `id`) and `Dog` (fields `bark`, `breed`)| |empty map| |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| |serverPort|configuration the port in which the sever is to run on| |8080| |serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false| @@ -58,11 +56,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useFeignClientUrl|Whether to generate Feign client with url parameter.| |true| |useFlowForArrayReturnType|Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead.| |true| |useResponseEntity|Whether (when false) to return actual type (e.g. List<Fruit>) and handle non-happy path responses via exceptions flow or (when true) return entire ResponseEntity (e.g. ResponseEntity<List<Fruit>>). If disabled, method are annotated using a @ResponseStatus annotation, which has the status of the first response declared in the Api definition| |true| -|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false| +|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false| |useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true| |useTags|Whether to use tags for creating interface and controller class names| |false| -|xKotlinImplementsFieldsSkip|A list of fields per schema name that should NOT be created with `override` keyword despite their presence in vendor extension `x-kotlin-implements-fields` for the schema. Example: yaml `xKotlinImplementsFieldsSkip: Pet: [photoUrls]` skips `override` for `photoUrls` in schema `Pet`| |empty map| -|xKotlinImplementsSkip|A list of fully qualified interfaces that should NOT be implemented despite their presence in vendor extension `x-kotlin-implements`. Example: yaml `xKotlinImplementsSkip: [com.some.pack.WithPhotoUrls]` skips implementing the interface in any schema| |empty list| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index e01683760038..fc8616619336 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -22,7 +22,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |aggregateModelsName|Aggregated model filename. If set, all generated models will be combined into this single file.| |null| |customOptionsApi|Custom options for the api files.| |null| |customOptionsModel|Custom options for the model files.| |null| -|extractEnumsToSeparateFiles|Extract enums to separate protobuf files and import them in models| |false| |numberedFieldNumberList|Field numbers in order.| |false| |startEnumsWithUnspecified|Introduces "UNSPECIFIED" as the first element of enumerations.| |false| |supportMultipleResponses|Support multiple responses| |true| diff --git a/docs/generators/python-fastapi.md b/docs/generators/python-fastapi.md index 4e706a4c1a52..5a87a2fcee28 100644 --- a/docs/generators/python-fastapi.md +++ b/docs/generators/python-fastapi.md @@ -10,7 +10,7 @@ title: Documentation for the python-fastapi Generator | generator stability | BETA | | | generator type | SERVER | | | generator language | Python | | -| generator language version | 3.10 | | +| generator language version | 3.7 | | | generator default templating engine | mustache | | | helpTxt | Generates a Python FastAPI server (beta). Models are defined with the pydantic library | | diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 854118300bda..2af0fe826a3e 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -37,13 +37,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl |configPackage|configuration package for generated code| |org.openapitools.configuration| |containerDefaultToNull|Set containers (array, set, map) default to null| |false| |dateLibrary|Option. Date library to use|
    **joda**
    Joda (for legacy app only)
    **legacy**
    Legacy java.util.Date
    **java8-localdatetime**
    Java 8 using LocalDateTime (for legacy app only)
    **java8**
    Java 8 native JSR310 (preferred for jdk 1.8+)
    |java8| -|defaultToEmptyContainer|Initialize containers (array/set/map) to empty containers instead of null by default. Usage: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#default-values| |null| |delegatePattern|Whether to generate the server files using the delegate pattern| |false| |developerEmail|developer email in generated pom.xml| |team@openapitools.org| |developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| @@ -80,7 +78,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |resourceFolder|resource folder for generated resources| |src/main/resources| |responseWrapper|wrap the responses in given type (Future, Callable, CompletableFuture,ListenableFuture, DeferredResult, RxObservable, RxSingle or fully qualified type)| |null| |returnSuccessCode|Generated server returns 2xx code| |false| -|schemaImplements|Ability to supply interfaces per schema that should be implemented (serves similar purpose as vendor extension `x-implements`, but is fully decoupled from the api spec). Example: yaml `schemaImplements: {Pet: com.some.pack.WithId, Category: [com.some.pack.CategoryInterface], Dog: [com.some.pack.Canine, com.some.pack.OtherInterface]}` implements interfaces in schemas `Pet` (interface `com.some.pack.WithId`), `Category` (interface `com.some.pack.CategoryInterface`), `Dog`(interfaces `com.some.pack.Canine`, `com.some.pack.OtherInterface`)| |empty map| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| @@ -105,14 +102,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useOptional|Use Optional container for optional parameters| |false| |useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true| |useSealed|Whether to generate sealed model interfaces and classes| |false| -|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false| +|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false| |useSpringBuiltInValidation|Disable `@Validated` at the class level when using built-in validation.| |false| |useSpringController|Annotate the generated API as a Spring Controller| |false| |useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true| |useTags|use tags for creating interface and controller classnames| |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| -|xImplementsSkip|Ability to choose interfaces that should NOT be implemented in the models despite their presence in vendor extension `x-implements`. Takes a list of fully qualified interface names. Example: yaml `xImplementsSkip: [com.some.pack.WithPhotoUrls]` skips implementing the interface `com.some.pack.WithPhotoUrls` in any schema| |empty list| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 68376d466186..9d565bf5993f 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -7,7 +7,7 @@ title: Documentation for the swift5 Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | swift5 | pass this to the generate command after -g | -| generator stability | DEPRECATED | | +| generator stability | STABLE | | | generator type | CLIENT | | | generator language | Swift | | | generator default templating engine | mustache | | diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index f9f96573a4af..7d7c88af9979 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -11,7 +11,7 @@ title: Documentation for the typescript-angular Generator | generator type | CLIENT | | | generator language | Typescript | | | generator default templating engine | mustache | | -| helpTxt | Generates a TypeScript Angular (9.x - 21.x) client library. | | +| helpTxt | Generates a TypeScript Angular (9.x - 20.x) client library. | | ## CONFIG OPTIONS These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. @@ -34,7 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |modelSuffix|The suffix of the generated model.| |null| |ngPackagrVersion|The version of ng-packagr compatible with Angular (see ngVersion option).| |null| -|ngVersion|The version of Angular. (At least 9.0.0)| |21.0.0| +|ngVersion|The version of Angular. (At least 9.0.0)| |20.0.0| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 62f77eca1828..269c2b09587e 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -20,7 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| -|axiosVersion|Use this property to override the axios version in package.json| |^1.13.5| +|axiosVersion|Use this property to override the axios version in package.json| |^1.6.1| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
    **false**
    The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
    **true**
    Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
    |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| diff --git a/docs/generators/typescript.md b/docs/generators/typescript.md index 8616f926108d..5634f424a966 100644 --- a/docs/generators/typescript.md +++ b/docs/generators/typescript.md @@ -42,7 +42,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |supportsES6|Generate code that conforms to ES6.| |false| -|typescriptMajorVersion|Specify the major version of TypeScript to use in the client code. Default is 5.| |5| |useErasableSyntax|Use erasable syntax for the generated code. This is a temporary feature and will be removed in the future.| |false| |useInversify|Enable this to generate decorators and service identifiers for the InversifyJS inversion of control container. If you set 'deno' as 'platform', the generator will process this value as 'disable'.| |false| |useObjectParameters|Use aggregate parameter objects as function arguments for api operations instead of passing each parameter as a separate function argument.| |false| diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 6a75de836518..8997e839ea0c 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -724,7 +724,7 @@ class ApiClient: content_disposition ) assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) + filename = os.path.basename(m.group(1)) # Strip any directory traversal path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: diff --git a/samples/client/others/c/bearerAuth/README.md b/samples/client/others/c/bearerAuth/README.md index fb04f51e2c7a..2875a52718b2 100644 --- a/samples/client/others/c/bearerAuth/README.md +++ b/samples/client/others/c/bearerAuth/README.md @@ -5,7 +5,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 0.1.9 - Package version: -- Generator version: 7.20.0-SNAPSHOT +- Generator version: 7.19.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.CLibcurlClientCodegen ## Installation diff --git a/samples/client/others/c/bearerAuth/include/keyValuePair.h b/samples/client/others/c/bearerAuth/include/keyValuePair.h index cb839f29cdcf..e69de29bb2d1 100644 --- a/samples/client/others/c/bearerAuth/include/keyValuePair.h +++ b/samples/client/others/c/bearerAuth/include/keyValuePair.h @@ -1,17 +0,0 @@ -#ifndef _keyValuePair_H_ -#define _keyValuePair_H_ - -#include - -typedef struct keyValuePair_t { - char* key; - void* value; -} keyValuePair_t; - -keyValuePair_t *keyValuePair_create(char *key, void *value); - -keyValuePair_t* keyValuePair_create_allocate(char* key, double value); - -void keyValuePair_free(keyValuePair_t *keyValuePair); - -#endif /* _keyValuePair_H_ */ \ No newline at end of file diff --git a/samples/client/petstore/ada/.openapi-generator/VERSION b/samples/client/petstore/ada/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/client/petstore/ada/.openapi-generator/VERSION +++ b/samples/client/petstore/ada/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb index 1ae7faf60e86..03cbbb4abc2f 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb @@ -4,7 +4,7 @@ -- The version of the OpenAPI document: 1.0.0 -- -- --- NOTE: This package is auto generated by OpenAPI-Generator 7.20.0-SNAPSHOT. +-- NOTE: This package is auto generated by OpenAPI-Generator 7.19.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads index 36fa9c1fe37c..9939509f8a12 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads @@ -4,7 +4,7 @@ -- The version of the OpenAPI document: 1.0.0 -- -- --- NOTE: This package is auto generated by OpenAPI-Generator 7.20.0-SNAPSHOT. +-- NOTE: This package is auto generated by OpenAPI-Generator 7.19.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.adb b/samples/client/petstore/ada/src/model/samples-petstore-models.adb index e4a88a95e039..6e96402c2a80 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.adb +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.adb @@ -4,7 +4,7 @@ -- The version of the OpenAPI document: 1.0.0 -- -- --- NOTE: This package is auto generated by OpenAPI-Generator 7.20.0-SNAPSHOT. +-- NOTE: This package is auto generated by OpenAPI-Generator 7.19.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.ads b/samples/client/petstore/ada/src/model/samples-petstore-models.ads index f4e05c36ca48..1a72c99d4f72 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.ads +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.ads @@ -4,7 +4,7 @@ -- The version of the OpenAPI document: 1.0.0 -- -- --- NOTE: This package is auto generated by OpenAPI-Generator 7.20.0-SNAPSHOT. +-- NOTE: This package is auto generated by OpenAPI-Generator 7.19.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/client/petstore/bash/docs/Name.md b/samples/client/petstore/bash/docs/Name.md index 295812c7bb7e..e69de29bb2d1 100644 --- a/samples/client/petstore/bash/docs/Name.md +++ b/samples/client/petstore/bash/docs/Name.md @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **integer** | | [default to null] -**snakeUnderscorecase** | **integer** | | [optional] [readonly] [default to null] -**property** | **string** | | [optional] [default to null] -**123Number** | **integer** | | [optional] [readonly] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/c-useJsonUnformatted/model/order.c b/samples/client/petstore/c-useJsonUnformatted/model/order.c index d67d1d47c714..e69de29bb2d1 100644 --- a/samples/client/petstore/c-useJsonUnformatted/model/order.c +++ b/samples/client/petstore/c-useJsonUnformatted/model/order.c @@ -1,233 +0,0 @@ -#include -#include -#include -#include "order.h" - - -char* order_status_ToString(openapi_petstore_order_STATUS_e status) { - char* statusArray[] = { "NULL", "placed", "approved", "delivered" }; - return statusArray[status]; -} - -openapi_petstore_order_STATUS_e order_status_FromString(char* status){ - int stringToReturn = 0; - char *statusArray[] = { "NULL", "placed", "approved", "delivered" }; - size_t sizeofArray = sizeof(statusArray) / sizeof(statusArray[0]); - while(stringToReturn < sizeofArray) { - if(strcmp(status, statusArray[stringToReturn]) == 0) { - return stringToReturn; - } - stringToReturn++; - } - return 0; -} - -static order_t *order_create_internal( - long id, - long pet_id, - int quantity, - char *ship_date, - openapi_petstore_order_STATUS_e status, - int complete - ) { - order_t *order_local_var = malloc(sizeof(order_t)); - if (!order_local_var) { - return NULL; - } - order_local_var->id = id; - order_local_var->pet_id = pet_id; - order_local_var->quantity = quantity; - order_local_var->ship_date = ship_date; - order_local_var->status = status; - order_local_var->complete = complete; - - order_local_var->_library_owned = 1; - return order_local_var; -} - -__attribute__((deprecated)) order_t *order_create( - long id, - long pet_id, - int quantity, - char *ship_date, - openapi_petstore_order_STATUS_e status, - int complete - ) { - return order_create_internal ( - id, - pet_id, - quantity, - ship_date, - status, - complete - ); -} - -void order_free(order_t *order) { - if(NULL == order){ - return ; - } - if(order->_library_owned != 1){ - fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "order_free"); - return ; - } - listEntry_t *listEntry; - if (order->ship_date) { - free(order->ship_date); - order->ship_date = NULL; - } - free(order); -} - -cJSON *order_convertToJSON(order_t *order) { - cJSON *item = cJSON_CreateObject(); - - // order->id - if(order->id) { - if(cJSON_AddNumberToObject(item, "id", order->id) == NULL) { - goto fail; //Numeric - } - } - - - // order->pet_id - if(order->pet_id) { - if(cJSON_AddNumberToObject(item, "petId", order->pet_id) == NULL) { - goto fail; //Numeric - } - } - - - // order->quantity - if(order->quantity) { - if(cJSON_AddNumberToObject(item, "quantity", order->quantity) == NULL) { - goto fail; //Numeric - } - } - - - // order->ship_date - if(order->ship_date) { - if(cJSON_AddStringToObject(item, "shipDate", order->ship_date) == NULL) { - goto fail; //Date-Time - } - } - - - // order->status - if(order->status != openapi_petstore_order_STATUS_NULL) { - if(cJSON_AddStringToObject(item, "status", order_status_ToString(order->status)) == NULL) - { - goto fail; //Enum - } - } - - - // order->complete - if(order->complete) { - if(cJSON_AddBoolToObject(item, "complete", order->complete) == NULL) { - goto fail; //Bool - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -order_t *order_parseFromJSON(cJSON *orderJSON){ - - order_t *order_local_var = NULL; - - // order->id - cJSON *id = cJSON_GetObjectItemCaseSensitive(orderJSON, "id"); - if (cJSON_IsNull(id)) { - id = NULL; - } - if (id) { - if(!cJSON_IsNumber(id)) - { - goto end; //Numeric - } - } - - // order->pet_id - cJSON *pet_id = cJSON_GetObjectItemCaseSensitive(orderJSON, "petId"); - if (cJSON_IsNull(pet_id)) { - pet_id = NULL; - } - if (pet_id) { - if(!cJSON_IsNumber(pet_id)) - { - goto end; //Numeric - } - } - - // order->quantity - cJSON *quantity = cJSON_GetObjectItemCaseSensitive(orderJSON, "quantity"); - if (cJSON_IsNull(quantity)) { - quantity = NULL; - } - if (quantity) { - if(!cJSON_IsNumber(quantity)) - { - goto end; //Numeric - } - } - - // order->ship_date - cJSON *ship_date = cJSON_GetObjectItemCaseSensitive(orderJSON, "shipDate"); - if (cJSON_IsNull(ship_date)) { - ship_date = NULL; - } - if (ship_date) { - if(!cJSON_IsString(ship_date) && !cJSON_IsNull(ship_date)) - { - goto end; //DateTime - } - } - - // order->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(orderJSON, "status"); - if (cJSON_IsNull(status)) { - status = NULL; - } - openapi_petstore_order_STATUS_e statusVariable; - if (status) { - if(!cJSON_IsString(status)) - { - goto end; //Enum - } - statusVariable = order_status_FromString(status->valuestring); - } - - // order->complete - cJSON *complete = cJSON_GetObjectItemCaseSensitive(orderJSON, "complete"); - if (cJSON_IsNull(complete)) { - complete = NULL; - } - if (complete) { - if(!cJSON_IsBool(complete)) - { - goto end; //Bool - } - } - - - order_local_var = order_create_internal ( - id ? id->valuedouble : 0, - pet_id ? pet_id->valuedouble : 0, - quantity ? quantity->valuedouble : 0, - ship_date && !cJSON_IsNull(ship_date) ? strdup(ship_date->valuestring) : NULL, - status ? statusVariable : openapi_petstore_order_STATUS_NULL, - complete ? complete->valueint : 0 - ); - - return order_local_var; -end: - return NULL; - -} diff --git a/samples/client/petstore/c/model/category.h b/samples/client/petstore/c/model/category.h index bd27e27e35a3..e69de29bb2d1 100644 --- a/samples/client/petstore/c/model/category.h +++ b/samples/client/petstore/c/model/category.h @@ -1,40 +0,0 @@ -/* - * category.h - * - * A category for a pet - */ - -#ifndef _category_H_ -#define _category_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct category_t category_t; - - - - -typedef struct category_t { - long id; //numeric - char *name; // string - - int _library_owned; // Is the library responsible for freeing this object? -} category_t; - -__attribute__((deprecated)) category_t *category_create( - long id, - char *name -); - -void category_free(category_t *category); - -category_t *category_parseFromJSON(cJSON *categoryJSON); - -cJSON *category_convertToJSON(category_t *category); - -#endif /* _category_H_ */ - diff --git a/samples/openapi3/schema/petstore/avro-schema-issue6268/.openapi-generator/VERSION b/samples/openapi3/schema/petstore/avro-schema-issue6268/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/openapi3/schema/petstore/avro-schema-issue6268/.openapi-generator/VERSION +++ b/samples/openapi3/schema/petstore/avro-schema-issue6268/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION +++ b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/openapi3/schema/valid-enums/avro-schema-enum/.openapi-generator/VERSION b/samples/openapi3/schema/valid-enums/avro-schema-enum/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/openapi3/schema/valid-enums/avro-schema-enum/.openapi-generator/VERSION +++ b/samples/openapi3/schema/valid-enums/avro-schema-enum/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnet/fastendpoints-useApiVersioning/.openapi-generator/VERSION b/samples/server/petstore/aspnet/fastendpoints-useApiVersioning/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/server/petstore/aspnet/fastendpoints-useApiVersioning/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnet/fastendpoints-useApiVersioning/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnet/fastendpoints-useAuthentication/.openapi-generator/VERSION b/samples/server/petstore/aspnet/fastendpoints-useAuthentication/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/server/petstore/aspnet/fastendpoints-useAuthentication/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnet/fastendpoints-useAuthentication/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnet/fastendpoints-useProblemDetails/.openapi-generator/VERSION b/samples/server/petstore/aspnet/fastendpoints-useProblemDetails/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/server/petstore/aspnet/fastendpoints-useProblemDetails/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnet/fastendpoints-useProblemDetails/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnet/fastendpoints-useRecords/.openapi-generator/VERSION b/samples/server/petstore/aspnet/fastendpoints-useRecords/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/server/petstore/aspnet/fastendpoints-useRecords/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnet/fastendpoints-useRecords/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnet/fastendpoints-useResponseCaching/.openapi-generator/VERSION b/samples/server/petstore/aspnet/fastendpoints-useResponseCaching/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/server/petstore/aspnet/fastendpoints-useResponseCaching/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnet/fastendpoints-useResponseCaching/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnet/fastendpoints-useValidators/.openapi-generator/VERSION b/samples/server/petstore/aspnet/fastendpoints-useValidators/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/server/petstore/aspnet/fastendpoints-useValidators/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnet/fastendpoints-useValidators/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnet/fastendpoints/.openapi-generator/VERSION b/samples/server/petstore/aspnet/fastendpoints/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/server/petstore/aspnet/fastendpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnet/fastendpoints/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 18796da30fcb..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -1,45 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -using System; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Formatters; - -namespace Org.OpenAPITools.Formatters -{ - /// - public class InputFormatterStream : InputFormatter - { - /// - public InputFormatterStream() - { - SupportedMediaTypes.Add("application/octet-stream"); - SupportedMediaTypes.Add("image/jpeg"); - } - - /// - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } - - /// - protected override bool CanReadType(Type type) - { - if (type == typeof(Stream)) - { - return true; - } - - return false; - } - } -} \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Startup.cs b/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Startup.cs index bf30e991889e..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Startup.cs +++ b/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Startup.cs @@ -1,150 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -using System; -using System.IO; -using System.Reflection; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.OpenApi.Models; -using System.Text.Json; -using System.Text.Json.Serialization; -using Org.OpenAPITools.Authentication; -using Org.OpenAPITools.Filters; -using Org.OpenAPITools.OpenApi; -using Org.OpenAPITools.Formatters; - -namespace Org.OpenAPITools -{ - /// - /// Startup - /// - public class Startup - { - /// - /// Constructor - /// - /// - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - /// - /// The application configuration. - /// - public IConfiguration Configuration { get; } - - /// - /// This method gets called by the runtime. Use this method to add services to the container. - /// - /// - public void ConfigureServices(IServiceCollection services) - { - services.AddTransient(); - services.AddAuthorization(authConfig => - { - authConfig.AddPolicy("api_key", policyBuilder => - { - policyBuilder - .AddRequirements(new ApiKeyRequirement(new[] { "my-secret-key" },"api_key")); - }); - }); - - // Add framework services. - services - // Don't need the full MVC stack for an API, see https://andrewlock.net/comparing-startup-between-the-asp-net-core-3-templates/ - .AddControllers(options => { - options.InputFormatters.Insert(0, new InputFormatterStream()); - }) - .AddJsonOptions(options => - { - options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; - options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase)); - }); - services - .AddSwaggerGen(c => - { - c.EnableAnnotations(enableAnnotationsForInheritance: true, enableAnnotationsForPolymorphism: true); - - c.SwaggerDoc("1.0.0", new OpenApiInfo - { - Title = "OpenAPI Petstore", - Description = "OpenAPI Petstore (ASP.NET Core 8.0)", - TermsOfService = new Uri("https://github.com/openapitools/openapi-generator"), - Contact = new OpenApiContact - { - Name = "OpenAPI-Generator Contributors", - Url = new Uri("https://github.com/openapitools/openapi-generator"), - Email = "" - }, - License = new OpenApiLicense - { - Name = "NoLicense", - Url = new Uri("https://www.apache.org/licenses/LICENSE-2.0.html") - }, - Version = "1.0.0", - }); - c.CustomSchemaIds(type => type.FriendlyId(true)); - c.IncludeXmlComments($"{AppContext.BaseDirectory}{Path.DirectorySeparatorChar}{Assembly.GetExecutingAssembly().GetName().Name}.xml"); - // Sets the basePath property in the OpenAPI document generated - c.DocumentFilter("/v2"); - - // Include DataAnnotation attributes on Controller Action parameters as OpenAPI validation rules (e.g required, pattern, ..) - // Use [ValidateModelState] on Actions to actually validate it in C# as well! - c.OperationFilter(); - }); - } - - /// - /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - /// - /// - /// - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseHsts(); - } - - app.UseHttpsRedirection(); - app.UseDefaultFiles(); - app.UseStaticFiles(); - app.UseSwagger(c => - { - c.RouteTemplate = "openapi/{documentName}/openapi.json"; - }) - .UseSwaggerUI(c => - { - // set route prefix to openapi, e.g. http://localhost:8080/openapi/index.html - c.RoutePrefix = "openapi"; - //TODO: Either use the SwaggerGen generated OpenAPI contract (generated from C# classes) - c.SwaggerEndpoint("/openapi/1.0.0/openapi.json", "OpenAPI Petstore"); - - //TODO: Or alternatively use the original OpenAPI contract that's included in the static files - // c.SwaggerEndpoint("/openapi-original.json", "OpenAPI Petstore Original"); - }); - app.UseRouting(); - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-project4Models/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-8.0-project4Models/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-project4Models/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-8.0-project4Models/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 18796da30fcb..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -1,45 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -using System; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Formatters; - -namespace Org.OpenAPITools.Formatters -{ - /// - public class InputFormatterStream : InputFormatter - { - /// - public InputFormatterStream() - { - SupportedMediaTypes.Add("application/octet-stream"); - SupportedMediaTypes.Add("image/jpeg"); - } - - /// - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } - - /// - protected override bool CanReadType(Type type) - { - if (type == typeof(Stream)) - { - return true; - } - - return false; - } - } -} \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/Program.cs index 00ed16ed6758..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/Program.cs @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Org.OpenAPITools -{ - /// - /// Program - /// - public class Program - { - /// - /// Main - /// - /// - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Create the host builder. - /// - /// - /// IHostBuilder - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup() - .UseUrls("http://0.0.0.0:8080/"); - }); - } -} diff --git a/samples/server/petstore/cpp-pistache-everything/model/Category.cpp b/samples/server/petstore/cpp-pistache-everything/model/Category.cpp index bd76b4cd6630..e69de29bb2d1 100644 --- a/samples/server/petstore/cpp-pistache-everything/model/Category.cpp +++ b/samples/server/petstore/cpp-pistache-everything/model/Category.cpp @@ -1,144 +0,0 @@ -/** -* OpenAPI Petstore -* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -* -* The version of the OpenAPI document: 1.0.0 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - - -#include "Category.h" -#include "Helpers.h" - -#include - -namespace org::openapitools::server::model -{ - -Category::Category() -{ - m_Id = 0L; - m_IdIsSet = false; - m_Name = ""; - m_NameIsSet = false; - -} - -void Category::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { - throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool Category::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool Category::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Category" : pathPrefix; - - - if (nameIsSet()) - { - const std::string& value = m_Name; - const std::string currentValuePath = _pathPrefix + ".name"; - - - - } - - return success; -} - -bool Category::operator==(const Category& rhs) const -{ - return - - - - ((!idIsSet() && !rhs.idIsSet()) || (idIsSet() && rhs.idIsSet() && getId() == rhs.getId())) && - - - ((!nameIsSet() && !rhs.nameIsSet()) || (nameIsSet() && rhs.nameIsSet() && getName() == rhs.getName())) - - ; -} - -bool Category::operator!=(const Category& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const Category& o) -{ - j = nlohmann::json::object(); - if(o.idIsSet()) - j["id"] = o.m_Id; - if(o.nameIsSet()) - j["name"] = o.m_Name; - -} - -void from_json(const nlohmann::json& j, Category& o) -{ - if(j.find("id") != j.end()) - { - j.at("id").get_to(o.m_Id); - o.m_IdIsSet = true; - } - if(j.find("name") != j.end()) - { - j.at("name").get_to(o.m_Name); - o.m_NameIsSet = true; - } - -} - -int64_t Category::getId() const -{ - return m_Id; -} -void Category::setId(int64_t const value) -{ - m_Id = value; - m_IdIsSet = true; -} -bool Category::idIsSet() const -{ - return m_IdIsSet; -} -void Category::unsetId() -{ - m_IdIsSet = false; -} -std::string Category::getName() const -{ - return m_Name; -} -void Category::setName(std::string const& value) -{ - m_Name = value; - m_NameIsSet = true; -} -bool Category::nameIsSet() const -{ - return m_NameIsSet; -} -void Category::unsetName() -{ - m_NameIsSet = false; -} - - -} // namespace org::openapitools::server::model - diff --git a/samples/server/petstore/cpp-pistache-nested-schema-refs/model/OuterType.cpp b/samples/server/petstore/cpp-pistache-nested-schema-refs/model/OuterType.cpp index f3cc1f8076b4..e69de29bb2d1 100644 --- a/samples/server/petstore/cpp-pistache-nested-schema-refs/model/OuterType.cpp +++ b/samples/server/petstore/cpp-pistache-nested-schema-refs/model/OuterType.cpp @@ -1,94 +0,0 @@ -/** -* Test swagger file -* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -* -* The version of the OpenAPI document: 1.0.0 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - - -#include "OuterType.h" -#include "Helpers.h" - -#include - -namespace org::openapitools::server::model -{ - -OuterType::OuterType() -{ - -} - -void OuterType::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { - throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool OuterType::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool OuterType::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "OuterType" : pathPrefix; - - - if (!m_Middle.validate(msg, _pathPrefix + ".middle")) { - msg << _pathPrefix << ": Middle is invalid;"; - success = false; - } - return success; -} - -bool OuterType::operator==(const OuterType& rhs) const -{ - return - - - (getMiddle() == rhs.getMiddle()) - - - ; -} - -bool OuterType::operator!=(const OuterType& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const OuterType& o) -{ - j = nlohmann::json::object(); - j["middle"] = o.m_Middle; - -} - -void from_json(const nlohmann::json& j, OuterType& o) -{ - j.at("middle").get_to(o.m_Middle); - -} - -org::openapitools::server::model::MiddleType OuterType::getMiddle() const -{ - return m_Middle; -} -void OuterType::setMiddle(org::openapitools::server::model::MiddleType const& value) -{ - m_Middle = value; -} - - -} // namespace org::openapitools::server::model - From 215cb98b49f665d630f8af23686d47000a8875e2 Mon Sep 17 00:00:00 2001 From: Pavel Slabko Date: Thu, 12 Feb 2026 15:14:37 +0100 Subject: [PATCH 2/2] rebased --- .../c/bearerAuth/include/keyValuePair.h | 17 + .../classes/OASResponseMock.cls-meta.xml | 5 - samples/client/petstore/bash/docs/File.md | 10 - .../c-useJsonUnformatted/docs/category.md | 11 - .../src/Org.OpenAPITools/Program.cs | 33 + .../Properties/launchSettings.json | 37 - .../src/Org.OpenAPITools/Program.cs | 33 + .../Properties/launchSettings.json | 37 - .../src/Org.OpenAPITools/Program.cs | 33 + .../Properties/launchSettings.json | 37 - .../src/Org.OpenAPITools/Program.cs | 33 + .../wwwroot/openapi-original.json | 1203 ----------------- .../src/Org.OpenAPITools/Dockerfile | 32 - .../src/Org.OpenAPITools/Dockerfile | 32 - .../src/Org.OpenAPITools/Startup.cs | 155 --- .../src/Org.OpenAPITools/Program.cs | 33 + .../Properties/launchSettings.json | 37 - .../Properties/launchSettings.json | 37 - .../src/Org.OpenAPITools/Startup.cs | 150 ++ .../Org.OpenAPITools/Org.OpenAPITools.csproj | 28 - .../src/Org.OpenAPITools/Program.cs | 33 + .../src/Org.OpenAPITools/wwwroot/README.md | 42 - .../appsettings.Development.json | 9 - .../src/Org.OpenAPITools/Program.cs | 33 + .../src/Org.OpenAPITools/wwwroot/README.md | 42 - .../.openapi-generator/VERSION | 2 +- .../Formatters/InputFormatterStream.cs | 45 + .../src/Org.OpenAPITools/Program.cs | 33 + .../wwwroot/openapi-original.json | 1203 ----------------- .../server/petstore/cpp-oatpp/model/Tag.hpp | 51 - .../model/OuterType.cpp | 94 ++ .../petstore/cpp-pistache/model/Category.cpp | 135 -- 32 files changed, 571 insertions(+), 3144 deletions(-) diff --git a/samples/client/others/c/bearerAuth/include/keyValuePair.h b/samples/client/others/c/bearerAuth/include/keyValuePair.h index e69de29bb2d1..cb839f29cdcf 100644 --- a/samples/client/others/c/bearerAuth/include/keyValuePair.h +++ b/samples/client/others/c/bearerAuth/include/keyValuePair.h @@ -0,0 +1,17 @@ +#ifndef _keyValuePair_H_ +#define _keyValuePair_H_ + +#include + +typedef struct keyValuePair_t { + char* key; + void* value; +} keyValuePair_t; + +keyValuePair_t *keyValuePair_create(char *key, void *value); + +keyValuePair_t* keyValuePair_create_allocate(char* key, double value); + +void keyValuePair_free(keyValuePair_t *keyValuePair); + +#endif /* _keyValuePair_H_ */ \ No newline at end of file diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASResponseMock.cls-meta.xml b/samples/client/petstore/apex/force-app/main/default/classes/OASResponseMock.cls-meta.xml index fec71a26693f..e69de29bb2d1 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/OASResponseMock.cls-meta.xml +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASResponseMock.cls-meta.xml @@ -1,5 +0,0 @@ - - - 42.0 - Active - diff --git a/samples/client/petstore/bash/docs/File.md b/samples/client/petstore/bash/docs/File.md index 17f714698588..e69de29bb2d1 100644 --- a/samples/client/petstore/bash/docs/File.md +++ b/samples/client/petstore/bash/docs/File.md @@ -1,10 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **string** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/c-useJsonUnformatted/docs/category.md b/samples/client/petstore/c-useJsonUnformatted/docs/category.md index 33db81b79684..e69de29bb2d1 100644 --- a/samples/client/petstore/c-useJsonUnformatted/docs/category.md +++ b/samples/client/petstore/c-useJsonUnformatted/docs/category.md @@ -1,11 +0,0 @@ -# category_t - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **long** | | [optional] -**name** | **char \*** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Program.cs index e69de29bb2d1..00ed16ed6758 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Org.OpenAPITools +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Properties/launchSettings.json b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Properties/launchSettings.json index 99cfeea4b919..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Properties/launchSettings.json +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Properties/launchSettings.json @@ -1,37 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:61788", - "sslPort": 44301 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "openapi", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "OpenAPI": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "openapi", - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/openapi", - "publishAllPorts": true, - "useSSL": true - } - } -} diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Program.cs index e69de29bb2d1..00ed16ed6758 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Org.OpenAPITools +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Properties/launchSettings.json b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Properties/launchSettings.json index 99cfeea4b919..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Properties/launchSettings.json +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Properties/launchSettings.json @@ -1,37 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:61788", - "sslPort": 44301 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "openapi", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "OpenAPI": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "openapi", - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/openapi", - "publishAllPorts": true, - "useSSL": true - } - } -} diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Program.cs index e69de29bb2d1..00ed16ed6758 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Org.OpenAPITools +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Properties/launchSettings.json b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Properties/launchSettings.json index 99cfeea4b919..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Properties/launchSettings.json +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Properties/launchSettings.json @@ -1,37 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:61788", - "sslPort": 44301 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "openapi", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "OpenAPI": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "openapi", - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/openapi", - "publishAllPorts": true, - "useSSL": true - } - } -} diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Program.cs index e69de29bb2d1..00ed16ed6758 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Org.OpenAPITools +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/wwwroot/openapi-original.json index b47dce3d2c68..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1,1203 +0,0 @@ -{ - "openapi" : "3.0.0", - "info" : { - "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", - "license" : { - "name" : "Apache-2.0", - "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "title" : "OpenAPI Petstore", - "version" : "1.0.0" - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - }, - "servers" : [ { - "url" : "http://petstore.swagger.io/v2" - } ], - "tags" : [ { - "description" : "Everything about your Pets", - "name" : "pet" - }, { - "description" : "Access to Petstore orders", - "name" : "store" - }, { - "description" : "Operations about user", - "name" : "user" - } ], - "paths" : { - "/test" : { - "get" : { - "parameters" : [ { - "explode" : true, - "in" : "query", - "name" : "testQuery", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TestEnum" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "description" : "OK" - } - }, - "summary" : "Test API" - } - }, - "/pet" : { - "post" : { - "description" : "", - "operationId" : "addPet", - "requestBody" : { - "$ref" : "#/components/requestBodies/Pet" - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Add a new pet to the store", - "tags" : [ "pet" ] - }, - "put" : { - "description" : "", - "operationId" : "updatePet", - "requestBody" : { - "$ref" : "#/components/requestBodies/Pet" - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Update an existing pet", - "tags" : [ "pet" ] - } - }, - "/pet/findByStatus" : { - "get" : { - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "parameters" : [ { - "deprecated" : true, - "description" : "Status values that need to be considered for filter", - "explode" : false, - "in" : "query", - "name" : "status", - "required" : true, - "schema" : { - "items" : { - "default" : "available", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "read:pets" ] - } ], - "summary" : "Finds Pets by status", - "tags" : [ "pet" ] - } - }, - "/pet/findByTags" : { - "get" : { - "deprecated" : true, - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "parameters" : [ { - "description" : "Tags to filter by", - "explode" : false, - "in" : "query", - "name" : "tags", - "required" : true, - "schema" : { - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "read:pets" ] - } ], - "summary" : "Finds Pets by tags", - "tags" : [ "pet" ] - } - }, - "/pet/{petId}" : { - "delete" : { - "description" : "", - "operationId" : "deletePet", - "parameters" : [ { - "explode" : false, - "in" : "header", - "name" : "api_key", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "simple" - }, { - "description" : "Pet id to delete", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Deletes a pet", - "tags" : [ "pet" ] - }, - "get" : { - "description" : "Returns a single pet", - "operationId" : "getPetById", - "parameters" : [ { - "description" : "ID of pet to return", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Find pet by ID", - "tags" : [ "pet" ] - }, - "post" : { - "description" : "", - "operationId" : "updatePetWithForm", - "parameters" : [ { - "description" : "ID of pet that needs to be updated", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/updatePetWithForm_request" - } - } - } - }, - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Updates a pet in the store with form data", - "tags" : [ "pet" ] - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "description" : "", - "operationId" : "uploadFile", - "parameters" : [ { - "description" : "ID of pet to update", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "$ref" : "#/components/schemas/uploadFile_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ApiResponse" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "uploads an image", - "tags" : [ "pet" ] - } - }, - "/store/inventory" : { - "get" : { - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "additionalProperties" : { - "format" : "int32", - "type" : "integer" - }, - "type" : "object" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Returns pet inventories by status", - "tags" : [ "store" ] - } - }, - "/store/order" : { - "post" : { - "description" : "", - "operationId" : "placeOrder", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "order placed for purchasing the pet", - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid Order" - } - }, - "summary" : "Place an order for a pet", - "tags" : [ "store" ] - } - }, - "/store/order/{orderId}" : { - "delete" : { - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "parameters" : [ { - "description" : "ID of the order that needs to be deleted", - "explode" : false, - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "summary" : "Delete purchase order by ID", - "tags" : [ "store" ] - }, - "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", - "operationId" : "getOrderById", - "parameters" : [ { - "description" : "ID of pet that needs to be fetched", - "explode" : false, - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "format" : "int64", - "maximum" : 5, - "minimum" : 1, - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "summary" : "Find purchase order by ID", - "tags" : [ "store" ] - } - }, - "/user" : { - "post" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Created user object", - "required" : true - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Create user", - "tags" : [ "user" ] - } - }, - "/user/createWithArray" : { - "post" : { - "description" : "", - "operationId" : "createUsersWithArrayInput", - "requestBody" : { - "$ref" : "#/components/requestBodies/UserArray" - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ] - } - }, - "/user/createWithList" : { - "post" : { - "description" : "", - "operationId" : "createUsersWithListInput", - "requestBody" : { - "$ref" : "#/components/requestBodies/UserArray" - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ] - } - }, - "/user/login" : { - "get" : { - "description" : "", - "operationId" : "loginUser", - "parameters" : [ { - "description" : "The user name for login", - "explode" : true, - "in" : "query", - "name" : "username", - "required" : true, - "schema" : { - "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", - "type" : "string" - }, - "style" : "form" - }, { - "description" : "The password for login in clear text", - "explode" : true, - "in" : "query", - "name" : "password", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "successful operation", - "headers" : { - "Set-Cookie" : { - "description" : "Cookie authentication key for use with the `api_key` apiKey authentication.", - "explode" : false, - "schema" : { - "example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly", - "type" : "string" - }, - "style" : "simple" - }, - "X-Rate-Limit" : { - "description" : "calls per hour allowed by the user", - "explode" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "style" : "simple" - }, - "X-Expires-After" : { - "description" : "date in UTC when token expires", - "explode" : false, - "schema" : { - "format" : "date-time", - "type" : "string" - }, - "style" : "simple" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "summary" : "Logs user into the system", - "tags" : [ "user" ] - } - }, - "/user/logout" : { - "get" : { - "description" : "", - "operationId" : "logoutUser", - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Logs out current logged in user session", - "tags" : [ "user" ] - } - }, - "/user/{username}" : { - "delete" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "parameters" : [ { - "description" : "The name that needs to be deleted", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Delete user", - "tags" : [ "user" ] - }, - "get" : { - "description" : "", - "operationId" : "getUserByName", - "parameters" : [ { - "description" : "The name that needs to be fetched. Use user1 for testing.", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "summary" : "Get user by user name", - "tags" : [ "user" ] - }, - "put" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "parameters" : [ { - "description" : "name that need to be deleted", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Updated user object", - "required" : true - }, - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Updated user", - "tags" : [ "user" ] - } - }, - "/fake/parameter_example_test" : { - "get" : { - "description" : "", - "operationId" : "fake_parameter_example_test", - "parameters" : [ { - "explode" : true, - "in" : "query", - "name" : "data", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/Pet" - }, - "style" : "form" - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "summary" : "fake endpoint to test parameter example (object)", - "tags" : [ "fake" ] - } - }, - "/fake/nullable_example_test" : { - "get" : { - "description" : "", - "operationId" : "fake_nullable_example_test", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TestNullable" - } - } - }, - "description" : "Successful operation" - } - }, - "summary" : "Fake endpoint to test nullable example (object)", - "tags" : [ "fake" ] - } - } - }, - "components" : { - "requestBodies" : { - "UserArray" : { - "content" : { - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true - }, - "Pet" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "Pet object that needs to be added to the store", - "required" : true - } - }, - "schemas" : { - "TestEnum" : { - "enum" : [ "A", "B" ], - "type" : "string" - }, - "TestNullable" : { - "example" : { - "nullableName" : "nullableName", - "name" : "name" - }, - "properties" : { - "name" : { - "type" : "string" - }, - "nullableName" : { - "nullable" : true, - "type" : "string" - } - }, - "type" : "object" - }, - "Order" : { - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "petId" : { - "format" : "int64", - "type" : "integer" - }, - "quantity" : { - "format" : "int32", - "type" : "integer" - }, - "shipDate" : { - "format" : "date-time", - "type" : "string" - }, - "status" : { - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ], - "type" : "string" - }, - "complete" : { - "default" : false, - "type" : "boolean" - } - }, - "title" : "Pet Order", - "type" : "object", - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", - "type" : "string" - } - }, - "title" : "Pet category", - "type" : "object", - "xml" : { - "name" : "Category" - } - }, - "User" : { - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "description" : "User Status", - "format" : "int32", - "type" : "integer" - } - }, - "title" : "a User", - "type" : "object", - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "type" : "object", - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "category" : { - "$ref" : "#/components/schemas/Category" - }, - "name" : { - "example" : "doggie", - "type" : "string" - }, - "photoUrls" : { - "items" : { - "type" : "string" - }, - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - } - }, - "tags" : { - "items" : { - "$ref" : "#/components/schemas/Tag" - }, - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - } - }, - "status" : { - "deprecated" : true, - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - } - }, - "required" : [ "name", "photoUrls" ], - "title" : "a Pet", - "type" : "object", - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - }, - "properties" : { - "code" : { - "format" : "int32", - "type" : "integer" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "type" : "object" - }, - "Dog" : { - "allOf" : [ { - "$ref" : "#/components/schemas/Animal" - }, { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object" - } ] - }, - "Cat" : { - "allOf" : [ { - "$ref" : "#/components/schemas/Animal" - }, { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object" - } ] - }, - "Animal" : { - "discriminator" : { - "mapping" : { - "DOG" : "#/components/schemas/Dog", - "CAT" : "#/components/schemas/Cat" - }, - "propertyName" : "className" - }, - "properties" : { - "className" : { - "type" : "string" - }, - "color" : { - "default" : "red", - "type" : "string" - } - }, - "required" : [ "className" ], - "type" : "object" - }, - "updatePetWithForm_request" : { - "properties" : { - "name" : { - "description" : "Updated name of the pet", - "type" : "string" - }, - "status" : { - "description" : "Updated status of the pet", - "type" : "string" - } - }, - "type" : "object" - }, - "uploadFile_request" : { - "properties" : { - "additionalMetadata" : { - "description" : "Additional data to pass to server", - "type" : "string" - }, - "file" : { - "description" : "file to upload", - "format" : "binary", - "type" : "string" - } - }, - "type" : "object" - } - }, - "securitySchemes" : { - "petstore_auth" : { - "flows" : { - "implicit" : { - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - } - }, - "type" : "oauth2" - }, - "api_key" : { - "in" : "header", - "name" : "api_key", - "type" : "apiKey" - } - } - } -} diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Dockerfile b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Dockerfile index 7184e1ece4d0..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Dockerfile +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/Dockerfile @@ -1,32 +0,0 @@ -#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. - -# Container we use for final publish -FROM mcr.microsoft.com/dotnet/core/aspnet:6.0-buster-slim AS base -WORKDIR /app -EXPOSE 80 -EXPOSE 443 - -# Build container -FROM mcr.microsoft.com/dotnet/core/sdk:6.0-buster AS build - -# Copy the code into the container -WORKDIR /src -COPY ["src/Org.OpenAPITools/Org.OpenAPITools.csproj", "Org.OpenAPITools/"] - -# NuGet restore -RUN dotnet restore "Org.OpenAPITools/Org.OpenAPITools.csproj" -COPY ["src/Org.OpenAPITools/", "Org.OpenAPITools/"] - -# Build the API -WORKDIR "Org.OpenAPITools" -RUN dotnet build "Org.OpenAPITools.csproj" -c Release -o /app/build - -# Publish it -FROM build AS publish -RUN dotnet publish "Org.OpenAPITools.csproj" -c Release -o /app/publish - -# Make the final image for publishing -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "Org.OpenAPITools.dll"] diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Dockerfile b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Dockerfile index 7184e1ece4d0..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Dockerfile +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Dockerfile @@ -1,32 +0,0 @@ -#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. - -# Container we use for final publish -FROM mcr.microsoft.com/dotnet/core/aspnet:6.0-buster-slim AS base -WORKDIR /app -EXPOSE 80 -EXPOSE 443 - -# Build container -FROM mcr.microsoft.com/dotnet/core/sdk:6.0-buster AS build - -# Copy the code into the container -WORKDIR /src -COPY ["src/Org.OpenAPITools/Org.OpenAPITools.csproj", "Org.OpenAPITools/"] - -# NuGet restore -RUN dotnet restore "Org.OpenAPITools/Org.OpenAPITools.csproj" -COPY ["src/Org.OpenAPITools/", "Org.OpenAPITools/"] - -# Build the API -WORKDIR "Org.OpenAPITools" -RUN dotnet build "Org.OpenAPITools.csproj" -c Release -o /app/build - -# Publish it -FROM build AS publish -RUN dotnet publish "Org.OpenAPITools.csproj" -c Release -o /app/publish - -# Make the final image for publishing -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "Org.OpenAPITools.dll"] diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Startup.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Startup.cs index aa0b51a62607..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Startup.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Startup.cs @@ -1,155 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -using System; -using System.IO; -using System.Reflection; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.OpenApi.Models; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Serialization; -using Org.OpenAPITools.Authentication; -using Org.OpenAPITools.Filters; -using Org.OpenAPITools.OpenApi; -using Org.OpenAPITools.Formatters; - -namespace Org.OpenAPITools -{ - /// - /// Startup - /// - public class Startup - { - /// - /// Constructor - /// - /// - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - /// - /// The application configuration. - /// - public IConfiguration Configuration { get; } - - /// - /// This method gets called by the runtime. Use this method to add services to the container. - /// - /// - public void ConfigureServices(IServiceCollection services) - { - services.AddTransient(); - services.AddAuthorization(authConfig => - { - authConfig.AddPolicy("api_key", policyBuilder => - { - policyBuilder - .AddRequirements(new ApiKeyRequirement(new[] { "my-secret-key" },"api_key")); - }); - }); - - // Add framework services. - services - // Don't need the full MVC stack for an API, see https://andrewlock.net/comparing-startup-between-the-asp-net-core-3-templates/ - .AddControllers(options => { - options.InputFormatters.Insert(0, new InputFormatterStream()); - }) - .AddNewtonsoftJson(opts => - { - opts.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); - opts.SerializerSettings.Converters.Add(new StringEnumConverter - { - NamingStrategy = new CamelCaseNamingStrategy() - }); - }); - services - .AddSwaggerGen(c => - { - c.EnableAnnotations(enableAnnotationsForInheritance: true, enableAnnotationsForPolymorphism: true); - - c.SwaggerDoc("1.0.0", new OpenApiInfo - { - Title = "OpenAPI Petstore", - Description = "OpenAPI Petstore (ASP.NET Core 6.0)", - TermsOfService = new Uri("https://github.com/openapitools/openapi-generator"), - Contact = new OpenApiContact - { - Name = "OpenAPI-Generator Contributors", - Url = new Uri("https://github.com/openapitools/openapi-generator"), - Email = "" - }, - License = new OpenApiLicense - { - Name = "NoLicense", - Url = new Uri("https://www.apache.org/licenses/LICENSE-2.0.html") - }, - Version = "1.0.0", - }); - c.CustomSchemaIds(type => type.FriendlyId(true)); - c.IncludeXmlComments($"{AppContext.BaseDirectory}{Path.DirectorySeparatorChar}{Assembly.GetExecutingAssembly().GetName().Name}.xml"); - // Sets the basePath property in the OpenAPI document generated - c.DocumentFilter("/v2"); - - // Include DataAnnotation attributes on Controller Action parameters as OpenAPI validation rules (e.g required, pattern, ..) - // Use [ValidateModelState] on Actions to actually validate it in C# as well! - c.OperationFilter(); - }); - services - .AddSwaggerGenNewtonsoftSupport(); - } - - /// - /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - /// - /// - /// - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseHsts(); - } - - app.UseHttpsRedirection(); - app.UseDefaultFiles(); - app.UseStaticFiles(); - app.UseSwagger(c => - { - c.RouteTemplate = "openapi/{documentName}/openapi.json"; - }) - .UseSwaggerUI(c => - { - // set route prefix to openapi, e.g. http://localhost:8080/openapi/index.html - c.RoutePrefix = "openapi"; - //TODO: Either use the SwaggerGen generated OpenAPI contract (generated from C# classes) - c.SwaggerEndpoint("/openapi/1.0.0/openapi.json", "OpenAPI Petstore"); - - //TODO: Or alternatively use the original OpenAPI contract that's included in the static files - // c.SwaggerEndpoint("/openapi-original.json", "OpenAPI Petstore Original"); - }); - app.UseRouting(); - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Program.cs index e69de29bb2d1..00ed16ed6758 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Org.OpenAPITools +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Properties/launchSettings.json b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Properties/launchSettings.json index 99cfeea4b919..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Properties/launchSettings.json +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Properties/launchSettings.json @@ -1,37 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:61788", - "sslPort": 44301 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "openapi", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "OpenAPI": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "openapi", - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/openapi", - "publishAllPorts": true, - "useSSL": true - } - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Properties/launchSettings.json b/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Properties/launchSettings.json index 99cfeea4b919..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Properties/launchSettings.json +++ b/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Properties/launchSettings.json @@ -1,37 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:61788", - "sslPort": 44301 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "openapi", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "OpenAPI": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "openapi", - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/openapi", - "publishAllPorts": true, - "useSSL": true - } - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Startup.cs b/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Startup.cs index e69de29bb2d1..bf30e991889e 100644 --- a/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Startup.cs +++ b/samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse/src/Org.OpenAPITools/Startup.cs @@ -0,0 +1,150 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.IO; +using System.Reflection; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.OpenApi.Models; +using System.Text.Json; +using System.Text.Json.Serialization; +using Org.OpenAPITools.Authentication; +using Org.OpenAPITools.Filters; +using Org.OpenAPITools.OpenApi; +using Org.OpenAPITools.Formatters; + +namespace Org.OpenAPITools +{ + /// + /// Startup + /// + public class Startup + { + /// + /// Constructor + /// + /// + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + /// + /// The application configuration. + /// + public IConfiguration Configuration { get; } + + /// + /// This method gets called by the runtime. Use this method to add services to the container. + /// + /// + public void ConfigureServices(IServiceCollection services) + { + services.AddTransient(); + services.AddAuthorization(authConfig => + { + authConfig.AddPolicy("api_key", policyBuilder => + { + policyBuilder + .AddRequirements(new ApiKeyRequirement(new[] { "my-secret-key" },"api_key")); + }); + }); + + // Add framework services. + services + // Don't need the full MVC stack for an API, see https://andrewlock.net/comparing-startup-between-the-asp-net-core-3-templates/ + .AddControllers(options => { + options.InputFormatters.Insert(0, new InputFormatterStream()); + }) + .AddJsonOptions(options => + { + options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; + options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase)); + }); + services + .AddSwaggerGen(c => + { + c.EnableAnnotations(enableAnnotationsForInheritance: true, enableAnnotationsForPolymorphism: true); + + c.SwaggerDoc("1.0.0", new OpenApiInfo + { + Title = "OpenAPI Petstore", + Description = "OpenAPI Petstore (ASP.NET Core 8.0)", + TermsOfService = new Uri("https://github.com/openapitools/openapi-generator"), + Contact = new OpenApiContact + { + Name = "OpenAPI-Generator Contributors", + Url = new Uri("https://github.com/openapitools/openapi-generator"), + Email = "" + }, + License = new OpenApiLicense + { + Name = "NoLicense", + Url = new Uri("https://www.apache.org/licenses/LICENSE-2.0.html") + }, + Version = "1.0.0", + }); + c.CustomSchemaIds(type => type.FriendlyId(true)); + c.IncludeXmlComments($"{AppContext.BaseDirectory}{Path.DirectorySeparatorChar}{Assembly.GetExecutingAssembly().GetName().Name}.xml"); + // Sets the basePath property in the OpenAPI document generated + c.DocumentFilter("/v2"); + + // Include DataAnnotation attributes on Controller Action parameters as OpenAPI validation rules (e.g required, pattern, ..) + // Use [ValidateModelState] on Actions to actually validate it in C# as well! + c.OperationFilter(); + }); + } + + /// + /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + /// + /// + /// + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseDefaultFiles(); + app.UseStaticFiles(); + app.UseSwagger(c => + { + c.RouteTemplate = "openapi/{documentName}/openapi.json"; + }) + .UseSwaggerUI(c => + { + // set route prefix to openapi, e.g. http://localhost:8080/openapi/index.html + c.RoutePrefix = "openapi"; + //TODO: Either use the SwaggerGen generated OpenAPI contract (generated from C# classes) + c.SwaggerEndpoint("/openapi/1.0.0/openapi.json", "OpenAPI Petstore"); + + //TODO: Or alternatively use the original OpenAPI contract that's included in the static files + // c.SwaggerEndpoint("/openapi-original.json", "OpenAPI Petstore Original"); + }); + app.UseRouting(); + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + }); + } + } +} diff --git a/samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 86fd7d9f65d7..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -1,28 +0,0 @@ - - - A library generated from a OpenAPI doc - No Copyright - OpenAPI - net8.0 - true - true - 1.0.0 - annotations - Org.OpenAPITools - Org.OpenAPITools - cb87e868-8646-48ef-9bb6-344b537d0d37 - Linux - ..\.. - - - - - - - - - - - - - diff --git a/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/Program.cs index e69de29bb2d1..00ed16ed6758 100644 --- a/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Org.OpenAPITools +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/wwwroot/README.md b/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/wwwroot/README.md index 6a0b78471a33..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/wwwroot/README.md +++ b/samples/server/petstore/aspnetcore-8.0-pocoModels/src/Org.OpenAPITools/wwwroot/README.md @@ -1,42 +0,0 @@ -# Welcome to ASP.NET 5 Preview - -We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. - -ASP.NET 5 has been rearchitected to make it **lean** and **composable**. It's fully **open source** and available on [GitHub](http://go.microsoft.com/fwlink/?LinkID=517854). -Your new project automatically takes advantage of modern client-side utilities like [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) and [npm](http://go.microsoft.com/fwlink/?LinkId=518005) (to add client-side libraries) and [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) (for client-side build and automation tasks). - -We hope you enjoy the new capabilities in ASP.NET 5 and Visual Studio 2015. -The ASP.NET Team - -### You've created a new ASP.NET 5 project. [Learn what's new](http://go.microsoft.com/fwlink/?LinkId=518016) - -### This application consists of: -* Sample pages using ASP.NET MVC 6 -* [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side resources -* Theming using [Bootstrap](http://go.microsoft.com/fwlink/?LinkID=398939) - -#### NEW CONCEPTS -* [The 'wwwroot' explained](http://go.microsoft.com/fwlink/?LinkId=518008) -* [Configuration in ASP.NET 5](http://go.microsoft.com/fwlink/?LinkId=518012) -* [Dependency Injection](http://go.microsoft.com/fwlink/?LinkId=518013) -* [Razor TagHelpers](http://go.microsoft.com/fwlink/?LinkId=518014) -* [Manage client packages using Gulp](http://go.microsoft.com/fwlink/?LinkID=517849) -* [Develop on different platforms](http://go.microsoft.com/fwlink/?LinkID=517850) - -#### CUSTOMIZE APP -* [Add Controllers and Views](http://go.microsoft.com/fwlink/?LinkID=398600) -* [Add Data using EntityFramework](http://go.microsoft.com/fwlink/?LinkID=398602) -* [Add Authentication using Identity](http://go.microsoft.com/fwlink/?LinkID=398603) -* [Add real time support using SignalR](http://go.microsoft.com/fwlink/?LinkID=398606) -* [Add Class library](http://go.microsoft.com/fwlink/?LinkID=398604) -* [Add Web APIs with MVC 6](http://go.microsoft.com/fwlink/?LinkId=518009) -* [Add client packages using Bower](http://go.microsoft.com/fwlink/?LinkID=517848) - -#### DEPLOY -* [Run your app locally](http://go.microsoft.com/fwlink/?LinkID=517851) -* [Run your app on ASP.NET Core 5](http://go.microsoft.com/fwlink/?LinkID=517852) -* [Run commands in your 'project.json'](http://go.microsoft.com/fwlink/?LinkID=517853) -* [Publish to Microsoft Azure Web Sites](http://go.microsoft.com/fwlink/?LinkID=398609) -* [Publish to the file system](http://go.microsoft.com/fwlink/?LinkId=518019) - -We would love to hear your [feedback](http://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/samples/server/petstore/aspnetcore-8.0-project4Models/src/Org.OpenAPITools/appsettings.Development.json b/samples/server/petstore/aspnetcore-8.0-project4Models/src/Org.OpenAPITools/appsettings.Development.json index e203e9407e74..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-project4Models/src/Org.OpenAPITools/appsettings.Development.json +++ b/samples/server/petstore/aspnetcore-8.0-project4Models/src/Org.OpenAPITools/appsettings.Development.json @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/Program.cs index e69de29bb2d1..00ed16ed6758 100644 --- a/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Org.OpenAPITools +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/wwwroot/README.md b/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/wwwroot/README.md index 6a0b78471a33..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/wwwroot/README.md +++ b/samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management/src/Org.OpenAPITools/wwwroot/README.md @@ -1,42 +0,0 @@ -# Welcome to ASP.NET 5 Preview - -We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. - -ASP.NET 5 has been rearchitected to make it **lean** and **composable**. It's fully **open source** and available on [GitHub](http://go.microsoft.com/fwlink/?LinkID=517854). -Your new project automatically takes advantage of modern client-side utilities like [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) and [npm](http://go.microsoft.com/fwlink/?LinkId=518005) (to add client-side libraries) and [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) (for client-side build and automation tasks). - -We hope you enjoy the new capabilities in ASP.NET 5 and Visual Studio 2015. -The ASP.NET Team - -### You've created a new ASP.NET 5 project. [Learn what's new](http://go.microsoft.com/fwlink/?LinkId=518016) - -### This application consists of: -* Sample pages using ASP.NET MVC 6 -* [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side resources -* Theming using [Bootstrap](http://go.microsoft.com/fwlink/?LinkID=398939) - -#### NEW CONCEPTS -* [The 'wwwroot' explained](http://go.microsoft.com/fwlink/?LinkId=518008) -* [Configuration in ASP.NET 5](http://go.microsoft.com/fwlink/?LinkId=518012) -* [Dependency Injection](http://go.microsoft.com/fwlink/?LinkId=518013) -* [Razor TagHelpers](http://go.microsoft.com/fwlink/?LinkId=518014) -* [Manage client packages using Gulp](http://go.microsoft.com/fwlink/?LinkID=517849) -* [Develop on different platforms](http://go.microsoft.com/fwlink/?LinkID=517850) - -#### CUSTOMIZE APP -* [Add Controllers and Views](http://go.microsoft.com/fwlink/?LinkID=398600) -* [Add Data using EntityFramework](http://go.microsoft.com/fwlink/?LinkID=398602) -* [Add Authentication using Identity](http://go.microsoft.com/fwlink/?LinkID=398603) -* [Add real time support using SignalR](http://go.microsoft.com/fwlink/?LinkID=398606) -* [Add Class library](http://go.microsoft.com/fwlink/?LinkID=398604) -* [Add Web APIs with MVC 6](http://go.microsoft.com/fwlink/?LinkId=518009) -* [Add client packages using Bower](http://go.microsoft.com/fwlink/?LinkID=517848) - -#### DEPLOY -* [Run your app locally](http://go.microsoft.com/fwlink/?LinkID=517851) -* [Run your app on ASP.NET Core 5](http://go.microsoft.com/fwlink/?LinkID=517852) -* [Run commands in your 'project.json'](http://go.microsoft.com/fwlink/?LinkID=517853) -* [Publish to Microsoft Azure Web Sites](http://go.microsoft.com/fwlink/?LinkID=398609) -* [Publish to the file system](http://go.microsoft.com/fwlink/?LinkId=518019) - -We would love to hear your [feedback](http://go.microsoft.com/fwlink/?LinkId=518015) diff --git a/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/.openapi-generator/VERSION index 193a12d6e891..909dcd0eca63 100644 --- a/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/.openapi-generator/VERSION @@ -1 +1 @@ -7.20.0-SNAPSHOT +7.19.0-SNAPSHOT diff --git a/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index e69de29bb2d1..18796da30fcb 100644 --- a/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-8.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -0,0 +1,45 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.IO; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Formatters; + +namespace Org.OpenAPITools.Formatters +{ + /// + public class InputFormatterStream : InputFormatter + { + /// + public InputFormatterStream() + { + SupportedMediaTypes.Add("application/octet-stream"); + SupportedMediaTypes.Add("image/jpeg"); + } + + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// + protected override bool CanReadType(Type type) + { + if (type == typeof(Stream)) + { + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/Program.cs b/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/Program.cs index e69de29bb2d1..00ed16ed6758 100644 --- a/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/Program.cs +++ b/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/Program.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace Org.OpenAPITools +{ + /// + /// Program + /// + public class Program + { + /// + /// Main + /// + /// + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// Create the host builder. + /// + /// + /// IHostBuilder + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls("http://0.0.0.0:8080/"); + }); + } +} diff --git a/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/wwwroot/openapi-original.json index b47dce3d2c68..e69de29bb2d1 100644 --- a/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-8.0/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1,1203 +0,0 @@ -{ - "openapi" : "3.0.0", - "info" : { - "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", - "license" : { - "name" : "Apache-2.0", - "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "title" : "OpenAPI Petstore", - "version" : "1.0.0" - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - }, - "servers" : [ { - "url" : "http://petstore.swagger.io/v2" - } ], - "tags" : [ { - "description" : "Everything about your Pets", - "name" : "pet" - }, { - "description" : "Access to Petstore orders", - "name" : "store" - }, { - "description" : "Operations about user", - "name" : "user" - } ], - "paths" : { - "/test" : { - "get" : { - "parameters" : [ { - "explode" : true, - "in" : "query", - "name" : "testQuery", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/TestEnum" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "description" : "OK" - } - }, - "summary" : "Test API" - } - }, - "/pet" : { - "post" : { - "description" : "", - "operationId" : "addPet", - "requestBody" : { - "$ref" : "#/components/requestBodies/Pet" - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Add a new pet to the store", - "tags" : [ "pet" ] - }, - "put" : { - "description" : "", - "operationId" : "updatePet", - "requestBody" : { - "$ref" : "#/components/requestBodies/Pet" - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Update an existing pet", - "tags" : [ "pet" ] - } - }, - "/pet/findByStatus" : { - "get" : { - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "parameters" : [ { - "deprecated" : true, - "description" : "Status values that need to be considered for filter", - "explode" : false, - "in" : "query", - "name" : "status", - "required" : true, - "schema" : { - "items" : { - "default" : "available", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "read:pets" ] - } ], - "summary" : "Finds Pets by status", - "tags" : [ "pet" ] - } - }, - "/pet/findByTags" : { - "get" : { - "deprecated" : true, - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "parameters" : [ { - "description" : "Tags to filter by", - "explode" : false, - "in" : "query", - "name" : "tags", - "required" : true, - "schema" : { - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "read:pets" ] - } ], - "summary" : "Finds Pets by tags", - "tags" : [ "pet" ] - } - }, - "/pet/{petId}" : { - "delete" : { - "description" : "", - "operationId" : "deletePet", - "parameters" : [ { - "explode" : false, - "in" : "header", - "name" : "api_key", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "simple" - }, { - "description" : "Pet id to delete", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Deletes a pet", - "tags" : [ "pet" ] - }, - "get" : { - "description" : "Returns a single pet", - "operationId" : "getPetById", - "parameters" : [ { - "description" : "ID of pet to return", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Find pet by ID", - "tags" : [ "pet" ] - }, - "post" : { - "description" : "", - "operationId" : "updatePetWithForm", - "parameters" : [ { - "description" : "ID of pet that needs to be updated", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/updatePetWithForm_request" - } - } - } - }, - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Updates a pet in the store with form data", - "tags" : [ "pet" ] - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "description" : "", - "operationId" : "uploadFile", - "parameters" : [ { - "description" : "ID of pet to update", - "explode" : false, - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "$ref" : "#/components/schemas/uploadFile_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ApiResponse" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "uploads an image", - "tags" : [ "pet" ] - } - }, - "/store/inventory" : { - "get" : { - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "additionalProperties" : { - "format" : "int32", - "type" : "integer" - }, - "type" : "object" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Returns pet inventories by status", - "tags" : [ "store" ] - } - }, - "/store/order" : { - "post" : { - "description" : "", - "operationId" : "placeOrder", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "order placed for purchasing the pet", - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid Order" - } - }, - "summary" : "Place an order for a pet", - "tags" : [ "store" ] - } - }, - "/store/order/{orderId}" : { - "delete" : { - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "parameters" : [ { - "description" : "ID of the order that needs to be deleted", - "explode" : false, - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "summary" : "Delete purchase order by ID", - "tags" : [ "store" ] - }, - "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", - "operationId" : "getOrderById", - "parameters" : [ { - "description" : "ID of pet that needs to be fetched", - "explode" : false, - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "format" : "int64", - "maximum" : 5, - "minimum" : 1, - "type" : "integer" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "summary" : "Find purchase order by ID", - "tags" : [ "store" ] - } - }, - "/user" : { - "post" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Created user object", - "required" : true - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Create user", - "tags" : [ "user" ] - } - }, - "/user/createWithArray" : { - "post" : { - "description" : "", - "operationId" : "createUsersWithArrayInput", - "requestBody" : { - "$ref" : "#/components/requestBodies/UserArray" - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ] - } - }, - "/user/createWithList" : { - "post" : { - "description" : "", - "operationId" : "createUsersWithListInput", - "requestBody" : { - "$ref" : "#/components/requestBodies/UserArray" - }, - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ] - } - }, - "/user/login" : { - "get" : { - "description" : "", - "operationId" : "loginUser", - "parameters" : [ { - "description" : "The user name for login", - "explode" : true, - "in" : "query", - "name" : "username", - "required" : true, - "schema" : { - "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", - "type" : "string" - }, - "style" : "form" - }, { - "description" : "The password for login in clear text", - "explode" : true, - "in" : "query", - "name" : "password", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "successful operation", - "headers" : { - "Set-Cookie" : { - "description" : "Cookie authentication key for use with the `api_key` apiKey authentication.", - "explode" : false, - "schema" : { - "example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly", - "type" : "string" - }, - "style" : "simple" - }, - "X-Rate-Limit" : { - "description" : "calls per hour allowed by the user", - "explode" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "style" : "simple" - }, - "X-Expires-After" : { - "description" : "date in UTC when token expires", - "explode" : false, - "schema" : { - "format" : "date-time", - "type" : "string" - }, - "style" : "simple" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "summary" : "Logs user into the system", - "tags" : [ "user" ] - } - }, - "/user/logout" : { - "get" : { - "description" : "", - "operationId" : "logoutUser", - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Logs out current logged in user session", - "tags" : [ "user" ] - } - }, - "/user/{username}" : { - "delete" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "parameters" : [ { - "description" : "The name that needs to be deleted", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Delete user", - "tags" : [ "user" ] - }, - "get" : { - "description" : "", - "operationId" : "getUserByName", - "parameters" : [ { - "description" : "The name that needs to be fetched. Use user1 for testing.", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "summary" : "Get user by user name", - "tags" : [ "user" ] - }, - "put" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "parameters" : [ { - "description" : "name that need to be deleted", - "explode" : false, - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Updated user object", - "required" : true - }, - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Updated user", - "tags" : [ "user" ] - } - }, - "/fake/parameter_example_test" : { - "get" : { - "description" : "", - "operationId" : "fake_parameter_example_test", - "parameters" : [ { - "explode" : true, - "in" : "query", - "name" : "data", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/Pet" - }, - "style" : "form" - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "summary" : "fake endpoint to test parameter example (object)", - "tags" : [ "fake" ] - } - }, - "/fake/nullable_example_test" : { - "get" : { - "description" : "", - "operationId" : "fake_nullable_example_test", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/TestNullable" - } - } - }, - "description" : "Successful operation" - } - }, - "summary" : "Fake endpoint to test nullable example (object)", - "tags" : [ "fake" ] - } - } - }, - "components" : { - "requestBodies" : { - "UserArray" : { - "content" : { - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true - }, - "Pet" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "Pet object that needs to be added to the store", - "required" : true - } - }, - "schemas" : { - "TestEnum" : { - "enum" : [ "A", "B" ], - "type" : "string" - }, - "TestNullable" : { - "example" : { - "nullableName" : "nullableName", - "name" : "name" - }, - "properties" : { - "name" : { - "type" : "string" - }, - "nullableName" : { - "nullable" : true, - "type" : "string" - } - }, - "type" : "object" - }, - "Order" : { - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "petId" : { - "format" : "int64", - "type" : "integer" - }, - "quantity" : { - "format" : "int32", - "type" : "integer" - }, - "shipDate" : { - "format" : "date-time", - "type" : "string" - }, - "status" : { - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ], - "type" : "string" - }, - "complete" : { - "default" : false, - "type" : "boolean" - } - }, - "title" : "Pet Order", - "type" : "object", - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", - "type" : "string" - } - }, - "title" : "Pet category", - "type" : "object", - "xml" : { - "name" : "Category" - } - }, - "User" : { - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "description" : "User Status", - "format" : "int32", - "type" : "integer" - } - }, - "title" : "a User", - "type" : "object", - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "type" : "object", - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "category" : { - "$ref" : "#/components/schemas/Category" - }, - "name" : { - "example" : "doggie", - "type" : "string" - }, - "photoUrls" : { - "items" : { - "type" : "string" - }, - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - } - }, - "tags" : { - "items" : { - "$ref" : "#/components/schemas/Tag" - }, - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - } - }, - "status" : { - "deprecated" : true, - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - } - }, - "required" : [ "name", "photoUrls" ], - "title" : "a Pet", - "type" : "object", - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - }, - "properties" : { - "code" : { - "format" : "int32", - "type" : "integer" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "type" : "object" - }, - "Dog" : { - "allOf" : [ { - "$ref" : "#/components/schemas/Animal" - }, { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object" - } ] - }, - "Cat" : { - "allOf" : [ { - "$ref" : "#/components/schemas/Animal" - }, { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object" - } ] - }, - "Animal" : { - "discriminator" : { - "mapping" : { - "DOG" : "#/components/schemas/Dog", - "CAT" : "#/components/schemas/Cat" - }, - "propertyName" : "className" - }, - "properties" : { - "className" : { - "type" : "string" - }, - "color" : { - "default" : "red", - "type" : "string" - } - }, - "required" : [ "className" ], - "type" : "object" - }, - "updatePetWithForm_request" : { - "properties" : { - "name" : { - "description" : "Updated name of the pet", - "type" : "string" - }, - "status" : { - "description" : "Updated status of the pet", - "type" : "string" - } - }, - "type" : "object" - }, - "uploadFile_request" : { - "properties" : { - "additionalMetadata" : { - "description" : "Additional data to pass to server", - "type" : "string" - }, - "file" : { - "description" : "file to upload", - "format" : "binary", - "type" : "string" - } - }, - "type" : "object" - } - }, - "securitySchemes" : { - "petstore_auth" : { - "flows" : { - "implicit" : { - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - } - }, - "type" : "oauth2" - }, - "api_key" : { - "in" : "header", - "name" : "api_key", - "type" : "apiKey" - } - } - } -} diff --git a/samples/server/petstore/cpp-oatpp/model/Tag.hpp b/samples/server/petstore/cpp-oatpp/model/Tag.hpp index f7941e8e3911..e69de29bb2d1 100644 --- a/samples/server/petstore/cpp-oatpp/model/Tag.hpp +++ b/samples/server/petstore/cpp-oatpp/model/Tag.hpp @@ -1,51 +0,0 @@ -/** -* OpenAPI Petstore -* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -* -* The version of the OpenAPI document: 1.0.0 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ -/* - * Tag.h - * - * A tag for a pet - */ - -#ifndef Tag_H_ -#define Tag_H_ - - -#include "oatpp/core/macro/codegen.hpp" -#include "oatpp/core/Types.hpp" - -namespace org::openapitools::server::model -{ - -/* Begin DTO code-generation */ -#include OATPP_CODEGEN_BEGIN(DTO) - -/** - * Message Data-Transfer-Object - */ -class Tag : public oatpp::DTO { - - DTO_INIT(Tag, DTO /* Extends */) - - DTO_FIELD(oatpp::Int64, id); - DTO_FIELD(oatpp::Boolean, idIsSet); - DTO_FIELD(oatpp::String, name); - DTO_FIELD(oatpp::Boolean, nameIsSet); - -}; - -/* End DTO code-generation */ -#include OATPP_CODEGEN_END(DTO) - - -} // namespace org::openapitools::server::model - -#endif /* Tag_H_ */ diff --git a/samples/server/petstore/cpp-pistache-nested-schema-refs/model/OuterType.cpp b/samples/server/petstore/cpp-pistache-nested-schema-refs/model/OuterType.cpp index e69de29bb2d1..f3cc1f8076b4 100644 --- a/samples/server/petstore/cpp-pistache-nested-schema-refs/model/OuterType.cpp +++ b/samples/server/petstore/cpp-pistache-nested-schema-refs/model/OuterType.cpp @@ -0,0 +1,94 @@ +/** +* Test swagger file +* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + +#include "OuterType.h" +#include "Helpers.h" + +#include + +namespace org::openapitools::server::model +{ + +OuterType::OuterType() +{ + +} + +void OuterType::validate() const +{ + std::stringstream msg; + if (!validate(msg)) + { + throw org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool OuterType::validate(std::stringstream& msg) const +{ + return validate(msg, ""); +} + +bool OuterType::validate(std::stringstream& msg, const std::string& pathPrefix) const +{ + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "OuterType" : pathPrefix; + + + if (!m_Middle.validate(msg, _pathPrefix + ".middle")) { + msg << _pathPrefix << ": Middle is invalid;"; + success = false; + } + return success; +} + +bool OuterType::operator==(const OuterType& rhs) const +{ + return + + + (getMiddle() == rhs.getMiddle()) + + + ; +} + +bool OuterType::operator!=(const OuterType& rhs) const +{ + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const OuterType& o) +{ + j = nlohmann::json::object(); + j["middle"] = o.m_Middle; + +} + +void from_json(const nlohmann::json& j, OuterType& o) +{ + j.at("middle").get_to(o.m_Middle); + +} + +org::openapitools::server::model::MiddleType OuterType::getMiddle() const +{ + return m_Middle; +} +void OuterType::setMiddle(org::openapitools::server::model::MiddleType const& value) +{ + m_Middle = value; +} + + +} // namespace org::openapitools::server::model + diff --git a/samples/server/petstore/cpp-pistache/model/Category.cpp b/samples/server/petstore/cpp-pistache/model/Category.cpp index 489c22157ada..e69de29bb2d1 100644 --- a/samples/server/petstore/cpp-pistache/model/Category.cpp +++ b/samples/server/petstore/cpp-pistache/model/Category.cpp @@ -1,135 +0,0 @@ -/** -* OpenAPI Petstore -* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -* -* The version of the OpenAPI document: 1.0.0 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - - -#include "Category.h" -#include "Helpers.h" - -#include - -namespace org::openapitools::server::model -{ - -Category::Category() -{ - m_Id = 0L; - m_IdIsSet = false; - m_Name = ""; - m_NameIsSet = false; - -} - -void Category::validate() const -{ - std::stringstream msg; - if (!validate(msg)) - { - throw org::openapitools::server::helpers::ValidationException(msg.str()); - } -} - -bool Category::validate(std::stringstream& msg) const -{ - return validate(msg, ""); -} - -bool Category::validate(std::stringstream& msg, const std::string& pathPrefix) const -{ - bool success = true; - const std::string _pathPrefix = pathPrefix.empty() ? "Category" : pathPrefix; - - - return success; -} - -bool Category::operator==(const Category& rhs) const -{ - return - - - - ((!idIsSet() && !rhs.idIsSet()) || (idIsSet() && rhs.idIsSet() && getId() == rhs.getId())) && - - - ((!nameIsSet() && !rhs.nameIsSet()) || (nameIsSet() && rhs.nameIsSet() && getName() == rhs.getName())) - - ; -} - -bool Category::operator!=(const Category& rhs) const -{ - return !(*this == rhs); -} - -void to_json(nlohmann::json& j, const Category& o) -{ - j = nlohmann::json::object(); - if(o.idIsSet()) - j["id"] = o.m_Id; - if(o.nameIsSet()) - j["name"] = o.m_Name; - -} - -void from_json(const nlohmann::json& j, Category& o) -{ - if(j.find("id") != j.end()) - { - j.at("id").get_to(o.m_Id); - o.m_IdIsSet = true; - } - if(j.find("name") != j.end()) - { - j.at("name").get_to(o.m_Name); - o.m_NameIsSet = true; - } - -} - -int64_t Category::getId() const -{ - return m_Id; -} -void Category::setId(int64_t const value) -{ - m_Id = value; - m_IdIsSet = true; -} -bool Category::idIsSet() const -{ - return m_IdIsSet; -} -void Category::unsetId() -{ - m_IdIsSet = false; -} -std::string Category::getName() const -{ - return m_Name; -} -void Category::setName(std::string const& value) -{ - m_Name = value; - m_NameIsSet = true; -} -bool Category::nameIsSet() const -{ - return m_NameIsSet; -} -void Category::unsetName() -{ - m_NameIsSet = false; -} - - -} // namespace org::openapitools::server::model -