diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index b52ce072c0d5..c09be51c16be 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -1,6 +1,7 @@ name: Docker tests on: + workflow_dispatch: push: paths: - Dockerfile @@ -27,7 +28,7 @@ jobs: shell: bash run: | sed -i 's/ -it / /g' run-in-docker.sh - ./run-in-docker.sh mvn clean install + ./run-in-docker.sh mvn -B clean install - name: Build Dockerfile shell: bash diff --git a/.github/workflows/samples-dotnet.yaml b/.github/workflows/samples-dotnet.yaml index 8ee577de2c86..ac957abd3555 100644 --- a/.github/workflows/samples-dotnet.yaml +++ b/.github/workflows/samples-dotnet.yaml @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - name: Build working-directory: ${{ matrix.sample }} run: dotnet build Org.OpenAPITools.sln diff --git a/.github/workflows/samples-java-client-echo-api-jdk11.yaml b/.github/workflows/samples-java-client-echo-api-jdk11.yaml index d32c404a1a71..81ad9aa97bfa 100644 --- a/.github/workflows/samples-java-client-echo-api-jdk11.yaml +++ b/.github/workflows/samples-java-client-echo-api-jdk11.yaml @@ -19,6 +19,7 @@ jobs: - samples/client/echo_api/java/apache-httpclient - samples/client/echo_api/java/native - samples/client/echo_api/java/feign-gson + - samples/client/echo_api/java/resttemplate steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 diff --git a/.github/workflows/samples-java-client-echo-api-jdk8.yaml b/.github/workflows/samples-java-client-echo-api-jdk8.yaml index 5f91e7c8db88..7578af1baa6d 100644 --- a/.github/workflows/samples-java-client-echo-api-jdk8.yaml +++ b/.github/workflows/samples-java-client-echo-api-jdk8.yaml @@ -6,11 +6,13 @@ on: - samples/client/echo_api/java/apache-httpclient/** - samples/client/echo_api/java/feign-gson/** - samples/client/echo_api/java/okhttp-gson/** + - samples/client/echo_api/java/resttemplate/** pull_request: paths: - samples/client/echo_api/java/apache-httpclient/** - samples/client/echo_api/java/feign-gson/** - samples/client/echo_api/java/okhttp-gson/** + - samples/client/echo_api/java/resttemplate/** jobs: build: name: Build Java Client JDK8 @@ -23,6 +25,7 @@ jobs: - samples/client/echo_api/java/apache-httpclient - samples/client/echo_api/java/feign-gson - samples/client/echo_api/java/okhttp-gson + - samples/client/echo_api/java/resttemplate steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 diff --git a/.hub.cli.dockerfile b/.hub.cli.dockerfile index fe18ad8dd3f8..5a3041dc1084 100644 --- a/.hub.cli.dockerfile +++ b/.hub.cli.dockerfile @@ -3,19 +3,19 @@ ## ## You can build _just_ this part with: ## docker --target builder -t container-name:builder -f .hub.cli.dockerfile . -FROM maven:3.6.3-jdk-11-openj9 as builder +FROM maven:3-eclipse-temurin-17 as builder ENV GEN_DIR /opt/openapi-generator WORKDIR ${GEN_DIR} COPY . ${GEN_DIR} # Pre-compile openapi-generator-cli -RUN mvn -am -pl "modules/openapi-generator-cli" package +RUN mvn -B -am -pl "modules/openapi-generator-cli" package ## The final (release) image ## The resulting container here only needs the target jar ## and ca-certificates (to be able to query HTTPS hosted specs) -FROM openjdk:11.0.8-jre-slim-buster +FROM eclipse-temurin:17-jre ENV GEN_DIR /opt/openapi-generator diff --git a/.hub.online.dockerfile b/.hub.online.dockerfile index 4c7e01e3a24a..1d0b3a4aeed6 100644 --- a/.hub.online.dockerfile +++ b/.hub.online.dockerfile @@ -3,18 +3,18 @@ ## ## You can build _just_ this part with: ## docker --target builder -t container-name:builder -f .hub.online.dockerfile . -FROM maven:3.6.3-jdk-11-openj9 as builder +FROM maven:3-eclipse-temurin-17 as builder ENV GEN_DIR /opt/openapi-generator WORKDIR ${GEN_DIR} COPY . ${GEN_DIR} # Pre-compile openapi-generator-online -RUN mvn -am -pl "modules/openapi-generator-online" package +RUN mvn -B -am -pl "modules/openapi-generator-online" package ## The final (release) image ## The resulting container here only needs the target jar -FROM openjdk:11.0.8-jre-slim-buster +FROM eclipse-temurin:17-jre ENV GEN_DIR /opt/openapi-generator ENV TARGET_DIR /generator diff --git a/Dockerfile b/Dockerfile index b1ca47344ed0..163f62d45d4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.6.3-jdk-11-openj9 +FROM maven:3-eclipse-temurin-17 ENV GEN_DIR /opt/openapi-generator WORKDIR ${GEN_DIR} @@ -20,7 +20,7 @@ COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator COPY ./pom.xml ${GEN_DIR} # Pre-compile openapi-generator-cli -RUN mvn -am -pl "modules/openapi-generator-cli" package +RUN mvn -B -am -pl "modules/openapi-generator-cli" package # This exists at the end of the file to benefit from cached layers when modifying docker-entrypoint.sh. COPY docker-entrypoint.sh /usr/local/bin/ diff --git a/bin/configs/csharp-generichost-latest-allOf.yaml b/bin/configs/csharp-generichost-latest-allOf.yaml index e2b84e08d307..90a4f177ce36 100644 --- a/bin/configs/csharp-generichost-latest-allOf.yaml +++ b/bin/configs/csharp-generichost-latest-allOf.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: true + equatable: true diff --git a/bin/configs/csharp-generichost-latest-anyOf.yaml b/bin/configs/csharp-generichost-latest-anyOf.yaml index fc6e4bd4298c..e4b2f31aed28 100644 --- a/bin/configs/csharp-generichost-latest-anyOf.yaml +++ b/bin/configs/csharp-generichost-latest-anyOf.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: true + equatable: true diff --git a/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml b/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml index 392e76b045f1..30c8ad9fcb25 100644 --- a/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml +++ b/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml @@ -10,3 +10,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useSourceGeneration: true packageName: UseSourceGeneration + equatable: true diff --git a/bin/configs/csharp-generichost-latest-nrt.yaml b/bin/configs/csharp-generichost-latest-nrt.yaml index d5b834cf314e..699fd70d3f95 100644 --- a/bin/configs/csharp-generichost-latest-nrt.yaml +++ b/bin/configs/csharp-generichost-latest-nrt.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: true + equatable: true diff --git a/bin/configs/csharp-generichost-latest-oneOf.yaml b/bin/configs/csharp-generichost-latest-oneOf.yaml index 01b2b4d7fcaa..5b38dc3e7fb2 100644 --- a/bin/configs/csharp-generichost-latest-oneOf.yaml +++ b/bin/configs/csharp-generichost-latest-oneOf.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: true + equatable: true diff --git a/bin/configs/csharp-generichost-latest.yaml b/bin/configs/csharp-generichost-latest.yaml index e850d31280c3..82360fcae46f 100644 --- a/bin/configs/csharp-generichost-latest.yaml +++ b/bin/configs/csharp-generichost-latest.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: false + equatable: true diff --git a/bin/configs/csharp-generichost-netstandard2.0.yaml b/bin/configs/csharp-generichost-netstandard2.0.yaml index fbe662deba01..4c9c8828291e 100644 --- a/bin/configs/csharp-generichost-netstandard2.0.yaml +++ b/bin/configs/csharp-generichost-netstandard2.0.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false targetFramework: netstandard2.0 + equatable: true diff --git a/bin/configs/csharp-httpclient-netstandard2.0.yaml b/bin/configs/csharp-httpclient-netstandard2.0.yaml index e431b385e39b..326f8df942b7 100644 --- a/bin/configs/csharp-httpclient-netstandard2.0.yaml +++ b/bin/configs/csharp-httpclient-netstandard2.0.yaml @@ -10,3 +10,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: netstandard2.0 + equatable: true diff --git a/bin/configs/csharp-restsharp-echo-api.yaml b/bin/configs/csharp-restsharp-echo-api.yaml index 3380ae3c3d2c..4d93a0d3562d 100644 --- a/bin/configs/csharp-restsharp-echo-api.yaml +++ b/bin/configs/csharp-restsharp-echo-api.yaml @@ -7,3 +7,4 @@ additionalProperties: targetFramework: net6.0 setCompareNetObjects: "true" hideGenerationTimestamp: "true" + equatable: true diff --git a/bin/configs/csharp-restsharp-net4.7-multipleFrameworks.yaml b/bin/configs/csharp-restsharp-net4.7-multipleFrameworks.yaml index 5176032c265d..9a44c9236166 100644 --- a/bin/configs/csharp-restsharp-net4.7-multipleFrameworks.yaml +++ b/bin/configs/csharp-restsharp-net4.7-multipleFrameworks.yaml @@ -6,3 +6,4 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' targetFramework: netstandard2.1;net47 useCompareNetObjects: "true" + equatable: true diff --git a/bin/configs/csharp-restsharp-net4.7.yaml b/bin/configs/csharp-restsharp-net4.7.yaml index 91985cd8faa0..7222a6bbcee5 100644 --- a/bin/configs/csharp-restsharp-net4.7.yaml +++ b/bin/configs/csharp-restsharp-net4.7.yaml @@ -10,3 +10,4 @@ additionalProperties: useOneOfDiscriminatorLookup: true targetFramework: net47 skipOneOfAnyOfGetter: true + equatable: true diff --git a/bin/configs/csharp-restsharp-net4.8.yaml b/bin/configs/csharp-restsharp-net4.8.yaml index 29c4ac2b8f80..25b55bc3b820 100644 --- a/bin/configs/csharp-restsharp-net4.8.yaml +++ b/bin/configs/csharp-restsharp-net4.8.yaml @@ -9,3 +9,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: net48 + equatable: true diff --git a/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml b/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml index 56af6a800cb7..e58d9e57686a 100644 --- a/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml +++ b/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml @@ -16,3 +16,4 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' hideGenerationTimestamp: "true" targetFramework: net6.0 + equatable: true diff --git a/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml b/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml index 597c7c328c75..7015e00a2779 100644 --- a/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml +++ b/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml @@ -6,3 +6,4 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' targetFramework: net7.0 useCompareNetObjects: "true" + equatable: true diff --git a/bin/configs/csharp-restsharp-net7.0.yaml b/bin/configs/csharp-restsharp-net7.0.yaml index 347ac99a2b35..402113ed6e2f 100644 --- a/bin/configs/csharp-restsharp-net7.0.yaml +++ b/bin/configs/csharp-restsharp-net7.0.yaml @@ -9,3 +9,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: net7.0 + equatable: true diff --git a/bin/configs/csharp-restsharp-netstandard2.0-complexfiles.yaml b/bin/configs/csharp-restsharp-netstandard2.0-complexfiles.yaml index efd6022c6e89..a6782e9387b9 100644 --- a/bin/configs/csharp-restsharp-netstandard2.0-complexfiles.yaml +++ b/bin/configs/csharp-restsharp-netstandard2.0-complexfiles.yaml @@ -6,5 +6,6 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' targetFramework: netstandard2.0 useCompareNetObjects: "true" + equatable: true globalProperties: skipFormModel: "false" diff --git a/bin/configs/csharp-restsharp-netstandard2.0-conditionalSerialization.yaml b/bin/configs/csharp-restsharp-netstandard2.0-conditionalSerialization.yaml index b92f3bac2243..100203b43a69 100644 --- a/bin/configs/csharp-restsharp-netstandard2.0-conditionalSerialization.yaml +++ b/bin/configs/csharp-restsharp-netstandard2.0-conditionalSerialization.yaml @@ -10,3 +10,4 @@ additionalProperties: useOneOfDiscriminatorLookup: true targetFramework: netstandard2.0 conditionalSerialization: true + equatable: true diff --git a/bin/configs/csharp-restsharp-netstandard2.0.yaml b/bin/configs/csharp-restsharp-netstandard2.0.yaml index 994fd0d40647..d4b6d3289833 100644 --- a/bin/configs/csharp-restsharp-netstandard2.0.yaml +++ b/bin/configs/csharp-restsharp-netstandard2.0.yaml @@ -9,3 +9,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: netstandard2.0 + equatable: true diff --git a/bin/configs/csharp-unityWebRequest-netstandard2.0.yaml b/bin/configs/csharp-unityWebRequest-netstandard2.0.yaml index 8005d2ce78a5..0f91232f8e1e 100644 --- a/bin/configs/csharp-unityWebRequest-netstandard2.0.yaml +++ b/bin/configs/csharp-unityWebRequest-netstandard2.0.yaml @@ -6,3 +6,4 @@ templateDir: modules/openapi-generator/src/main/resources/csharp library: unityWebRequest additionalProperties: targetFramework: netstandard2.0 + equatable: true diff --git a/bin/configs/java-resttemplate-echo-api.yaml b/bin/configs/java-resttemplate-echo-api.yaml new file mode 100644 index 000000000000..27e9a63cfa69 --- /dev/null +++ b/bin/configs/java-resttemplate-echo-api.yaml @@ -0,0 +1,10 @@ +generatorName: java +outputDir: samples/client/echo_api/java/resttemplate +library: resttemplate +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: echo-api-resttemplate + hideGenerationTimestamp: "true" + java8: true + containerDefaultToNull: true diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5091cf3996d6..4590b56ce65d 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -4,7 +4,7 @@ set -euo pipefail # GEN_DIR allows to share the entrypoint between Dockerfile and run-in-docker.sh (backward compatible) GEN_DIR=${GEN_DIR:-/opt/openapi-generator} -JAVA_OPTS=${JAVA_OPTS:-"-Xmx1024M -DloggerPath=conf/log4j.properties"} +JAVA_OPTS=${JAVA_OPTS:-"-DloggerPath=conf/log4j.properties"} cli="${GEN_DIR}/modules/openapi-generator-cli" codegen="${cli}/target/openapi-generator-cli.jar" diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 09d2bc30c489..a20d461a484b 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |dateFormat|The default Date format (only `generichost` library supports this option).| |yyyy'-'MM'-'dd| |dateTimeFormat|The default DateTime format (only `generichost` library supports this option).| |yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK| |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| -|equatable|Overrides Equals and GetHashCode methods.| |true| +|equatable|Overrides Equals and GetHashCode methods.| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| |library|HTTP library template (sub-template) to use|
**generichost**
HttpClient with Generic Host dependency injection (https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host) (Experimental. Subject to breaking changes without notice.)
**httpclient**
HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) (Experimental. Subject to breaking changes without notice.)
**unityWebRequest**
UnityWebRequest (...) (Experimental. Subject to breaking changes without notice.)
**restsharp**
RestSharp (https://github.com/restsharp/RestSharp)
|restsharp| @@ -45,7 +45,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |releaseNote|Release note, default to 'Minor update'.| |Minor update| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sourceFolder|source folder for generated code| |src| -|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**netstandard1.3**
.NET Standard 1.3
**netstandard1.4**
.NET Standard 1.4
**netstandard1.5**
.NET Standard 1.5
**netstandard1.6**
.NET Standard 1.6
**netstandard2.0**
.NET Standard 2.0
**netstandard2.1**
.NET Standard 2.1
**net47**
.NET Framework 4.7
**net48**
.NET Framework 4.8
**net6.0**
.NET 6.0 (End of Support 12 November 2024)
**net7.0**
.NET 7.0
|net7.0| +|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**netstandard1.3**
.NET Standard 1.3
**netstandard1.4**
.NET Standard 1.4
**netstandard1.5**
.NET Standard 1.5
**netstandard1.6**
.NET Standard 1.6
**netstandard2.0**
.NET Standard 2.0
**netstandard2.1**
.NET Standard 2.1
**net47**
.NET Framework 4.7
**net48**
.NET Framework 4.8
**net6.0**
.NET 6.0 (End of Support 12 November 2024)
**net7.0**
.NET 7.0
**net8.0**
.NET 8.0
|net8.0| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 582b58938dfa..406344aa082c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4166,6 +4166,9 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo if (original.getExtensions() != null) { property.getVendorExtensions().putAll(original.getExtensions()); } + if (original.getDeprecated() != null) { + property.deprecated = p.getDeprecated(); + } } // set the default value @@ -4656,18 +4659,19 @@ public CodegenOperation fromOperation(String path, bodyParameterName = (String) op.vendorExtensions.get("x-codegen-request-body-name"); } bodyParam = fromRequestBody(requestBody, imports, bodyParameterName); - bodyParam.description = escapeText(requestBody.getDescription()); - postProcessParameter(bodyParam); - - bodyParams.add(bodyParam); - if (prependFormOrBodyParameters) { - allParams.add(bodyParam); - } + if (bodyParam != null) { + bodyParam.description = escapeText(requestBody.getDescription()); + postProcessParameter(bodyParam); + bodyParams.add(bodyParam); + if (prependFormOrBodyParameters) { + allParams.add(bodyParam); + } - // add example - if (schemas != null && !isSkipOperationExample()) { - op.requestBodyExamples = new ExampleGenerator(schemas, this.openAPI).generate(null, new ArrayList<>(getConsumesInfo(this.openAPI, operation)), bodyParam.baseType); + // add example + if (schemas != null && !isSkipOperationExample()) { + op.requestBodyExamples = new ExampleGenerator(schemas, this.openAPI).generate(null, new ArrayList<>(getConsumesInfo(this.openAPI, operation)), bodyParam.baseType); + } } } } @@ -7596,6 +7600,10 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S String name = null; LOGGER.debug("Request body = {}", body); Schema schema = ModelUtils.getSchemaFromRequestBody(body); + if (schema == null) { + LOGGER.error("Schema cannot be null in the request body: {}", body); + return null; + } Schema original = null; // check if it's allOf (only 1 sub schema) with or without default/nullable/etc set in the top level if (ModelUtils.isAllOf(schema) && schema.getAllOf().size() == 1 && @@ -7689,6 +7697,10 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S if (original.getExtensions() != null) { codegenParameter.vendorExtensions.putAll(original.getExtensions()); } + + if (original.getDeprecated() != null) { + codegenParameter.isDeprecated = original.getDeprecated(); + } } return codegenParameter; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index fa33ee56c645..9d1643234f16 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -78,6 +78,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { protected static final String NET_48_OR_LATER = "net48OrLater"; protected static final String NET_60_OR_LATER = "net60OrLater"; protected static final String NET_70_OR_LATER = "net70OrLater"; + protected static final String NET_80_OR_LATER = "net80OrLater"; @SuppressWarnings("hiding") private final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); @@ -91,7 +92,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { FrameworkStrategy.NETFRAMEWORK_4_7, FrameworkStrategy.NETFRAMEWORK_4_8, FrameworkStrategy.NET_6_0, - FrameworkStrategy.NET_7_0 + FrameworkStrategy.NET_7_0, + FrameworkStrategy.NET_8_0 ); private static FrameworkStrategy latestFramework = frameworkStrategies.get(frameworkStrategies.size() - 1); protected final Map frameworks; @@ -114,7 +116,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { protected boolean supportsFileParameters = Boolean.TRUE; protected boolean validatable = Boolean.TRUE; - protected boolean equatable = Boolean.TRUE; + protected boolean equatable = Boolean.FALSE; // By default, generated code is considered public protected boolean nonPublicApi = Boolean.FALSE; @@ -1328,6 +1330,8 @@ private static abstract class FrameworkStrategy { }; static FrameworkStrategy NET_7_0 = new FrameworkStrategy("net7.0", ".NET 7.0", "net7.0", Boolean.FALSE) { }; + static FrameworkStrategy NET_8_0 = new FrameworkStrategy("net8.0", ".NET 8.0", "net8.0", Boolean.FALSE) { + }; protected String name; protected String description; protected String testTargetFramework; @@ -1451,6 +1455,17 @@ protected void configureAdditionalPropertiesForFrameworks(final Map "net8.0".equals(p.name))) { + properties.put(NET_STANDARD_14_OR_LATER, true); + properties.put(NET_STANDARD_15_OR_LATER, true); + properties.put(NET_STANDARD_16_OR_LATER, true); + properties.put(NET_STANDARD_20_OR_LATER, true); + properties.put(NET_STANDARD_21_OR_LATER, true); + properties.put(NET_47_OR_LATER, true); + properties.put(NET_48_OR_LATER, true); + properties.put(NET_60_OR_LATER, true); + properties.put(NET_70_OR_LATER, true); + properties.put(NET_80_OR_LATER, true); } else { throw new RuntimeException("Unhanlded case"); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index fff4b41bb7ab..f2670ba25389 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -31,6 +31,8 @@ import java.io.File; import java.util.*; +import static org.openapitools.codegen.utils.StringUtils.camelize; + public class GoServerCodegen extends AbstractGoCodegen { /** @@ -322,34 +324,77 @@ public ModelsMap postProcessModels(ModelsMap objs) { @Override public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { - objs = super.postProcessOperationsWithModels(objs, allModels); + // TODO: refactor abstractGoCodegen, decouple go client only code and remove this OperationMap objectMap = objs.getOperations(); List operations = objectMap.getOperation(); + for (CodegenOperation operation : operations) { + // http method verb conversion (e.g. PUT => Put) + operation.httpMethod = camelize(operation.httpMethod.toLowerCase(Locale.ROOT)); + } + + // remove model imports to avoid error List> imports = objs.getImports(); if (imports == null) return objs; - // override imports to only include packages for interface parameters - imports.clear(); + Iterator> iterator = imports.iterator(); + while (iterator.hasNext()) { + String _import = iterator.next().get("import"); + if (_import.startsWith(apiPackage)) + iterator.remove(); + } boolean addedTimeImport = false; boolean addedOSImport = false; + boolean addedReflectImport = false; for (CodegenOperation operation : operations) { for (CodegenParameter param : operation.allParams) { // import "os" if the operation uses files - if (!addedOSImport && ("*os.File".equals(param.dataType) || ("[]*os.File".equals(param.dataType)))) { + if (!addedOSImport && ("*os.File".equals(param.dataType) || "[]*os.File".equals(param.dataType))) { imports.add(createMapping("import", "os")); addedOSImport = true; } - // import "time" if the operation has a required time parameter - if (param.required) { - if (!addedTimeImport && "time.Time".equals(param.dataType)) { - imports.add(createMapping("import", "time")); - addedTimeImport = true; - } + // import "time" if the operation has a time parameter. + if (!addedTimeImport && "time.Time".equals(param.dataType)) { + imports.add(createMapping("import", "time")); + addedTimeImport = true; + } + + // import "reflect" package if the parameter is collectionFormat=multi + if (!addedReflectImport && param.isCollectionFormatMulti) { + imports.add(createMapping("import", "reflect")); + addedReflectImport = true; } + + // set x-exportParamName + char nameFirstChar = param.paramName.charAt(0); + if (Character.isUpperCase(nameFirstChar)) { + // First char is already uppercase, just use paramName. + param.vendorExtensions.put("x-export-param-name", param.paramName); + } else { + // It's a lowercase first char, let's convert it to uppercase + StringBuilder sb = new StringBuilder(param.paramName); + sb.setCharAt(0, Character.toUpperCase(nameFirstChar)); + param.vendorExtensions.put("x-export-param-name", sb.toString()); + } + } + + } + + // recursively add import for mapping one type to multiple imports + List> recursiveImports = objs.getImports(); + if (recursiveImports == null) + return objs; + + ListIterator> listIterator = imports.listIterator(); + while (listIterator.hasNext()) { + String _import = listIterator.next().get("import"); + // if the import package happens to be found in the importMapping (key) + // add the corresponding import package to the list + if (importMapping.containsKey(_import)) { + listIterator.add(createMapping("import", importMapping.get(_import))); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 06c645a52549..58830aced886 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -1848,7 +1848,7 @@ public static boolean isAllOf(Schema schema) { * @return true if allOf is not empty */ public static boolean hasAllOf(Schema schema) { - if (schema.getAllOf() != null && !schema.getAllOf().isEmpty()) { + if (schema != null && schema.getAllOf() != null && !schema.getAllOf().isEmpty()) { return true; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/AbstractOpenApiSchema.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/AbstractOpenApiSchema.mustache index e0bcb881ef07..8d11435bef4e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/AbstractOpenApiSchema.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/AbstractOpenApiSchema.mustache @@ -7,8 +7,6 @@ import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model.mustache index 74e462b08e21..3a1cca8d7d4f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model.mustache @@ -13,34 +13,9 @@ import {{import}}; {{#serializableModel}} import java.io.Serializable; {{/serializableModel}} -{{#jackson}} -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -{{#withXml}} -import com.fasterxml.jackson.dataformat.xml.annotation.*; -{{/withXml}} -{{#vendorExtensions.x-has-readonly-properties}} -import com.fasterxml.jackson.annotation.JsonCreator; -{{/vendorExtensions.x-has-readonly-properties}} -{{/jackson}} {{#withXml}} import {{javaxPackage}}.xml.bind.annotation.*; {{/withXml}} -{{#jsonb}} -import java.lang.reflect.Type; -import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; -import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; -import {{javaxPackage}}.json.bind.serializer.DeserializationContext; -import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; -import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; -import {{javaxPackage}}.json.bind.serializer.SerializationContext; -import {{javaxPackage}}.json.stream.JsonGenerator; -import {{javaxPackage}}.json.stream.JsonParser; -import {{javaxPackage}}.json.bind.annotation.JsonbProperty; -{{#vendorExtensions.x-has-readonly-properties}} -import {{javaxPackage}}.json.bind.annotation.JsonbCreator; -{{/vendorExtensions.x-has-readonly-properties}} -{{/jsonb}} {{#parcelableModel}} import android.os.Parcelable; import android.os.Parcel; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelEnum.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelEnum.mustache index f27a8146768d..0a37fc7b0b0d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelEnum.mustache @@ -1,26 +1,14 @@ -{{#jackson}} -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -{{/jackson}} -{{#gson}} import java.io.IOException; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -{{/gson}} /** * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{#gson}} @JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Adapter.class) -{{/gson}} -{{#jsonb}} -@JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) -@JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) -{{/jsonb}} {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} {{#enumDescription}} @@ -40,9 +28,6 @@ import com.google.gson.stream.JsonWriter; this.value = value; } -{{#jackson}} - @JsonValue -{{/jackson}} public {{{dataType}}} getValue() { return value; } @@ -52,9 +37,6 @@ import com.google.gson.stream.JsonWriter; return String.valueOf(value); } -{{#jackson}} - @JsonCreator -{{/jackson}} public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { @@ -63,7 +45,6 @@ import com.google.gson.stream.JsonWriter; } {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} } -{{#gson}} public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}> { @Override @@ -82,28 +63,6 @@ import com.google.gson.stream.JsonWriter; {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = jsonElement.{{#isNumber}}getAsString(){{/isNumber}}{{#isInteger}}getAsInt(){{/isInteger}}{{^isNumber}}{{^isInteger}}getAs{{{dataType}}}(){{/isInteger}}{{/isNumber}}; {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); } -{{/gson}} -{{#jsonb}} - - public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { - @Override - public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { - for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { - if (String.valueOf(b.value).equals(parser.getString())) { - return b; - } - } - {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'");{{/useNullForUnknownEnumValue}} - } - } - - public static final class Serializer implements JsonbSerializer<{{datatypeWithEnum}}> { - @Override - public void serialize({{datatypeWithEnum}} obj, JsonGenerator generator, SerializationContext ctx) { - generator.write(obj.value); - } - } -{{/jsonb}} {{#supportUrlQuery}} /** diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelInnerEnum.mustache index 67d5d04bc301..21336adfa12f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelInnerEnum.mustache @@ -1,13 +1,7 @@ /** * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{#gson}} @JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.Adapter.class) -{{/gson}} -{{#jsonb}} - @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) - @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) -{{/jsonb}} {{#withXml}} @XmlType(name="{{datatypeWithEnum}}") @XmlEnum({{dataType}}.class) @@ -34,9 +28,6 @@ this.value = value; } -{{#jackson}} - @JsonValue -{{/jackson}} public {{{dataType}}} getValue() { return value; } @@ -46,9 +37,6 @@ return String.valueOf(value); } -{{#jackson}} - @JsonCreator -{{/jackson}} public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.{{^isString}}equals{{/isString}}{{#isString}}{{#useEnumCaseInsensitive}}equalsIgnoreCase{{/useEnumCaseInsensitive}}{{^useEnumCaseInsensitive}}equals{{/useEnumCaseInsensitive}}{{/isString}}(value)) { @@ -57,7 +45,6 @@ } {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} } -{{#gson}} public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> { @Override @@ -76,25 +63,4 @@ {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = jsonElement.{{#isNumber}}getAsString(){{/isNumber}}{{#isInteger}}getAsInt(){{/isInteger}}{{^isNumber}}{{^isInteger}}getAs{{{dataType}}}(){{/isInteger}}{{/isNumber}}; {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); } -{{/gson}} -{{#jsonb}} - public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { - @Override - public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { - for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { - if (String.valueOf(b.value).equals(parser.getString())) { - return b; - } - } - {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'");{{/useNullForUnknownEnumValue}} - } - } - - public static final class Serializer implements JsonbSerializer<{{datatypeWithEnum}}> { - @Override - public void serialize({{datatypeWithEnum}} obj, JsonGenerator generator, SerializationContext ctx) { - generator.write(obj.value); - } - } -{{/jsonb}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache index 0573268300e2..fb3d0bce82fa 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache @@ -37,16 +37,6 @@ import {{invokerPackage}}.JSON; @Schema(description = "{{{.}}}") {{/description}} {{/swagger2AnnotationLibrary}} -{{#jackson}} -@JsonPropertyOrder({ -{{#vars}} - {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} -{{/vars}} -}) -{{#isClassnameSanitized}} -@JsonTypeName("{{name}}") -{{/isClassnameSanitized}} -{{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} {{#vendorExtensions.x-class-extra-annotation}} {{{vendorExtensions.x-class-extra-annotation}}} @@ -67,12 +57,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} - {{#gson}} public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; - {{/gson}} - {{#jackson}} - public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; - {{/jackson}} {{#withXml}} {{#isXmlAttribute}} @XmlAttribute(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") @@ -94,26 +79,14 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/isXmlAttribute}} {{/withXml}} - {{#gson}} {{#deprecated}} @Deprecated {{/deprecated}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) - {{/gson}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} - {{#vendorExtensions.x-is-jackson-optional-nullable}} - {{#isContainer}} - private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); - {{/isContainer}} - {{^isContainer}} - private JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; - {{/isContainer}} - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; - {{/vendorExtensions.x-is-jackson-optional-nullable}} {{/vars}} public {{classname}}() { @@ -122,21 +95,18 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens super(); {{/parcelableModel}} {{/parent}} - {{#gson}} {{#discriminator}} {{^discriminator.isEnum}} this.{{{discriminatorName}}} = this.getClass().getSimpleName(); {{/discriminator.isEnum}} {{/discriminator}} - {{/gson}} } {{#vendorExtensions.x-has-readonly-properties}} {{^withXml}} - {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} public {{classname}}( {{#readOnlyVars}} - {{#jsonb}}@JsonbProperty("{{baseName}}"){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} {{/readOnlyVars}} ) { this(); @@ -153,54 +123,27 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { - {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; return this; } {{#isArray}} public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - if (this.{{name}} == null || !this.{{name}}.isPresent()) { - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); - } - try { - this.{{name}}.get().add({{name}}Item); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} if (this.{{name}} == null) { this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; } this.{{name}}.add({{name}}Item); return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} } {{/isArray}} {{#isMap}} public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - if (this.{{name}} == null || !this.{{name}}.isPresent()) { - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); - } - try { - this.{{name}}.get().put(key, {{name}}Item); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} if (this.{{name}} == null) { this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; } this.{{name}}.put(key, {{name}}Item); return this; - {{/vendorExtensions.x-is-jackson-optional-nullable}} } {{/isMap}} @@ -237,9 +180,6 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^required}} @{{javaxPackage}}.annotation.Nullable {{/required}} -{{#jsonb}} - @JsonbProperty("{{baseName}}") -{{/jsonb}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -252,47 +192,15 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} -{{#vendorExtensions.x-is-jackson-optional-nullable}} - {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} - @JsonIgnore -{{/vendorExtensions.x-is-jackson-optional-nullable}} -{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} public {{{datatypeWithEnum}}} {{getter}}() { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} - if ({{name}} == null) { - {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; - } - {{/isReadOnly}} - return {{name}}.orElse(null); - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; - {{/vendorExtensions.x-is-jackson-optional-nullable}} - } - - {{#vendorExtensions.x-is-jackson-optional-nullable}} -{{> jackson_annotations}} - public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { - return {{name}}; - } - {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} - @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) - {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { - {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} - this.{{name}} = {{name}}; } - {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}}{{#deprecated}} @Deprecated +{{/vendorExtensions.x-setter-extra-annotation}}{{#deprecated}} @Deprecated {{/deprecated}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { - {{#vendorExtensions.x-is-jackson-optional-nullable}} - this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); - {{/vendorExtensions.x-is-jackson-optional-nullable}} - {{^vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = {{name}}; - {{/vendorExtensions.x-is-jackson-optional-nullable}} } {{/isReadOnly}} @@ -312,7 +220,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return false; }{{#hasVars}} {{classname}} {{classVarName}} = ({{classname}}) o; - return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{^-last}} && {{/-last}}{{/vars}}{{#isAdditionalPropertiesTrue}}&& Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/isAdditionalPropertiesTrue}}{{#parent}} && super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} @@ -330,7 +238,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return HashCodeBuilder.reflectionHashCode(this); {{/useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}} - return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#isAdditionalPropertiesTrue}}{{#hasVars}}, {{/hasVars}}{{^hasVars}}{{#parent}}, {{/parent}}{{/hasVars}}additionalProperties{{/isAdditionalPropertiesTrue}}); + return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#isAdditionalPropertiesTrue}}{{#hasVars}}, {{/hasVars}}{{^hasVars}}{{#parent}}, {{/parent}}{{/hasVars}}additionalProperties{{/isAdditionalPropertiesTrue}}); {{/useReflectionEqualsHashCode}} }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} @@ -362,7 +270,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + private String toIndentedString(Object o) { if (o == null) { return "null"; } diff --git a/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache b/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache index 8e10231c87eb..052879cf5ec2 100644 --- a/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache @@ -35,10 +35,10 @@ {{/useRestSharp}} {{#useGenericHost}} - - + + {{#supportsRetry}} - + {{/supportsRetry}} {{/useGenericHost}} {{^useGenericHost}} diff --git a/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache b/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache index a5dfece921fe..e6a375fc01f0 100644 --- a/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache @@ -9,7 +9,7 @@ - + diff --git a/modules/openapi-generator/src/main/resources/go-server/api.mustache b/modules/openapi-generator/src/main/resources/go-server/api.mustache index da459dc40e0f..edec16bd4cfa 100644 --- a/modules/openapi-generator/src/main/resources/go-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/api.mustache @@ -28,5 +28,5 @@ type {{classname}}Servicer interface { {{#operations}}{{#operation}} {{#isDeprecated}} // Deprecated {{/isDeprecated}} - {{operationId}}(context.Context{{#allParams}}, {{dataType}}{{/allParams}}) (ImplResponse, error){{/operation}}{{/operations}} + {{operationId}}(context.Context{{#allParams}}, {{#isNullable}}*{{/isNullable}}{{dataType}}{{/allParams}}) (ImplResponse, error){{/operation}}{{/operations}} }{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache b/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache index 448eee3ff760..2e3d91b0ed85 100644 --- a/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache @@ -1,6 +1,7 @@ {{>partial_header}} package {{packageName}} +{{#operations}} import ( "encoding/json" {{#isBodyParam}} @@ -11,6 +12,8 @@ import ( {{/isBodyParam}} "net/http" "strings" +{{#imports}} "{{import}}" + {{/imports}} {{#routers}} {{#mux}} @@ -21,6 +24,7 @@ import ( {{/chi}} {{/routers}} ) +{{/operations}} // {{classname}}Controller binds http requests to an api service and writes the service results to the http response type {{classname}}Controller struct { @@ -204,105 +208,188 @@ func (c *{{classname}}Controller) {{nickname}}(w http.ResponseWriter, r *http.Re {{/isPathParam}} {{#isQueryParam}} {{#isDateTime}} - {{#required}} - if !query.Has("{{baseName}}"){ - c.errorHandler(w, r, &RequiredError{"{{baseName}}"}, nil) - return - } - {{paramName}}Param, err := parseTime(query.Get("{{baseName}}")) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return - } - {{/required}} - {{^required}} - {{paramName}}Param, err := parseTime(query.Get("{{baseName}}")) - if err != nil { + var {{paramName}}Param {{#isNullable}}*{{/isNullable}}time.Time + if query.Has("{{baseName}}"){ + param, err := parseTime(query.Get("{{baseName}}")) + if err != nil { c.errorHandler(w, r, &ParsingError{Err: err}, nil) return + } + + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + } else { + {{#required}} + c.errorHandler(w, r, &RequiredError{"{{baseName}}"}, nil) + return + {{/required}} } - {{/required}} {{/isDateTime}} {{#isNumber}} - {{paramName}}Param, err := parseNumericParameter[float32]( - query.Get("{{baseName}}"),{{#defaultValue}} - WithDefaultOrParse[float32]({{defaultValue}}, parseFloat32),{{/defaultValue}}{{^defaultValue}}{{#required}} - WithRequire[float32](parseFloat32),{{/required}}{{/defaultValue}}{{^defaultValue}}{{^required}} - WithParse[float32](parseFloat32),{{/required}}{{/defaultValue}}{{#minimum}} - WithMinimum[float32]({{minimum}}),{{/minimum}}{{#maximum}} - WithMaximum[float32]({{maximum}}),{{/maximum}} - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var {{paramName}}Param {{#isNullable}}*{{/isNullable}}float32 + if query.Has("{{baseName}}") { + param, err := parseNumericParameter[float32]( + query.Get("{{baseName}}"), + WithParse[float32](parseFloat32),{{#minimum}} + WithMinimum[float32]({{minimum}}),{{/minimum}}{{#maximum}} + WithMaximum[float32]({{maximum}}),{{/maximum}} + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + } else { + {{#required}} + c.errorHandler(w, r, &RequiredError{Field: "{{baseName}}"}, nil) + return + {{/required}} + {{^required}} + {{#defaultValue}} + var param float32 = {{defaultValue}} + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + {{/defaultValue}} + {{/required}} } {{/isNumber}} {{#isFloat}} - {{paramName}}Param, err := parseNumericParameter[float32]( - query.Get("{{baseName}}"),{{#defaultValue}} - WithDefaultOrParse[float32]({{defaultValue}}, parseFloat32),{{/defaultValue}}{{^defaultValue}}{{#required}} - WithRequire[float32](parseFloat32),{{/required}}{{/defaultValue}}{{^defaultValue}}{{^required}} - WithParse[float32](parseFloat32),{{/required}}{{/defaultValue}}{{#minimum}} - WithMinimum[float32]({{minimum}}),{{/minimum}}{{#maximum}} - WithMaximum[float32]({{maximum}}),{{/maximum}} - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var {{paramName}}Param {{#isNullable}}*{{/isNullable}}float32 + if query.Has("{{baseName}}") { + param, err := parseNumericParameter[float32]( + query.Get("{{baseName}}"), + WithParse[float32](parseFloat32),{{#minimum}} + WithMinimum[float32]({{minimum}}),{{/minimum}}{{#maximum}} + WithMaximum[float32]({{maximum}}),{{/maximum}} + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + } else { + {{#required}} + c.errorHandler(w, r, &RequiredError{Field: "{{baseName}}"}, nil) + return + {{/required}} + {{^required}} + {{#defaultValue}} + var param float32 = {{defaultValue}} + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + {{/defaultValue}} + {{/required}} } {{/isFloat}} {{#isDouble}} - {{paramName}}Param, err := parseNumericParameter[float64]( - query.Get("{{baseName}}"),{{#defaultValue}} - WithDefaultOrParse[float64]({{defaultValue}}, parseFloat64),{{/defaultValue}}{{^defaultValue}}{{#required}} - WithRequire[float64](parseFloat64),{{/required}}{{/defaultValue}}{{^defaultValue}}{{^required}} - WithParse[float64](parseFloat64),{{/required}}{{/defaultValue}}{{#minimum}} - WithMinimum[float64]({{minimum}}),{{/minimum}}{{#maximum}} - WithMaximum[float64]({{maximum}}),{{/maximum}} - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var {{paramName}}Param {{#isNullable}}*{{/isNullable}}float64 + if query.Has("{{baseName}}") { + param, err := parseNumericParameter[float64]( + query.Get("{{baseName}}"), + WithParse[float64](parseFloat64),{{#minimum}} + WithMinimum[float64]({{minimum}}),{{/minimum}}{{#maximum}} + WithMaximum[float64]({{maximum}}),{{/maximum}} + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + } else { + {{#required}} + c.errorHandler(w, r, &RequiredError{Field: "{{baseName}}"}, nil) + return + {{/required}} + {{^required}} + {{#defaultValue}} + var param float64 = {{defaultValue}} + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + {{/defaultValue}} + {{/required}} } {{/isDouble}} {{#isLong}} - {{paramName}}Param, err := parseNumericParameter[int64]( - query.Get("{{baseName}}"),{{#defaultValue}} - WithDefaultOrParse[int64]({{defaultValue}}, parseInt64),{{/defaultValue}}{{^defaultValue}}{{#required}} - WithRequire[int64](parseInt64),{{/required}}{{/defaultValue}}{{^defaultValue}}{{^required}} - WithParse[int64](parseInt64),{{/required}}{{/defaultValue}}{{#minimum}} - WithMinimum[int64]({{minimum}}),{{/minimum}}{{#maximum}} - WithMaximum[int64]({{maximum}}),{{/maximum}} - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var {{paramName}}Param {{#isNullable}}*{{/isNullable}}int64 + if query.Has("{{baseName}}") { + param, err := parseNumericParameter[int64]( + query.Get("{{baseName}}"), + WithParse[int64](parseInt64),{{#minimum}} + WithMinimum[int64]({{minimum}}),{{/minimum}}{{#maximum}} + WithMaximum[int64]({{maximum}}),{{/maximum}} + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + } else { + {{#required}} + c.errorHandler(w, r, &RequiredError{Field: "{{baseName}}"}, nil) + return + {{/required}} + {{^required}} + {{#defaultValue}} + var param int64 = {{defaultValue}} + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + {{/defaultValue}} + {{/required}} } {{/isLong}} {{#isInteger}} - {{paramName}}Param, err := parseNumericParameter[int32]( - query.Get("{{baseName}}"),{{#defaultValue}} - WithDefaultOrParse[int32]({{defaultValue}}, parseInt32),{{/defaultValue}}{{^defaultValue}}{{#required}} - WithRequire[int32](parseInt32),{{/required}}{{/defaultValue}}{{^defaultValue}}{{^required}} - WithParse[int32](parseInt32),{{/required}}{{/defaultValue}}{{#minimum}} - WithMinimum[int32]({{minimum}}),{{/minimum}}{{#maximum}} - WithMaximum[int32]({{maximum}}),{{/maximum}} - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var {{paramName}}Param {{#isNullable}}*{{/isNullable}}int32 + if query.Has("{{baseName}}") { + param, err := parseNumericParameter[int32]( + query.Get("{{baseName}}"), + WithParse[int32](parseInt32),{{#minimum}} + WithMinimum[int32]({{minimum}}),{{/minimum}}{{#maximum}} + WithMaximum[int32]({{maximum}}),{{/maximum}} + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + } else { + {{#required}} + c.errorHandler(w, r, &RequiredError{Field: "{{baseName}}"}, nil) + return + {{/required}} + {{^required}} + {{#defaultValue}} + var param int32 = {{defaultValue}} + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + {{/defaultValue}} + {{/required}} } {{/isInteger}} {{#isBoolean}} - {{paramName}}Param, err := parseBoolParameter( - query.Get("{{baseName}}"),{{#defaultValue}} - WithDefaultOrParse[bool]({{defaultValue}}, parseBool),{{/defaultValue}}{{^defaultValue}}{{#required}} - WithRequire[bool](parseBool),{{/required}}{{/defaultValue}}{{^defaultValue}}{{^required}} - WithParse[bool](parseBool),{{/required}}{{/defaultValue}} - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var {{paramName}}Param {{#isNullable}}*{{/isNullable}}bool + if query.Has("{{baseName}}") { + param, err := parseBoolParameter( + query.Get("{{baseName}}"), + WithParse[bool](parseBool),{{#minimum}} + WithMinimum[bool]({{minimum}}),{{/minimum}}{{#maximum}} + WithMaximum[bool]({{maximum}}),{{/maximum}} + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + } else { + {{#required}} + c.errorHandler(w, r, &RequiredError{Field: "{{baseName}}"}, nil) + return + {{/required}} + {{^required}} + {{#defaultValue}} + var param bool = {{defaultValue}} + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + {{/defaultValue}} + {{/required}} } {{/isBoolean}} {{#isArray}} @@ -413,46 +500,23 @@ func (c *{{classname}}Controller) {{nickname}}(w http.ResponseWriter, r *http.Re {{^isBoolean}} {{^isArray}} {{^isDateTime}} - {{#defaultValue}} - {{paramName}}Param := "{{defaultValue}}" + var {{paramName}}Param {{#isNullable}}*{{/isNullable}}{{dataType}} if query.Has("{{baseName}}") { - {{paramName}}Param = {{^isString}}{{dataType}}( {{/isString}}query.Get("{{baseName}}"){{^isString}} ){{/isString}} - } - {{/defaultValue}} - {{^defaultValue}} - {{^required}} - var {{paramName}}Param {{dataType}} - if query.Has("{{baseName}}") { - {{^isEnumOrRef}} - {{paramName}}Param = query.Get("{{baseName}}") - {{/isEnumOrRef}} - {{#isEnumOrRef}} - var err error - {{paramName}}Param, err = New{{dataType}}FromValue(query.Get("{{baseName}}")) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return - } - {{/isEnumOrRef}} - } - {{/required}} - {{#required}} - {{^isEnumOrRef}} - {{paramName}}Param := query.Get("{{baseName}}") - {{/isEnumOrRef}} - {{#isEnumOrRef}} - if !query.Has("{{baseName}}"){ - c.errorHandler(w, r, &RequiredError{"{{baseName}}"}, nil) - return - } - {{paramName}}Param, err := New{{dataType}}FromValue(query.Get("{{baseName}}")) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + param := {{^isString}}{{dataType}}({{/isString}}query.Get("{{baseName}}"){{^isString}}){{/isString}} + + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + } else { + {{#required}} + c.errorHandler(w, r, &RequiredError{Field: "{{baseName}}"}, nil) + return + {{/required}} + {{^required}} + {{#defaultValue}} + param := {{^isString}}{{dataType}}({{/isString}}{{defaultValue}}{{^isString}}){{/isString}} + {{paramName}}Param = {{#isNullable}}&{{/isNullable}}param + {{/defaultValue}} + {{/required}} } - {{/isEnumOrRef}} - {{/required}} - {{/defaultValue}} {{/isDateTime}} {{/isArray}} {{/isBoolean}} @@ -464,15 +528,20 @@ func (c *{{classname}}Controller) {{nickname}}(w http.ResponseWriter, r *http.Re {{/isQueryParam}} {{#isFormParam}} {{#isFile}} + var {{paramName}}Param {{#isArray}}[]*os.File{{/isArray}}{{^isArray}}*os.File{{/isArray}} + { {{#isArray}} - {{paramName}}Param, err := ReadFormFilesToTempFiles(r, "{{baseName}}") - {{/isArray}} - {{^isArray}} - {{paramName}}Param, err := ReadFormFileToTempFile(r, "{{baseName}}") - {{/isArray}} - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + param, err := ReadFormFilesToTempFiles(r, "{{baseName}}") + {{/isArray}} + {{^isArray}} + param, err := ReadFormFileToTempFile(r, "{{baseName}}") + {{/isArray}} + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + {{paramName}}Param = param } {{/isFile}} {{#isLong}}{{#isArray}} diff --git a/modules/openapi-generator/src/main/resources/go-server/service.mustache b/modules/openapi-generator/src/main/resources/go-server/service.mustache index 9fb0f66c0b2c..799c68237397 100644 --- a/modules/openapi-generator/src/main/resources/go-server/service.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/service.mustache @@ -23,7 +23,7 @@ func New{{classname}}Service() {{classname}}Servicer { {{#isDeprecated}} // Deprecated {{/isDeprecated}} -func (s *{{classname}}Service) {{nickname}}(ctx context.Context{{#allParams}}, {{paramName}} {{dataType}}{{/allParams}}) (ImplResponse, error) { +func (s *{{classname}}Service) {{nickname}}(ctx context.Context{{#allParams}}, {{paramName}} {{#isNullable}}*{{/isNullable}}{{dataType}}{{/allParams}}) (ImplResponse, error) { // TODO - update {{nickname}} with the required logic for this service method. // Add {{classFilename}}_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. diff --git a/modules/openapi-generator/src/main/resources/python-pydantic-v1/rest.mustache b/modules/openapi-generator/src/main/resources/python-pydantic-v1/rest.mustache index f49dee2bed49..1d6d255d2cd5 100644 --- a/modules/openapi-generator/src/main/resources/python-pydantic-v1/rest.mustache +++ b/modules/openapi-generator/src/main/resources/python-pydantic-v1/rest.mustache @@ -16,6 +16,18 @@ from {{packageName}}.exceptions import ApiException, UnauthorizedException, Forb logger = logging.getLogger(__name__) +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + class RESTResponse(io.IOBase): @@ -71,17 +83,29 @@ class RESTClientObject: # https pool manager if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + self.pool_manager = SOCKSProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: self.pool_manager = urllib3.PoolManager( num_pools=pools_size, 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 3da894ae0ef6..6744afb40c01 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -289,7 +289,7 @@ class ApiClient: def response_deserialize( self, - response_data=None, + response_data: rest.RESTResponse = None, response_types_map=None ) -> ApiResponse: """Deserializes response into an object. @@ -304,39 +304,29 @@ class ApiClient: # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) return ApiResponse( status_code = response_data.status, diff --git a/modules/openapi-generator/src/main/resources/python/exceptions.mustache b/modules/openapi-generator/src/main/resources/python/exceptions.mustache index 4310da385373..82f9b7da0803 100644 --- a/modules/openapi-generator/src/main/resources/python/exceptions.mustache +++ b/modules/openapi-generator/src/main/resources/python/exceptions.mustache @@ -1,6 +1,9 @@ # coding: utf-8 {{>partial_header}} +from typing import Any, Optional + +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -91,17 +94,56 @@ class ApiKeyError(OpenApiException, KeyError): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" @@ -111,38 +153,30 @@ class ApiException(OpenApiException): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message + class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index bbdaea4b310a..0d575011b268 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -38,7 +38,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} any_of_schemas: List[str] = Literal[{{#lambda.uppercase}}{{{classname}}}{{/lambda.uppercase}}_ANY_OF_SCHEMAS] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } {{#discriminator}} diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index 5eaaf29d2187..1b676e469554 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -82,7 +82,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index 4fb47c8c8747..b87c42cf2b9b 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -34,7 +34,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} one_of_schemas: List[str] = Literal[{{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}}] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } {{#discriminator}} diff --git a/modules/openapi-generator/src/main/resources/python/partial_api.mustache b/modules/openapi-generator/src/main/resources/python/partial_api.mustache index 39f219e58b40..dd3a9a1fa12b 100644 --- a/modules/openapi-generator/src/main/resources/python/partial_api.mustache +++ b/modules/openapi-generator/src/main/resources/python/partial_api.mustache @@ -44,6 +44,9 @@ ) _response_types_map: Dict[str, Optional[str]] = { - {{#returnType}}{{#responses}}{{^isWildcard}}'{{code}}': {{#dataType}}"{{.}}"{{/dataType}}{{^dataType}}None{{/dataType}}{{/isWildcard}}{{^-last}},{{/-last}} - {{/responses}}{{/returnType}} + {{#responses}} + {{^isWildcard}} + '{{code}}': {{#dataType}}"{{.}}"{{/dataType}}{{^dataType}}None{{/dataType}}, + {{/isWildcard}} + {{/responses}} } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/rest.mustache b/modules/openapi-generator/src/main/resources/python/rest.mustache index f72bf6dfd8f5..1fc57bd83e95 100644 --- a/modules/openapi-generator/src/main/resources/python/rest.mustache +++ b/modules/openapi-generator/src/main/resources/python/rest.mustache @@ -11,8 +11,20 @@ import urllib3 from {{packageName}}.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + class RESTResponse(io.IOBase): def __init__(self, resp) -> None: @@ -67,15 +79,27 @@ class RESTClientObject: # https pool manager if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + self.pool_manager = SOCKSProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.ProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: self.pool_manager = urllib3.PoolManager( cert_reqs=cert_reqs, @@ -198,6 +222,15 @@ class RESTClientObject: headers=headers, preload_content=False ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache index b0fb98f45989..a6a13e318204 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache @@ -4,7 +4,7 @@ {{^withSeparateModelsAndApi}} import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; {{#withNodeImports}} // URLSearchParams not necessarily used diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index 9e54f08b30e4..22a113327768 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -4,7 +4,7 @@ {{>licenseInfo}} import type { Configuration } from '{{apiRelativeToRoot}}configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; {{#withNodeImports}} // URLSearchParams not necessarily used @@ -47,7 +47,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur * @deprecated{{/isDeprecated}} * @throws {RequiredError} */ - {{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options: AxiosRequestConfig = {}): Promise => { + {{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options: RawAxiosRequestConfig = {}): Promise => { {{#allParams}} {{#required}} // verify required parameter '{{paramName}}' is not null or undefined @@ -258,7 +258,7 @@ export const {{classname}}Fp = function(configuration?: Configuration) { * @deprecated{{/isDeprecated}} * @throws {RequiredError} */ - async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> { + async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> { const localVarAxiosArgs = await localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['{{classname}}.{{nickname}}']?.[index]?.url; @@ -332,7 +332,7 @@ export interface {{classname}}Interface { * @throws {RequiredError} * @memberof {{classname}}Interface */ - {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; + {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: RawAxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } @@ -398,12 +398,12 @@ export class {{classname}} extends BaseAPI { * @memberof {{classname}} */ {{#useSingleRequestParameter}} - public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig) { + public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: RawAxiosRequestConfig) { return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(this.axios, this.basePath)); } {{/useSingleRequestParameter}} {{^useSingleRequestParameter}} - public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: AxiosRequestConfig) { + public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: RawAxiosRequestConfig) { return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(this.axios, this.basePath)); } {{/useSingleRequestParameter}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache index 21b32eac4e11..d14b428f686f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache @@ -5,7 +5,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, ""); @@ -28,7 +28,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache index c331fba6fdfb..da599f177877 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache @@ -26,7 +26,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 8dbeeaba4ba3..22460ef163ac 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -4725,6 +4725,7 @@ public void testAllOfDefaultEnumType() { Assert.assertFalse(allOfEnumSchemaProperty.isString); Assert.assertFalse(allOfEnumSchemaProperty.isContainer); Assert.assertFalse(allOfEnumSchemaProperty.isPrimitiveType); + Assert.assertTrue(allOfEnumSchemaProperty.deprecated); Assert.assertEquals(allOfEnumSchemaProperty.defaultValue, "null"); } diff --git a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml index b96a62333ed5..9a4bd9546ea4 100644 --- a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml @@ -558,11 +558,31 @@ paths: text/plain: schema: type: string + # To test http bearer auth + /auth/http/bearer: + post: + tags: + - auth + security: + - http_bearer_auth: [] + summary: To test HTTP bearer authentication + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer + responses: + '200': + description: Successful operation + content: + text/plain: + schema: + type: string components: securitySchemes: http_auth: type: http scheme: basic + http_bearer_auth: + type: http + scheme: bearer requestBodies: Pet: content: diff --git a/modules/openapi-generator/src/test/resources/3_0/go-server/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/go-server/petstore.yaml index 90dca1b2166f..1f944b460185 100644 --- a/modules/openapi-generator/src/test/resources/3_0/go-server/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/go-server/petstore.yaml @@ -117,6 +117,53 @@ paths: security: - petstore_auth: - 'read:pets' + /pet/searchPetWithManyFilters: + get: + tags: + - pet + summary: Search Pets by filters + description: >- + Search endpoint + operationId: searchPet + parameters: + - name: age + in: query + description: age of the pet + schema: + type: integer + format: int64 + nullable: true + - name: price + in: query + description: Price of the pet + schema: + type: number + nullable: true + - name: bornAfter + in: query + description: Find pets born after this date + style: form + explode: false + schema: + type: string + format: date-time + nullable: true + - description: Is the pet classified as old + in: query + name: old + schema: + type: boolean + nullable: true + style: form + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' /pet/findByTags: get: tags: @@ -155,6 +202,10 @@ paths: schema: type: string format: date-time + - name: colour + in: query + schema: + $ref: '#/components/schemas/Colour' responses: '200': description: successful operation @@ -1010,6 +1061,12 @@ components: enum: - male - female + Colour: + type: string + nullable: true + enum: + - Blue + - White ApiResponse: title: An uploaded response description: Describes the result of uploading an image resource diff --git a/modules/openapi-generator/src/test/resources/3_0/issue-5676-enums.yaml b/modules/openapi-generator/src/test/resources/3_0/issue-5676-enums.yaml index 68746de926e5..901e159eef42 100644 --- a/modules/openapi-generator/src/test/resources/3_0/issue-5676-enums.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/issue-5676-enums.yaml @@ -218,4 +218,5 @@ components: allof-number-enum: allOf: - $ref: "#/components/schemas/NumberEnum" + deprecated: true diff --git a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-okhttp-gson.yaml b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-okhttp-gson.yaml index f4332f5fe3b8..2e02cb701a07 100644 --- a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-okhttp-gson.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-okhttp-gson.yaml @@ -1196,6 +1196,52 @@ paths: responses: 200: description: OK + /fake/null-request-body: + get: + tags: + - another_fake + summary: null request body + operationId: null-request-body + parameters: + - name: Accept-Language + in: header + schema: + type: string + example: application/json + requestBody: + content: + text/plain: + examples: + Generar Orden por External ID: + value: |- + { + "external_reference": "{{external_order_ref}}", + "notification_url": "www.yourserver.com/yourendpoint", + "sponsor_id": 446566691, + "items": [ + { + "title": "Papas frita", + "currency_id": "{{currency_id}}", + "unit_price": 6000, + "quantity": 1 + }, + { + "title": "Gaseosa", + "currency_id": "{{currency_id}}", + "unit_price": 3000, + "quantity": 1 + } + ]/*, + "taxes": [ + { + "value": 0, + "type": "IVA" + } + ]*/ + } + responses: + '200': + description: '' /values: get: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml index 6c6a10dc464c..3b6219f79e58 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1063,6 +1063,49 @@ paths: schema: $ref: '#/components/schemas/User' required: true + /fake/empty_and_non_empty_responses: + post: + tags: + - fake + summary: test empty and non-empty responses + description: '' + operationId: testEmptyAndNonEmptyResponses + responses: + '204': + description: Success, but no response content + '206': + description: Partial response content + content: + text/plain: + schema: + type: string + /fake/error_responses_with_model: + post: + tags: + - fake + summary: test error responses with model + operationId: testErrorResponsesWithModel + responses: + '204': + description: Success, but no response content + '400': + description: '' + content: + application/json: + schema: + type: object + properties: + reason400: + type: string + '404': + description: '' + content: + application/json: + schema: + type: object + properties: + reason404: + type: string /another-fake/dummy: patch: tags: diff --git a/pom.xml b/pom.xml index 06b7bd17b618..ef758c61e54a 100644 --- a/pom.xml +++ b/pom.xml @@ -1221,7 +1221,7 @@ 4.13.2 1.6.21 1.6.21 - 1.18.24 + 1.18.30 3.6.0 3.11.0 3.3.0 diff --git a/run-in-docker.sh b/run-in-docker.sh index bdfa80b0ef53..077a9c972a56 100755 --- a/run-in-docker.sh +++ b/run-in-docker.sh @@ -15,10 +15,10 @@ docker run --rm -it \ -w /gen \ -e GEN_DIR=/gen \ -e MAVEN_CONFIG=/var/maven/.m2 \ - -e MAVEN_OPTS="-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=/var/maven/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Djacoco.skip=true" \ + -e MAVEN_OPTS="-Dmaven.repo.local=/var/maven/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Djacoco.skip=true" \ -u "$(id -u):$(id -g)" \ -v "${PWD}:/gen" \ -v "${PWD}/CI/run-in-docker-settings.xml:/var/maven/.m2/settings.xml" \ -v "${maven_cache_repo}:/var/maven/.m2/repository" \ --entrypoint /gen/docker-entrypoint.sh \ - maven:3-jdk-11 "$@" + maven:3-eclipse-temurin-17 "$@" diff --git a/samples/client/echo_api/csharp-restsharp/README.md b/samples/client/echo_api/csharp-restsharp/README.md index 065fef947005..720aa1a75ebb 100644 --- a/samples/client/echo_api/csharp-restsharp/README.md +++ b/samples/client/echo_api/csharp-restsharp/README.md @@ -117,6 +117,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**TestAuthHttpBasic**](docs/AuthApi.md#testauthhttpbasic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**TestAuthHttpBearer**](docs/AuthApi.md#testauthhttpbearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**TestBinaryGif**](docs/BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**TestBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**TestBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testbodymultipartformdataarrayofbinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -165,3 +166,8 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### http_bearer_auth + +- **Type**: Bearer Authentication + diff --git a/samples/client/echo_api/csharp-restsharp/api/openapi.yaml b/samples/client/echo_api/csharp-restsharp/api/openapi.yaml index 18f869cd6b06..7f02909b8451 100644 --- a/samples/client/echo_api/csharp-restsharp/api/openapi.yaml +++ b/samples/client/echo_api/csharp-restsharp/api/openapi.yaml @@ -521,6 +521,22 @@ paths: summary: To test HTTP basic authentication tags: - auth + /auth/http/bearer: + post: + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_bearer_auth: [] + summary: To test HTTP bearer authentication + tags: + - auth components: requestBodies: Pet: @@ -792,4 +808,7 @@ components: http_auth: scheme: basic type: http + http_bearer_auth: + scheme: bearer + type: http diff --git a/samples/client/echo_api/csharp-restsharp/docs/AuthApi.md b/samples/client/echo_api/csharp-restsharp/docs/AuthApi.md index cd93cd1eb3ac..04ec8ffa8f69 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/AuthApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* | Method | HTTP request | Description | |--------|--------------|-------------| | [**TestAuthHttpBasic**](AuthApi.md#testauthhttpbasic) | **POST** /auth/http/basic | To test HTTP basic authentication | +| [**TestAuthHttpBearer**](AuthApi.md#testauthhttpbearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication | # **TestAuthHttpBasic** @@ -96,3 +97,92 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **TestAuthHttpBearer** +> string TestAuthHttpBearer () + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestAuthHttpBearerExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost:3000"; + // Configure Bearer token for authorization: http_bearer_auth + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new AuthApi(config); + + try + { + // To test HTTP bearer authentication + string result = apiInstance.TestAuthHttpBearer(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AuthApi.TestAuthHttpBearer: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestAuthHttpBearerWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // To test HTTP bearer authentication + ApiResponse response = apiInstance.TestAuthHttpBearerWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling AuthApi.TestAuthHttpBearerWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +**string** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 66408e8d3281..acda1cdef8ff 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -9,7 +9,7 @@ - + diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/AuthApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/AuthApi.cs index 0e631350b5f4..19575017c5fb 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/AuthApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/AuthApi.cs @@ -47,6 +47,27 @@ public interface IAuthApiSync : IApiAccessor /// Index associated with the operation. /// ApiResponse of string ApiResponse TestAuthHttpBasicWithHttpInfo(int operationIndex = 0); + /// + /// To test HTTP bearer authentication + /// + /// + /// To test HTTP bearer authentication + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// string + string TestAuthHttpBearer(int operationIndex = 0); + + /// + /// To test HTTP bearer authentication + /// + /// + /// To test HTTP bearer authentication + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse TestAuthHttpBearerWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -79,6 +100,29 @@ public interface IAuthApiAsync : IApiAccessor /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) System.Threading.Tasks.Task> TestAuthHttpBasicWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// To test HTTP bearer authentication + /// + /// + /// To test HTTP bearer authentication + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task TestAuthHttpBearerAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// To test HTTP bearer authentication + /// + /// + /// To test HTTP bearer authentication + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> TestAuthHttpBearerWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -337,5 +381,143 @@ public Org.OpenAPITools.Client.ApiResponse TestAuthHttpBasicWithHttpInfo return localVarResponse; } + /// + /// To test HTTP bearer authentication To test HTTP bearer authentication + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// string + public string TestAuthHttpBearer(int operationIndex = 0) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = TestAuthHttpBearerWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// To test HTTP bearer authentication To test HTTP bearer authentication + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of string + public Org.OpenAPITools.Client.ApiResponse TestAuthHttpBearerWithHttpInfo(int operationIndex = 0) + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "AuthApi.TestAuthHttpBearer"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (http_bearer_auth) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/auth/http/bearer", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestAuthHttpBearer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// To test HTTP bearer authentication To test HTTP bearer authentication + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task TestAuthHttpBearerAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestAuthHttpBearerWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// To test HTTP bearer authentication To test HTTP bearer authentication + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> TestAuthHttpBearerWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "AuthApi.TestAuthHttpBearer"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (http_bearer_auth) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/auth/http/bearer", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestAuthHttpBearer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + } } diff --git a/samples/client/echo_api/go/README.md b/samples/client/echo_api/go/README.md index 44c3d8a5a05f..457d2cae3672 100644 --- a/samples/client/echo_api/go/README.md +++ b/samples/client/echo_api/go/README.md @@ -78,6 +78,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthAPI* | [**TestAuthHttpBasic**](docs/AuthAPI.md#testauthhttpbasic) | **Post** /auth/http/basic | To test HTTP basic authentication +*AuthAPI* | [**TestAuthHttpBearer**](docs/AuthAPI.md#testauthhttpbearer) | **Post** /auth/http/bearer | To test HTTP bearer authentication *BodyAPI* | [**TestBinaryGif**](docs/BodyAPI.md#testbinarygif) | **Post** /binary/gif | Test binary (gif) response body *BodyAPI* | [**TestBodyApplicationOctetstreamBinary**](docs/BodyAPI.md#testbodyapplicationoctetstreambinary) | **Post** /body/application/octetstream/binary | Test body parameter(s) *BodyAPI* | [**TestBodyMultipartFormdataArrayOfBinary**](docs/BodyAPI.md#testbodymultipartformdataarrayofbinary) | **Post** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -133,6 +134,17 @@ auth := context.WithValue(context.Background(), openapi.ContextBasicAuth, openap r, err := client.Service.Operation(auth, args) ``` +### http_bearer_auth + +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + ## Documentation for Utility Methods diff --git a/samples/client/echo_api/go/api/openapi.yaml b/samples/client/echo_api/go/api/openapi.yaml index deb46346fca2..abd591ef5436 100644 --- a/samples/client/echo_api/go/api/openapi.yaml +++ b/samples/client/echo_api/go/api/openapi.yaml @@ -521,6 +521,22 @@ paths: summary: To test HTTP basic authentication tags: - auth + /auth/http/bearer: + post: + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_bearer_auth: [] + summary: To test HTTP bearer authentication + tags: + - auth components: requestBodies: Pet: @@ -792,3 +808,6 @@ components: http_auth: scheme: basic type: http + http_bearer_auth: + scheme: bearer + type: http diff --git a/samples/client/echo_api/go/api_auth.go b/samples/client/echo_api/go/api_auth.go index 0af21ce06031..d14f693e51f1 100644 --- a/samples/client/echo_api/go/api_auth.go +++ b/samples/client/echo_api/go/api_auth.go @@ -121,3 +121,102 @@ func (a *AuthAPIService) TestAuthHttpBasicExecute(r ApiTestAuthHttpBasicRequest) return localVarReturnValue, localVarHTTPResponse, nil } + +type ApiTestAuthHttpBearerRequest struct { + ctx context.Context + ApiService *AuthAPIService +} + +func (r ApiTestAuthHttpBearerRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestAuthHttpBearerExecute(r) +} + +/* +TestAuthHttpBearer To test HTTP bearer authentication + +To test HTTP bearer authentication + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestAuthHttpBearerRequest +*/ +func (a *AuthAPIService) TestAuthHttpBearer(ctx context.Context) ApiTestAuthHttpBearerRequest { + return ApiTestAuthHttpBearerRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *AuthAPIService) TestAuthHttpBearerExecute(r ApiTestAuthHttpBearerRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthAPIService.TestAuthHttpBearer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/http/bearer" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/client/echo_api/go/client.go b/samples/client/echo_api/go/client.go index 71cab7d72bc3..fba23f940742 100644 --- a/samples/client/echo_api/go/client.go +++ b/samples/client/echo_api/go/client.go @@ -431,6 +431,11 @@ func (c *APIClient) prepareRequest( localVarRequest.SetBasicAuth(auth.UserName, auth.Password) } + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } for header, value := range c.cfg.DefaultHeader { diff --git a/samples/client/echo_api/go/configuration.go b/samples/client/echo_api/go/configuration.go index 43d6759c24f8..f0a872b31529 100644 --- a/samples/client/echo_api/go/configuration.go +++ b/samples/client/echo_api/go/configuration.go @@ -32,6 +32,9 @@ var ( // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") diff --git a/samples/client/echo_api/go/docs/AuthAPI.md b/samples/client/echo_api/go/docs/AuthAPI.md index e7bbfc23abd5..996e58a1bf56 100644 --- a/samples/client/echo_api/go/docs/AuthAPI.md +++ b/samples/client/echo_api/go/docs/AuthAPI.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* Method | HTTP request | Description ------------- | ------------- | ------------- [**TestAuthHttpBasic**](AuthAPI.md#TestAuthHttpBasic) | **Post** /auth/http/basic | To test HTTP basic authentication +[**TestAuthHttpBearer**](AuthAPI.md#TestAuthHttpBearer) | **Post** /auth/http/bearer | To test HTTP bearer authentication @@ -68,3 +69,64 @@ Other parameters are passed through a pointer to a apiTestAuthHttpBasicRequest s [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## TestAuthHttpBearer + +> string TestAuthHttpBearer(ctx).Execute() + +To test HTTP bearer authentication + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthAPI.TestAuthHttpBearer(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.TestAuthHttpBearer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestAuthHttpBearer`: string + fmt.Fprintf(os.Stdout, "Response from `AuthAPI.TestAuthHttpBearer`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestAuthHttpBearerRequest struct via the builder pattern + + +### Return type + +**string** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/echo_api/java/apache-httpclient/README.md b/samples/client/echo_api/java/apache-httpclient/README.md index c0551b4fb8c2..691bf9a00525 100644 --- a/samples/client/echo_api/java/apache-httpclient/README.md +++ b/samples/client/echo_api/java/apache-httpclient/README.md @@ -111,6 +111,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**testAuthHttpBasic**](docs/AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**testAuthHttpBearer**](docs/AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -159,6 +160,12 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### http_bearer_auth + + +- **Type**: HTTP Bearer Token authentication + ## Recommendation diff --git a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml index 0f6131f70618..65ed116bef0f 100644 --- a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml @@ -551,6 +551,23 @@ paths: tags: - auth x-accepts: text/plain + /auth/http/bearer: + post: + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_bearer_auth: [] + summary: To test HTTP bearer authentication + tags: + - auth + x-accepts: text/plain components: requestBodies: Pet: @@ -822,4 +839,7 @@ components: http_auth: scheme: basic type: http + http_bearer_auth: + scheme: bearer + type: http diff --git a/samples/client/echo_api/java/apache-httpclient/docs/AuthApi.md b/samples/client/echo_api/java/apache-httpclient/docs/AuthApi.md index 508c4c555cb9..de3353d43a2c 100644 --- a/samples/client/echo_api/java/apache-httpclient/docs/AuthApi.md +++ b/samples/client/echo_api/java/apache-httpclient/docs/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**testAuthHttpBasic**](AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication | +| [**testAuthHttpBearer**](AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication | @@ -75,3 +76,70 @@ This endpoint does not need any parameter. |-------------|-------------|------------------| | **200** | Successful operation | - | + +## testAuthHttpBearer + +> String testAuthHttpBearer() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP bearer authorization: http_bearer_auth + HttpBearerAuth http_bearer_auth = (HttpBearerAuth) defaultClient.getAuthentication("http_bearer_auth"); + http_bearer_auth.setBearerToken("BEARER TOKEN"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + String result = apiInstance.testAuthHttpBearer(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBearer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index 71e2d4d1ec10..5dcbcce005b3 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -77,6 +77,7 @@ import org.openapitools.client.auth.Authentication; import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApiClient extends JavaTimeFormatter { @@ -129,6 +130,7 @@ public ApiClient(CloseableHttpClient httpClient) { // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap(); authentications.put("http_auth", new HttpBasicAuth()); + authentications.put("http_bearer_auth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -288,6 +290,21 @@ public String getTempFolderPath() { return tempFolderPath; } + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + * @return API client + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + /** * Helper method to set username for the first HTTP basic authentication. diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/AuthApi.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/AuthApi.java index f709addc0f6c..157cc87fe702 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/AuthApi.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/AuthApi.java @@ -117,4 +117,71 @@ public String testAuthHttpBasic(Map additionalHeaders) throws Ap ); } + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + * @return String + * @throws ApiException if fails to make API call + */ + public String testAuthHttpBearer() throws ApiException { + return this.testAuthHttpBearer(Collections.emptyMap()); + } + + + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + * @param additionalHeaders additionalHeaders for this call + * @return String + * @throws ApiException if fails to make API call + */ + public String testAuthHttpBearer(Map additionalHeaders) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/http/bearer"; + + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + localVarHeaderParams.putAll(additionalHeaders); + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_bearer_auth" }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + } diff --git a/samples/client/echo_api/java/feign-gson/api/openapi.yaml b/samples/client/echo_api/java/feign-gson/api/openapi.yaml index 0f6131f70618..65ed116bef0f 100644 --- a/samples/client/echo_api/java/feign-gson/api/openapi.yaml +++ b/samples/client/echo_api/java/feign-gson/api/openapi.yaml @@ -551,6 +551,23 @@ paths: tags: - auth x-accepts: text/plain + /auth/http/bearer: + post: + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_bearer_auth: [] + summary: To test HTTP bearer authentication + tags: + - auth + x-accepts: text/plain components: requestBodies: Pet: @@ -822,4 +839,7 @@ components: http_auth: scheme: basic type: http + http_bearer_auth: + scheme: bearer + type: http diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ApiClient.java index 9184a09164c1..44e015746bcb 100644 --- a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -42,6 +42,8 @@ public ApiClient(String[] authNames) { RequestInterceptor auth = null; if ("http_auth".equals(authName)) { auth = new HttpBasicAuth(); + } else if ("http_bearer_auth".equals(authName)) { + auth = new HttpBearerAuth("bearer"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/AuthApi.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/AuthApi.java index 2c2524805f0f..900372cdd34b 100644 --- a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/AuthApi.java +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/AuthApi.java @@ -39,4 +39,29 @@ public interface AuthApi extends ApiClient.Api { ApiResponse testAuthHttpBasicWithHttpInfo(); + + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + * @return String + */ + @RequestLine("POST /auth/http/bearer") + @Headers({ + "Accept: text/plain", + }) + String testAuthHttpBearer(); + + /** + * To test HTTP bearer authentication + * Similar to testAuthHttpBearer but it also returns the http response headers . + * To test HTTP bearer authentication + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("POST /auth/http/bearer") + @Headers({ + "Accept: text/plain", + }) + ApiResponse testAuthHttpBearerWithHttpInfo(); + + } diff --git a/samples/client/echo_api/java/native/README.md b/samples/client/echo_api/java/native/README.md index 58ece7603ded..c16a1e63343b 100644 --- a/samples/client/echo_api/java/native/README.md +++ b/samples/client/echo_api/java/native/README.md @@ -106,6 +106,8 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**testAuthHttpBasic**](docs/AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication *AuthApi* | [**testAuthHttpBasicWithHttpInfo**](docs/AuthApi.md#testAuthHttpBasicWithHttpInfo) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**testAuthHttpBearer**](docs/AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication +*AuthApi* | [**testAuthHttpBearerWithHttpInfo**](docs/AuthApi.md#testAuthHttpBearerWithHttpInfo) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBinaryGifWithHttpInfo**](docs/BodyApi.md#testBinaryGifWithHttpInfo) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) @@ -174,6 +176,12 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### http_bearer_auth + + +- **Type**: HTTP Bearer Token authentication + ## Recommendation diff --git a/samples/client/echo_api/java/native/api/openapi.yaml b/samples/client/echo_api/java/native/api/openapi.yaml index 0f6131f70618..65ed116bef0f 100644 --- a/samples/client/echo_api/java/native/api/openapi.yaml +++ b/samples/client/echo_api/java/native/api/openapi.yaml @@ -551,6 +551,23 @@ paths: tags: - auth x-accepts: text/plain + /auth/http/bearer: + post: + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_bearer_auth: [] + summary: To test HTTP bearer authentication + tags: + - auth + x-accepts: text/plain components: requestBodies: Pet: @@ -822,4 +839,7 @@ components: http_auth: scheme: basic type: http + http_bearer_auth: + scheme: bearer + type: http diff --git a/samples/client/echo_api/java/native/docs/AuthApi.md b/samples/client/echo_api/java/native/docs/AuthApi.md index 6d679e7bf945..7c1c77adca9e 100644 --- a/samples/client/echo_api/java/native/docs/AuthApi.md +++ b/samples/client/echo_api/java/native/docs/AuthApi.md @@ -6,6 +6,8 @@ All URIs are relative to *http://localhost:3000* |------------- | ------------- | -------------| | [**testAuthHttpBasic**](AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication | | [**testAuthHttpBasicWithHttpInfo**](AuthApi.md#testAuthHttpBasicWithHttpInfo) | **POST** /auth/http/basic | To test HTTP basic authentication | +| [**testAuthHttpBearer**](AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication | +| [**testAuthHttpBearerWithHttpInfo**](AuthApi.md#testAuthHttpBearerWithHttpInfo) | **POST** /auth/http/bearer | To test HTTP bearer authentication | @@ -146,3 +148,139 @@ ApiResponse<**String**> |-------------|-------------|------------------| | **200** | Successful operation | - | + +## testAuthHttpBearer + +> String testAuthHttpBearer() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP bearer authorization: http_bearer_auth + HttpBearerAuth http_bearer_auth = (HttpBearerAuth) defaultClient.getAuthentication("http_bearer_auth"); + http_bearer_auth.setBearerToken("BEARER TOKEN"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + String result = apiInstance.testAuthHttpBearer(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBearer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +## testAuthHttpBearerWithHttpInfo + +> ApiResponse testAuthHttpBearer testAuthHttpBearerWithHttpInfo() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP bearer authorization: http_bearer_auth + HttpBearerAuth http_bearer_auth = (HttpBearerAuth) defaultClient.getAuthentication("http_bearer_auth"); + http_bearer_auth.setBearerToken("BEARER TOKEN"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + ApiResponse response = apiInstance.testAuthHttpBearerWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBearer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<**String**> + + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java index 530872704725..d22bfe292788 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java @@ -144,6 +144,79 @@ private HttpRequest.Builder testAuthHttpBasicRequestBuilder() throws ApiExceptio localVarRequestBuilder.header("Accept", "text/plain"); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + * @return String + * @throws ApiException if fails to make API call + */ + public String testAuthHttpBearer() throws ApiException { + ApiResponse localVarResponse = testAuthHttpBearerWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse testAuthHttpBearerWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testAuthHttpBearerRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testAuthHttpBearer", localVarResponse); + } + // for plain text response + if (localVarResponse.headers().map().containsKey("Content-Type") && + "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) { + java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A"); + String responseBodyText = s.hasNext() ? s.next() : ""; + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBodyText + ); + } else { + throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse); + } + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testAuthHttpBearerRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/auth/http/bearer"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "text/plain"); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); diff --git a/samples/client/echo_api/java/okhttp-gson/README.md b/samples/client/echo_api/java/okhttp-gson/README.md index 6c2ba0f4740e..91a6d95c0174 100644 --- a/samples/client/echo_api/java/okhttp-gson/README.md +++ b/samples/client/echo_api/java/okhttp-gson/README.md @@ -119,6 +119,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**testAuthHttpBasic**](docs/AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**testAuthHttpBearer**](docs/AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -166,6 +167,11 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### http_bearer_auth + +- **Type**: HTTP Bearer Token authentication + ## Recommendation diff --git a/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml b/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml index 0f6131f70618..65ed116bef0f 100644 --- a/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml @@ -551,6 +551,23 @@ paths: tags: - auth x-accepts: text/plain + /auth/http/bearer: + post: + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_bearer_auth: [] + summary: To test HTTP bearer authentication + tags: + - auth + x-accepts: text/plain components: requestBodies: Pet: @@ -822,4 +839,7 @@ components: http_auth: scheme: basic type: http + http_bearer_auth: + scheme: bearer + type: http diff --git a/samples/client/echo_api/java/okhttp-gson/docs/AuthApi.md b/samples/client/echo_api/java/okhttp-gson/docs/AuthApi.md index 5a691fcb6f46..387a0f3dcbd1 100644 --- a/samples/client/echo_api/java/okhttp-gson/docs/AuthApi.md +++ b/samples/client/echo_api/java/okhttp-gson/docs/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**testAuthHttpBasic**](AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication | +| [**testAuthHttpBearer**](AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication | @@ -71,3 +72,66 @@ This endpoint does not need any parameter. |-------------|-------------|------------------| | **200** | Successful operation | - | + +# **testAuthHttpBearer** +> String testAuthHttpBearer() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP bearer authorization: http_bearer_auth + HttpBearerAuth http_bearer_auth = (HttpBearerAuth) defaultClient.getAuthentication("http_bearer_auth"); + http_bearer_auth.setBearerToken("BEARER TOKEN"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + String result = apiInstance.testAuthHttpBearer(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBearer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java index 3d952c96bf8a..f89aa2664b7e 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -100,6 +100,7 @@ public ApiClient() { // Setup authentications (key: authentication name, value: authentication). authentications.put("http_auth", new HttpBasicAuth()); + authentications.put("http_bearer_auth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -116,6 +117,7 @@ public ApiClient(OkHttpClient client) { // Setup authentications (key: authentication name, value: authentication). authentications.put("http_auth", new HttpBasicAuth()); + authentications.put("http_bearer_auth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -384,6 +386,19 @@ public Authentication getAuthentication(String authName) { return authentications.get(authName); } + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } /** * Helper method to set username for the first HTTP basic authentication. diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/api/AuthApi.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/api/AuthApi.java index dc87a48f8588..f0e208cbc610 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/api/AuthApi.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/api/AuthApi.java @@ -184,4 +184,117 @@ public okhttp3.Call testAuthHttpBasicAsync(final ApiCallback _callback) localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for testAuthHttpBearer + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful operation -
+ */ + public okhttp3.Call testAuthHttpBearerCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/http/bearer"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "http_bearer_auth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call testAuthHttpBearerValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return testAuthHttpBearerCall(_callback); + + } + + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + * @return String + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful operation -
+ */ + public String testAuthHttpBearer() throws ApiException { + ApiResponse localVarResp = testAuthHttpBearerWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + * @return ApiResponse<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful operation -
+ */ + public ApiResponse testAuthHttpBearerWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = testAuthHttpBearerValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * To test HTTP bearer authentication (asynchronously) + * To test HTTP bearer authentication + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful operation -
+ */ + public okhttp3.Call testAuthHttpBearerAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = testAuthHttpBearerValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index 26b94f38e4d2..e86aa2961e45 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Bird.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Bird.java index f8a88a604b07..472d77535a88 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Bird.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Bird.java @@ -63,7 +63,6 @@ public Bird() { } public Bird size(String size) { - this.size = size; return this; } @@ -77,14 +76,12 @@ public String getSize() { return size; } - public void setSize(String size) { this.size = size; } public Bird color(String color) { - this.color = color; return this; } @@ -98,7 +95,6 @@ public String getColor() { return color; } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java index 240826b0c7a3..71d231979025 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java @@ -63,7 +63,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQuery.java index 934f739ee40c..ff4a29d43ea7 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQuery.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQuery.java @@ -71,7 +71,6 @@ public DataQuery() { } public DataQuery suffix(String suffix) { - this.suffix = suffix; return this; } @@ -85,14 +84,12 @@ public String getSuffix() { return suffix; } - public void setSuffix(String suffix) { this.suffix = suffix; } public DataQuery text(String text) { - this.text = text; return this; } @@ -106,14 +103,12 @@ public String getText() { return text; } - public void setText(String text) { this.text = text; } public DataQuery date(OffsetDateTime date) { - this.date = date; return this; } @@ -127,7 +122,6 @@ public OffsetDateTime getDate() { return date; } - public void setDate(OffsetDateTime date) { this.date = date; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DefaultValue.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DefaultValue.java index 6a7563cd1ed4..244dd32a0e3d 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DefaultValue.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DefaultValue.java @@ -145,7 +145,6 @@ public DefaultValue() { } public DefaultValue arrayStringEnumRefDefault(List arrayStringEnumRefDefault) { - this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; return this; } @@ -167,14 +166,12 @@ public List getArrayStringEnumRefDefault() { return arrayStringEnumRefDefault; } - public void setArrayStringEnumRefDefault(List arrayStringEnumRefDefault) { this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; } public DefaultValue arrayStringEnumDefault(List arrayStringEnumDefault) { - this.arrayStringEnumDefault = arrayStringEnumDefault; return this; } @@ -196,14 +193,12 @@ public List getArrayStringEnumDefault() { return arrayStringEnumDefault; } - public void setArrayStringEnumDefault(List arrayStringEnumDefault) { this.arrayStringEnumDefault = arrayStringEnumDefault; } public DefaultValue arrayStringDefault(List arrayStringDefault) { - this.arrayStringDefault = arrayStringDefault; return this; } @@ -225,14 +220,12 @@ public List getArrayStringDefault() { return arrayStringDefault; } - public void setArrayStringDefault(List arrayStringDefault) { this.arrayStringDefault = arrayStringDefault; } public DefaultValue arrayIntegerDefault(List arrayIntegerDefault) { - this.arrayIntegerDefault = arrayIntegerDefault; return this; } @@ -254,14 +247,12 @@ public List getArrayIntegerDefault() { return arrayIntegerDefault; } - public void setArrayIntegerDefault(List arrayIntegerDefault) { this.arrayIntegerDefault = arrayIntegerDefault; } public DefaultValue arrayString(List arrayString) { - this.arrayString = arrayString; return this; } @@ -283,14 +274,12 @@ public List getArrayString() { return arrayString; } - public void setArrayString(List arrayString) { this.arrayString = arrayString; } public DefaultValue arrayStringNullable(List arrayStringNullable) { - this.arrayStringNullable = arrayStringNullable; return this; } @@ -312,14 +301,12 @@ public List getArrayStringNullable() { return arrayStringNullable; } - public void setArrayStringNullable(List arrayStringNullable) { this.arrayStringNullable = arrayStringNullable; } public DefaultValue arrayStringExtensionNullable(List arrayStringExtensionNullable) { - this.arrayStringExtensionNullable = arrayStringExtensionNullable; return this; } @@ -341,14 +328,12 @@ public List getArrayStringExtensionNullable() { return arrayStringExtensionNullable; } - public void setArrayStringExtensionNullable(List arrayStringExtensionNullable) { this.arrayStringExtensionNullable = arrayStringExtensionNullable; } public DefaultValue stringNullable(String stringNullable) { - this.stringNullable = stringNullable; return this; } @@ -362,7 +347,6 @@ public String getStringNullable() { return stringNullable; } - public void setStringNullable(String stringNullable) { this.stringNullable = stringNullable; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java index b304917e74a0..9e41ee189994 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java @@ -68,7 +68,6 @@ public NumberPropertiesOnly() { } public NumberPropertiesOnly number(BigDecimal number) { - this.number = number; return this; } @@ -82,14 +81,12 @@ public BigDecimal getNumber() { return number; } - public void setNumber(BigDecimal number) { this.number = number; } public NumberPropertiesOnly _float(Float _float) { - this._float = _float; return this; } @@ -103,14 +100,12 @@ public Float getFloat() { return _float; } - public void setFloat(Float _float) { this._float = _float; } public NumberPropertiesOnly _double(Double _double) { - this._double = _double; return this; } @@ -126,7 +121,6 @@ public Double getDouble() { return _double; } - public void setDouble(Double _double) { this._double = _double; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java index d72837765013..cabce13af96a 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java @@ -137,7 +137,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -151,14 +150,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet name(String name) { - this.name = name; return this; } @@ -172,14 +169,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet category(Category category) { - this.category = category; return this; } @@ -193,14 +188,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -222,14 +215,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -251,14 +242,12 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -272,7 +261,6 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Query.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Query.java index 453a9fd37d41..31a7af02acaa 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Query.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Query.java @@ -119,7 +119,6 @@ public Query() { } public Query id(Long id) { - this.id = id; return this; } @@ -133,14 +132,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Query outcomes(List outcomes) { - this.outcomes = outcomes; return this; } @@ -162,7 +159,6 @@ public List getOutcomes() { return outcomes; } - public void setOutcomes(List outcomes) { this.outcomes = outcomes; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java index 8f2dca745387..b52b66131466 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java @@ -63,7 +63,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java index 532843528e89..41e90d09eb06 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java @@ -71,7 +71,6 @@ public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() { } public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) { - this.size = size; return this; } @@ -85,14 +84,12 @@ public String getSize() { return size; } - public void setSize(String size) { this.size = size; } public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) { - this.color = color; return this; } @@ -106,14 +103,12 @@ public String getColor() { return color; } - public void setColor(String color) { this.color = color; } public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) { - this.id = id; return this; } @@ -127,14 +122,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) { - this.name = name; return this; } @@ -148,7 +141,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java index 055b13ac8987..d2a89f3e6d59 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java @@ -61,7 +61,6 @@ public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { } public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List values) { - this.values = values; return this; } @@ -83,7 +82,6 @@ public List getValues() { return values; } - public void setValues(List values) { this.values = values; } diff --git a/samples/client/echo_api/java/resttemplate/.github/workflows/maven.yml b/samples/client/echo_api/java/resttemplate/.github/workflows/maven.yml new file mode 100644 index 000000000000..aa75c116424b --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build Echo Server API + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/samples/client/echo_api/java/resttemplate/.gitignore b/samples/client/echo_api/java/resttemplate/.gitignore new file mode 100644 index 000000000000..a530464afa1b --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/samples/client/echo_api/java/resttemplate/.openapi-generator-ignore b/samples/client/echo_api/java/resttemplate/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/echo_api/java/resttemplate/.openapi-generator/FILES b/samples/client/echo_api/java/resttemplate/.openapi-generator/FILES new file mode 100644 index 000000000000..7086d5ac3443 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/.openapi-generator/FILES @@ -0,0 +1,59 @@ +.github/workflows/maven.yml +.gitignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/AuthApi.md +docs/Bird.md +docs/BodyApi.md +docs/Category.md +docs/DataQuery.md +docs/DefaultValue.md +docs/FormApi.md +docs/HeaderApi.md +docs/NumberPropertiesOnly.md +docs/PathApi.md +docs/Pet.md +docs/Query.md +docs/QueryApi.md +docs/StringEnumRef.md +docs/Tag.md +docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md +docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/org/openapitools/client/ApiClient.java +src/main/java/org/openapitools/client/JavaTimeFormatter.java +src/main/java/org/openapitools/client/RFC3339DateFormat.java +src/main/java/org/openapitools/client/ServerConfiguration.java +src/main/java/org/openapitools/client/ServerVariable.java +src/main/java/org/openapitools/client/api/AuthApi.java +src/main/java/org/openapitools/client/api/BodyApi.java +src/main/java/org/openapitools/client/api/FormApi.java +src/main/java/org/openapitools/client/api/HeaderApi.java +src/main/java/org/openapitools/client/api/PathApi.java +src/main/java/org/openapitools/client/api/QueryApi.java +src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +src/main/java/org/openapitools/client/auth/Authentication.java +src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +src/main/java/org/openapitools/client/model/Bird.java +src/main/java/org/openapitools/client/model/Category.java +src/main/java/org/openapitools/client/model/DataQuery.java +src/main/java/org/openapitools/client/model/DefaultValue.java +src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java +src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/Query.java +src/main/java/org/openapitools/client/model/StringEnumRef.java +src/main/java/org/openapitools/client/model/Tag.java +src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java +src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java diff --git a/samples/client/echo_api/java/resttemplate/.openapi-generator/VERSION b/samples/client/echo_api/java/resttemplate/.openapi-generator/VERSION new file mode 100644 index 000000000000..0f78c31cdc77 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/java/resttemplate/.travis.yml b/samples/client/echo_api/java/resttemplate/.travis.yml new file mode 100644 index 000000000000..1b6741c083c7 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/samples/client/echo_api/java/resttemplate/README.md b/samples/client/echo_api/java/resttemplate/README.md new file mode 100644 index 000000000000..63c5a2b38f88 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/README.md @@ -0,0 +1,184 @@ +# echo-api-resttemplate + +Echo Server API + +- API version: 0.1.0 + +Echo Server API + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 1.8+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + org.openapitools + echo-api-resttemplate + 0.1.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() // Needed if the 'echo-api-resttemplate' jar has been published to maven central. + mavenLocal() // Needed if the 'echo-api-resttemplate' jar has been published to the local maven repo. + } + + dependencies { + implementation "org.openapitools:echo-api-resttemplate:0.1.0" + } +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/echo-api-resttemplate-0.1.0.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.AuthApi; + +public class AuthApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP basic authorization: http_auth + HttpBasicAuth http_auth = (HttpBasicAuth) defaultClient.getAuthentication("http_auth"); + http_auth.setUsername("YOUR USERNAME"); + http_auth.setPassword("YOUR PASSWORD"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + String result = apiInstance.testAuthHttpBasic(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBasic"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:3000* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthApi* | [**testAuthHttpBasic**](docs/AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**testAuthHttpBearer**](docs/AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication +*BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body +*BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) +*BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**testEchoBodyAllOfPet**](docs/BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) +*BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object +*BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) +*BodyApi* | [**testEchoBodyPetResponseString**](docs/BodyApi.md#testEchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body +*BodyApi* | [**testEchoBodyTagResponseString**](docs/BodyApi.md#testEchoBodyTagResponseString) | **POST** /echo/body/Tag/response_string | Test empty json (request body) +*FormApi* | [**testFormIntegerBooleanString**](docs/FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s) +*FormApi* | [**testFormOneof**](docs/FormApi.md#testFormOneof) | **POST** /form/oneof | Test form parameter(s) for oneOf schema +*HeaderApi* | [**testHeaderIntegerBooleanStringEnums**](docs/HeaderApi.md#testHeaderIntegerBooleanStringEnums) | **GET** /header/integer/boolean/string/enums | Test header parameter(s) +*PathApi* | [**testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath**](docs/PathApi.md#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath) | **GET** /path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path} | Test path parameter(s) +*QueryApi* | [**testEnumRefString**](docs/QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) +*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) +*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) +*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObject**](docs/QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) +*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleDeepObjectExplodeTrueObjectAllOf) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) + + +## Documentation for Models + + - [Bird](docs/Bird.md) + - [Category](docs/Category.md) + - [DataQuery](docs/DataQuery.md) + - [DefaultValue](docs/DefaultValue.md) + - [NumberPropertiesOnly](docs/NumberPropertiesOnly.md) + - [Pet](docs/Pet.md) + - [Query](docs/Query.md) + - [StringEnumRef](docs/StringEnumRef.md) + - [Tag](docs/Tag.md) + - [TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter](docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md) + - [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md) + + + +## Documentation for Authorization + + +Authentication schemes defined for the API: + +### http_auth + + +- **Type**: HTTP basic authentication + + +### http_bearer_auth + + +- **Type**: HTTP Bearer Token authentication + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +team@openapitools.org + diff --git a/samples/client/echo_api/java/resttemplate/api/openapi.yaml b/samples/client/echo_api/java/resttemplate/api/openapi.yaml new file mode 100644 index 000000000000..65ed116bef0f --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/api/openapi.yaml @@ -0,0 +1,845 @@ +openapi: 3.0.3 +info: + contact: + email: team@openapitools.org + description: Echo Server API + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Echo Server API + version: 0.1.0 +servers: +- url: http://localhost:3000/ +paths: + /path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}: + get: + description: Test path parameter(s) + operationId: "tests/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}" + parameters: + - explode: false + in: path + name: path_string + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: path_integer + required: true + schema: + type: integer + style: simple + - explode: false + in: path + name: enum_nonref_string_path + required: true + schema: + enum: + - success + - failure + - unclassified + type: string + style: simple + - explode: false + in: path + name: enum_ref_string_path + required: true + schema: + $ref: '#/components/schemas/StringEnumRef' + style: simple + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test path parameter(s) + tags: + - path + x-accepts: text/plain + /form/integer/boolean/string: + post: + description: Test form parameter(s) + operationId: test/form/integer/boolean/string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/test_form_integer_boolean_string_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test form parameter(s) + tags: + - form + x-content-type: application/x-www-form-urlencoded + x-accepts: text/plain + /form/oneof: + post: + description: Test form parameter(s) for oneOf schema + operationId: test/form/oneof + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/test_form_oneof_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test form parameter(s) for oneOf schema + tags: + - form + x-content-type: application/x-www-form-urlencoded + x-accepts: text/plain + /header/integer/boolean/string/enums: + get: + description: Test header parameter(s) + operationId: test/header/integer/boolean/string/enums + parameters: + - explode: true + in: header + name: integer_header + required: false + schema: + type: integer + style: form + - explode: true + in: header + name: boolean_header + required: false + schema: + type: boolean + style: form + - explode: true + in: header + name: string_header + required: false + schema: + type: string + style: form + - explode: true + in: header + name: enum_nonref_string_header + required: false + schema: + enum: + - success + - failure + - unclassified + type: string + style: form + - explode: true + in: header + name: enum_ref_string_header + required: false + schema: + $ref: '#/components/schemas/StringEnumRef' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test header parameter(s) + tags: + - header + x-accepts: text/plain + /query/enum_ref_string: + get: + description: Test query parameter(s) + operationId: test/enum_ref_string + parameters: + - explode: true + in: query + name: enum_nonref_string_query + required: false + schema: + enum: + - success + - failure + - unclassified + type: string + style: form + - explode: true + in: query + name: enum_ref_string_query + required: false + schema: + $ref: '#/components/schemas/StringEnumRef' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/datetime/date/string: + get: + description: Test query parameter(s) + operationId: test/query/datetime/date/string + parameters: + - explode: true + in: query + name: datetime_query + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: date_query + required: false + schema: + format: date + type: string + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/integer/boolean/string: + get: + description: Test query parameter(s) + operationId: test/query/integer/boolean/string + parameters: + - explode: true + in: query + name: integer_query + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: boolean_query + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/array_string: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/array_string + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/object/allOf: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object/allOf + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/DataQuery' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_deepObject/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_deepObject/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: deepObject + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_deepObject/explode_true/object/allOf: + get: + description: Test query parameter(s) + operationId: test/query/style_deepObject/explode_true/object/allOf + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter' + style: deepObject + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /body/application/octetstream/binary: + post: + description: Test body parameter(s) + operationId: test/body/application/octetstream/binary + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/octet-stream + x-accepts: text/plain + /echo/body/Pet: + post: + description: Test body parameter(s) + operationId: test/echo/body/Pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/json + x-accepts: application/json + /echo/body/allOf/Pet: + post: + description: Test body parameter(s) + operationId: test/echo/body/allOf/Pet + requestBody: + $ref: '#/components/requestBodies/AllOfPet' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/json + x-accepts: application/json + /echo/body/Pet/response_string: + post: + description: Test empty response body + operationId: test/echo/body/Pet/response_string + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test empty response body + tags: + - body + x-content-type: application/json + x-accepts: text/plain + /echo/body/Tag/response_string: + post: + description: Test empty json (request body) + operationId: test/echo/body/Tag/response_string + requestBody: + $ref: '#/components/requestBodies/Tag' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test empty json (request body) + tags: + - body + x-content-type: application/json + x-accepts: text/plain + /echo/body/FreeFormObject/response_string: + post: + description: Test free form object + operationId: test/echo/body/FreeFormObject/response_string + requestBody: + content: + application/json: + schema: + type: object + description: Free form object + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test free form object + tags: + - body + x-content-type: application/json + x-accepts: text/plain + /binary/gif: + post: + description: Test binary (gif) response body + operationId: test/binary/gif + responses: + "200": + content: + image/gif: + schema: + format: binary + type: string + description: Successful operation + summary: Test binary (gif) response body + tags: + - body + x-accepts: image/gif + /body/application/octetstream/array_of_binary: + post: + description: Test array of binary in multipart mime + operationId: test/body/multipart/formdata/array_of_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_array_of_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test array of binary in multipart mime + tags: + - body + x-content-type: multipart/form-data + x-accepts: text/plain + /auth/http/basic: + post: + description: To test HTTP basic authentication + operationId: test/auth/http/basic + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_auth: [] + summary: To test HTTP basic authentication + tags: + - auth + x-accepts: text/plain + /auth/http/bearer: + post: + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_bearer_auth: [] + summary: To test HTTP bearer authentication + tags: + - auth + x-accepts: text/plain +components: + requestBodies: + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + AllOfPet: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + Tag: + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: Tag object + schemas: + Category: + example: + name: Dogs + id: 1 + properties: + id: + example: 1 + format: int64 + type: integer + name: + example: Dogs + type: string + type: object + xml: + name: category + Tag: + example: + name: name + id: 0 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 10 + category: + name: Dogs + id: 1 + tags: + - name: name + id: 0 + - name: name + id: 0 + status: available + properties: + id: + example: 10 + format: int64 + type: integer + name: + example: doggie + type: string + category: + $ref: '#/components/schemas/Category' + photoUrls: + items: + type: string + xml: + name: photoUrl + type: array + xml: + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: pet + StringEnumRef: + enum: + - success + - failure + - unclassified + type: string + DefaultValue: + description: to test the default value of properties + properties: + array_string_enum_ref_default: + default: + - success + - failure + items: + $ref: '#/components/schemas/StringEnumRef' + type: array + array_string_enum_default: + default: + - success + - failure + items: + enum: + - success + - failure + - unclassified + type: string + type: array + array_string_default: + default: + - failure + - skipped + items: + type: string + type: array + array_integer_default: + default: + - 1 + - 3 + items: + type: integer + type: array + array_string: + items: + type: string + type: array + array_string_nullable: + items: + type: string + nullable: true + type: array + array_string_extension_nullable: + items: + type: string + type: array + x-nullable: true + string_nullable: + nullable: true + type: string + type: object + Bird: + properties: + size: + type: string + color: + type: string + type: object + Query: + properties: + id: + description: Query + format: int64 + type: integer + outcomes: + default: + - SUCCESS + - FAILURE + items: + enum: + - SUCCESS + - FAILURE + - SKIPPED + type: string + type: array + type: object + x-parent: true + DataQuery: + allOf: + - properties: + suffix: + description: test suffix + type: string + text: + description: Some text containing white spaces + example: Some text + type: string + date: + description: A date + format: date-time + type: string + type: object + - $ref: '#/components/schemas/Query' + NumberPropertiesOnly: + properties: + number: + type: number + float: + format: float + type: number + double: + format: double + maximum: 50.2 + minimum: 0.8 + type: number + type: object + test_form_integer_boolean_string_request: + properties: + integer_form: + type: integer + boolean_form: + type: boolean + string_form: + type: string + type: object + test_form_oneof_request_oneOf: + properties: + form1: + type: string + form2: + type: integer + type: object + test_form_oneof_request_oneOf_1: + properties: + form3: + type: string + form4: + type: boolean + type: object + test_form_oneof_request: + oneOf: + - $ref: '#/components/schemas/test_form_oneof_request_oneOf' + - $ref: '#/components/schemas/test_form_oneof_request_oneOf_1' + - $ref: '#/components/schemas/Tag' + type: object + test_query_style_form_explode_true_array_string_query_object_parameter: + properties: + values: + items: + type: string + type: array + type: object + test_query_style_deepObject_explode_true_object_allOf_query_object_parameter: + allOf: + - $ref: '#/components/schemas/Bird' + - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_array_of_binary_request: + properties: + files: + items: + format: binary + type: string + type: array + required: + - files + type: object + securitySchemes: + http_auth: + scheme: basic + type: http + http_bearer_auth: + scheme: bearer + type: http + diff --git a/samples/client/echo_api/java/resttemplate/build.gradle b/samples/client/echo_api/java/resttemplate/build.gradle new file mode 100644 index 000000000000..a3f880a047c1 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/build.gradle @@ -0,0 +1,121 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'org.openapitools' +version = '0.1.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 22 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + archiveClassifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = 'echo-api-resttemplate' + from components.java + } + } + } + + task execute(type:JavaExec) { + mainClass = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + jackson_version = "2.14.2" + jackson_databind_version = "2.15.1" + jackson_databind_nullable_version = "0.2.6" + spring_web_version = "5.3.24" + jakarta_annotation_version = "1.3.5" + jodatime_version = "2.9.9" + junit_version = "4.13.2" +} + +dependencies { + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.springframework:spring-web:$spring_web_version" + implementation "org.springframework:spring-context:$spring_web_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "junit:junit:$junit_version" +} diff --git a/samples/client/echo_api/java/resttemplate/build.sbt b/samples/client/echo_api/java/resttemplate/build.sbt new file mode 100644 index 000000000000..464090415c47 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/build.sbt @@ -0,0 +1 @@ +# TODO diff --git a/samples/client/echo_api/java/resttemplate/docs/AuthApi.md b/samples/client/echo_api/java/resttemplate/docs/AuthApi.md new file mode 100644 index 000000000000..de3353d43a2c --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/AuthApi.md @@ -0,0 +1,145 @@ +# AuthApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testAuthHttpBasic**](AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication | +| [**testAuthHttpBearer**](AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication | + + + +## testAuthHttpBasic + +> String testAuthHttpBasic() + +To test HTTP basic authentication + +To test HTTP basic authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP basic authorization: http_auth + HttpBasicAuth http_auth = (HttpBasicAuth) defaultClient.getAuthentication("http_auth"); + http_auth.setUsername("YOUR USERNAME"); + http_auth.setPassword("YOUR PASSWORD"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + String result = apiInstance.testAuthHttpBasic(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBasic"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[http_auth](../README.md#http_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testAuthHttpBearer + +> String testAuthHttpBearer() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP bearer authorization: http_bearer_auth + HttpBearerAuth http_bearer_auth = (HttpBearerAuth) defaultClient.getAuthentication("http_bearer_auth"); + http_bearer_auth.setBearerToken("BEARER TOKEN"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + String result = apiInstance.testAuthHttpBearer(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBearer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/resttemplate/docs/Bird.md b/samples/client/echo_api/java/resttemplate/docs/Bird.md new file mode 100644 index 000000000000..2a6f8a660d65 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/Bird.md @@ -0,0 +1,14 @@ + + +# Bird + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**size** | **String** | | [optional] | +|**color** | **String** | | [optional] | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/BodyApi.md b/samples/client/echo_api/java/resttemplate/docs/BodyApi.md new file mode 100644 index 000000000000..d83932321002 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/BodyApi.md @@ -0,0 +1,540 @@ +# BodyApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testBinaryGif**](BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body | +| [**testBodyApplicationOctetstreamBinary**](BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | +| [**testBodyMultipartFormdataArrayOfBinary**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**testEchoBodyAllOfPet**](BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | +| [**testEchoBodyFreeFormObjectResponseString**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | +| [**testEchoBodyPet**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | +| [**testEchoBodyPetResponseString**](BodyApi.md#testEchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body | +| [**testEchoBodyTagResponseString**](BodyApi.md#testEchoBodyTagResponseString) | **POST** /echo/body/Tag/response_string | Test empty json (request body) | + + + +## testBinaryGif + +> File testBinaryGif() + +Test binary (gif) response body + +Test binary (gif) response body + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + try { + File result = apiInstance.testBinaryGif(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBinaryGif"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**File**](File.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: image/gif + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testBodyApplicationOctetstreamBinary + +> String testBodyApplicationOctetstreamBinary(body) + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + File body = new File("/path/to/file"); // File | + try { + String result = apiInstance.testBodyApplicationOctetstreamBinary(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBodyApplicationOctetstreamBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/octet-stream +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testBodyMultipartFormdataArrayOfBinary + +> String testBodyMultipartFormdataArrayOfBinary(files) + +Test array of binary in multipart mime + +Test array of binary in multipart mime + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + List files = Arrays.asList(); // List | + try { + String result = apiInstance.testBodyMultipartFormdataArrayOfBinary(files); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBodyMultipartFormdataArrayOfBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **files** | **List<File>**| | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyAllOfPet + +> Pet testEchoBodyAllOfPet(pet) + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.testEchoBodyAllOfPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyAllOfPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyFreeFormObjectResponseString + +> String testEchoBodyFreeFormObjectResponseString(body) + +Test free form object + +Test free form object + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Object body = null; // Object | Free form object + try { + String result = apiInstance.testEchoBodyFreeFormObjectResponseString(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyFreeFormObjectResponseString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Object**| Free form object | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyPet + +> Pet testEchoBodyPet(pet) + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.testEchoBodyPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyPetResponseString + +> String testEchoBodyPetResponseString(pet) + +Test empty response body + +Test empty response body + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + String result = apiInstance.testEchoBodyPetResponseString(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyPetResponseString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyTagResponseString + +> String testEchoBodyTagResponseString(tag) + +Test empty json (request body) + +Test empty json (request body) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Tag tag = new Tag(); // Tag | Tag object + try { + String result = apiInstance.testEchoBodyTagResponseString(tag); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyTagResponseString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tag** | [**Tag**](Tag.md)| Tag object | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/resttemplate/docs/Category.md b/samples/client/echo_api/java/resttemplate/docs/Category.md new file mode 100644 index 000000000000..7289ebf585bb --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/Category.md @@ -0,0 +1,14 @@ + + +# Category + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/DataQuery.md b/samples/client/echo_api/java/resttemplate/docs/DataQuery.md new file mode 100644 index 000000000000..338c467b2d56 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/DataQuery.md @@ -0,0 +1,15 @@ + + +# DataQuery + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**suffix** | **String** | test suffix | [optional] | +|**text** | **String** | Some text containing white spaces | [optional] | +|**date** | **OffsetDateTime** | A date | [optional] | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/DefaultValue.md b/samples/client/echo_api/java/resttemplate/docs/DefaultValue.md new file mode 100644 index 000000000000..20a9b8ee2508 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/DefaultValue.md @@ -0,0 +1,31 @@ + + +# DefaultValue + +to test the default value of properties + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayStringEnumRefDefault** | **List<StringEnumRef>** | | [optional] | +|**arrayStringEnumDefault** | [**List<ArrayStringEnumDefaultEnum>**](#List<ArrayStringEnumDefaultEnum>) | | [optional] | +|**arrayStringDefault** | **List<String>** | | [optional] | +|**arrayIntegerDefault** | **List<Integer>** | | [optional] | +|**arrayString** | **List<String>** | | [optional] | +|**arrayStringNullable** | **List<String>** | | [optional] | +|**arrayStringExtensionNullable** | **List<String>** | | [optional] | +|**stringNullable** | **String** | | [optional] | + + + +## Enum: List<ArrayStringEnumDefaultEnum> + +| Name | Value | +|---- | -----| +| SUCCESS | "success" | +| FAILURE | "failure" | +| UNCLASSIFIED | "unclassified" | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/FormApi.md b/samples/client/echo_api/java/resttemplate/docs/FormApi.md new file mode 100644 index 000000000000..1f3ad73e9384 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/FormApi.md @@ -0,0 +1,156 @@ +# FormApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testFormIntegerBooleanString**](FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s) | +| [**testFormOneof**](FormApi.md#testFormOneof) | **POST** /form/oneof | Test form parameter(s) for oneOf schema | + + + +## testFormIntegerBooleanString + +> String testFormIntegerBooleanString(integerForm, booleanForm, stringForm) + +Test form parameter(s) + +Test form parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FormApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + FormApi apiInstance = new FormApi(defaultClient); + Integer integerForm = 56; // Integer | + Boolean booleanForm = true; // Boolean | + String stringForm = "stringForm_example"; // String | + try { + String result = apiInstance.testFormIntegerBooleanString(integerForm, booleanForm, stringForm); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormApi#testFormIntegerBooleanString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerForm** | **Integer**| | [optional] | +| **booleanForm** | **Boolean**| | [optional] | +| **stringForm** | **String**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testFormOneof + +> String testFormOneof(form1, form2, form3, form4, id, name) + +Test form parameter(s) for oneOf schema + +Test form parameter(s) for oneOf schema + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FormApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + FormApi apiInstance = new FormApi(defaultClient); + String form1 = "form1_example"; // String | + Integer form2 = 56; // Integer | + String form3 = "form3_example"; // String | + Boolean form4 = true; // Boolean | + Long id = 56L; // Long | + String name = "name_example"; // String | + try { + String result = apiInstance.testFormOneof(form1, form2, form3, form4, id, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormApi#testFormOneof"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **form1** | **String**| | [optional] | +| **form2** | **Integer**| | [optional] | +| **form3** | **String**| | [optional] | +| **form4** | **Boolean**| | [optional] | +| **id** | **Long**| | [optional] | +| **name** | **String**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/resttemplate/docs/HeaderApi.md b/samples/client/echo_api/java/resttemplate/docs/HeaderApi.md new file mode 100644 index 000000000000..e30880043fac --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/HeaderApi.md @@ -0,0 +1,83 @@ +# HeaderApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testHeaderIntegerBooleanStringEnums**](HeaderApi.md#testHeaderIntegerBooleanStringEnums) | **GET** /header/integer/boolean/string/enums | Test header parameter(s) | + + + +## testHeaderIntegerBooleanStringEnums + +> String testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader) + +Test header parameter(s) + +Test header parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HeaderApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + HeaderApi apiInstance = new HeaderApi(defaultClient); + Integer integerHeader = 56; // Integer | + Boolean booleanHeader = true; // Boolean | + String stringHeader = "stringHeader_example"; // String | + String enumNonrefStringHeader = "success"; // String | + StringEnumRef enumRefStringHeader = StringEnumRef.fromValue("success"); // StringEnumRef | + try { + String result = apiInstance.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling HeaderApi#testHeaderIntegerBooleanStringEnums"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerHeader** | **Integer**| | [optional] | +| **booleanHeader** | **Boolean**| | [optional] | +| **stringHeader** | **String**| | [optional] | +| **enumNonrefStringHeader** | **String**| | [optional] [enum: success, failure, unclassified] | +| **enumRefStringHeader** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/resttemplate/docs/NumberPropertiesOnly.md b/samples/client/echo_api/java/resttemplate/docs/NumberPropertiesOnly.md new file mode 100644 index 000000000000..7e153538475a --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/NumberPropertiesOnly.md @@ -0,0 +1,15 @@ + + +# NumberPropertiesOnly + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**number** | **BigDecimal** | | [optional] | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/PathApi.md b/samples/client/echo_api/java/resttemplate/docs/PathApi.md new file mode 100644 index 000000000000..e9a539e8c3e4 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/PathApi.md @@ -0,0 +1,81 @@ +# PathApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath**](PathApi.md#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath) | **GET** /path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path} | Test path parameter(s) | + + + +## testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath + +> String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath) + +Test path parameter(s) + +Test path parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PathApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + PathApi apiInstance = new PathApi(defaultClient); + String pathString = "pathString_example"; // String | + Integer pathInteger = 56; // Integer | + String enumNonrefStringPath = "success"; // String | + StringEnumRef enumRefStringPath = StringEnumRef.fromValue("success"); // StringEnumRef | + try { + String result = apiInstance.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pathString** | **String**| | | +| **pathInteger** | **Integer**| | | +| **enumNonrefStringPath** | **String**| | [enum: success, failure, unclassified] | +| **enumRefStringPath** | [**StringEnumRef**](.md)| | [enum: success, failure, unclassified] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/resttemplate/docs/Pet.md b/samples/client/echo_api/java/resttemplate/docs/Pet.md new file mode 100644 index 000000000000..82aa8a25ed7c --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/Pet.md @@ -0,0 +1,28 @@ + + +# Pet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | +|**category** | [**Category**](Category.md) | | [optional] | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/Query.md b/samples/client/echo_api/java/resttemplate/docs/Query.md new file mode 100644 index 000000000000..99c6fd6faa5d --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/Query.md @@ -0,0 +1,24 @@ + + +# Query + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | Query | [optional] | +|**outcomes** | [**List<OutcomesEnum>**](#List<OutcomesEnum>) | | [optional] | + + + +## Enum: List<OutcomesEnum> + +| Name | Value | +|---- | -----| +| SUCCESS | "SUCCESS" | +| FAILURE | "FAILURE" | +| SKIPPED | "SKIPPED" | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/QueryApi.md b/samples/client/echo_api/java/resttemplate/docs/QueryApi.md new file mode 100644 index 000000000000..2606c8e62ca9 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/QueryApi.md @@ -0,0 +1,554 @@ +# QueryApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testEnumRefString**](QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) | +| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) | +| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) | +| [**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) | +| [**testQueryStyleDeepObjectExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObjectAllOf) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObject**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) | + + + +## testEnumRefString + +> String testEnumRefString(enumNonrefStringQuery, enumRefStringQuery) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + String enumNonrefStringQuery = "success"; // String | + StringEnumRef enumRefStringQuery = StringEnumRef.fromValue("success"); // StringEnumRef | + try { + String result = apiInstance.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testEnumRefString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **enumNonrefStringQuery** | **String**| | [optional] [enum: success, failure, unclassified] | +| **enumRefStringQuery** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryDatetimeDateString + +> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + OffsetDateTime datetimeQuery = OffsetDateTime.now(); // OffsetDateTime | + LocalDate dateQuery = LocalDate.now(); // LocalDate | + String stringQuery = "stringQuery_example"; // String | + try { + String result = apiInstance.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryDatetimeDateString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **datetimeQuery** | **OffsetDateTime**| | [optional] | +| **dateQuery** | **LocalDate**| | [optional] | +| **stringQuery** | **String**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryIntegerBooleanString + +> String testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Integer integerQuery = 56; // Integer | + Boolean booleanQuery = true; // Boolean | + String stringQuery = "stringQuery_example"; // String | + try { + String result = apiInstance.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryIntegerBooleanString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerQuery** | **Integer**| | [optional] | +| **booleanQuery** | **Boolean**| | [optional] | +| **stringQuery** | **String**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleDeepObjectExplodeTrueObject + +> String testQueryStyleDeepObjectExplodeTrueObject(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Pet queryObject = new Pet(); // Pet | + try { + String result = apiInstance.testQueryStyleDeepObjectExplodeTrueObject(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleDeepObjectExplodeTrueObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**Pet**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleDeepObjectExplodeTrueObjectAllOf + +> String testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter | + try { + String result = apiInstance.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleDeepObjectExplodeTrueObjectAllOf"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueArrayString + +> String testQueryStyleFormExplodeTrueArrayString(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueArrayString(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueArrayString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueObject + +> String testQueryStyleFormExplodeTrueObject(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Pet queryObject = new Pet(); // Pet | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueObject(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**Pet**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueObjectAllOf + +> String testQueryStyleFormExplodeTrueObjectAllOf(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + DataQuery queryObject = new DataQuery(); // DataQuery | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueObjectAllOf(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueObjectAllOf"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**DataQuery**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/resttemplate/docs/StringEnumRef.md b/samples/client/echo_api/java/resttemplate/docs/StringEnumRef.md new file mode 100644 index 000000000000..dff22ecf074b --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/StringEnumRef.md @@ -0,0 +1,15 @@ + + +# StringEnumRef + +## Enum + + +* `SUCCESS` (value: `"success"`) + +* `FAILURE` (value: `"failure"`) + +* `UNCLASSIFIED` (value: `"unclassified"`) + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/Tag.md b/samples/client/echo_api/java/resttemplate/docs/Tag.md new file mode 100644 index 000000000000..5088b2dd1c31 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/Tag.md @@ -0,0 +1,14 @@ + + +# Tag + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md b/samples/client/echo_api/java/resttemplate/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md new file mode 100644 index 000000000000..a756a343e8a8 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md @@ -0,0 +1,16 @@ + + +# TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**size** | **String** | | [optional] | +|**color** | **String** | | [optional] | +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/echo_api/java/resttemplate/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/java/resttemplate/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md new file mode 100644 index 000000000000..9235e80fb823 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -0,0 +1,13 @@ + + +# TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**values** | **List<String>** | | [optional] | + + + diff --git a/samples/client/echo_api/java/resttemplate/git_push.sh b/samples/client/echo_api/java/resttemplate/git_push.sh new file mode 100644 index 000000000000..f53a75d4fabe --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/echo_api/java/resttemplate/gradle.properties b/samples/client/echo_api/java/resttemplate/gradle.properties new file mode 100644 index 000000000000..a3408578278a --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/gradle.properties @@ -0,0 +1,6 @@ +# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). +# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. +# +# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties +# For example, uncomment below to build for Android +#target = android diff --git a/samples/client/echo_api/java/resttemplate/gradle/wrapper/gradle-wrapper.jar b/samples/client/echo_api/java/resttemplate/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000000..7454180f2ae8 Binary files /dev/null and b/samples/client/echo_api/java/resttemplate/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/client/echo_api/java/resttemplate/gradle/wrapper/gradle-wrapper.properties b/samples/client/echo_api/java/resttemplate/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000000..ffed3a254e91 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/echo_api/java/resttemplate/gradlew b/samples/client/echo_api/java/resttemplate/gradlew new file mode 100644 index 000000000000..005bcde04284 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/samples/client/echo_api/java/resttemplate/gradlew.bat b/samples/client/echo_api/java/resttemplate/gradlew.bat new file mode 100644 index 000000000000..6a68175eb70f --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/samples/client/echo_api/java/resttemplate/pom.xml b/samples/client/echo_api/java/resttemplate/pom.xml new file mode 100644 index 000000000000..49ebb1b37502 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/pom.xml @@ -0,0 +1,276 @@ + + 4.0.0 + org.openapitools + echo-api-resttemplate + jar + echo-api-resttemplate + 0.1.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + true + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.4.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.5.0 + + none + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + org.springframework + spring-web + ${spring-web-version} + + + org.springframework + spring-context + ${spring-web-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + junit + junit + ${junit-version} + test + + + + UTF-8 + 5.3.24 + 2.15.2 + 2.15.2 + 0.2.6 + 1.3.5 + 4.13.2 + + diff --git a/samples/client/echo_api/java/resttemplate/settings.gradle b/samples/client/echo_api/java/resttemplate/settings.gradle new file mode 100644 index 000000000000..5b9c824d855e --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "echo-api-resttemplate" \ No newline at end of file diff --git a/samples/client/echo_api/java/resttemplate/src/main/AndroidManifest.xml b/samples/client/echo_api/java/resttemplate/src/main/AndroidManifest.xml new file mode 100644 index 000000000000..54fbcb3da1e8 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java new file mode 100644 index 000000000000..d399c723c4bf --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java @@ -0,0 +1,783 @@ +package org.openapitools.client; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpRequest; +import org.springframework.http.HttpStatus; +import org.springframework.http.InvalidMediaTypeException; +import org.springframework.http.MediaType; +import org.springframework.http.RequestEntity; +import org.springframework.http.RequestEntity.BodyBuilder; +import org.springframework.http.ResponseEntity; +import org.springframework.http.client.BufferingClientHttpRequestFactory; +import org.springframework.http.client.ClientHttpRequestExecution; +import org.springframework.http.client.ClientHttpRequestInterceptor; +import org.springframework.http.client.ClientHttpResponse; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.util.StringUtils; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.util.DefaultUriBuilderFactory; +import org.openapitools.jackson.nullable.JsonNullableModule; + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.text.DateFormat; +import java.text.ParseException; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TimeZone; +import java.util.function.Supplier; +import java.time.OffsetDateTime; + +import org.openapitools.client.auth.Authentication; +import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiClient extends JavaTimeFormatter { + public enum CollectionFormat { + CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null); + + private final String separator; + + private CollectionFormat(String separator) { + this.separator = separator; + } + + private String collectionToString(Collection collection) { + return StringUtils.collectionToDelimitedString(collection, separator); + } + } + + private boolean debugging = false; + + private HttpHeaders defaultHeaders = new HttpHeaders(); + private MultiValueMap defaultCookies = new LinkedMultiValueMap(); + + private String basePath = "http://localhost:3000"; + + private RestTemplate restTemplate; + + private Map authentications; + + private DateFormat dateFormat; + + public ApiClient() { + this.restTemplate = buildRestTemplate(); + init(); + } + + public ApiClient(RestTemplate restTemplate) { + this.restTemplate = restTemplate; + init(); + } + + protected void init() { + // Use RFC3339 format for date and datetime. + // See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14 + this.dateFormat = new RFC3339DateFormat(); + + // Use UTC as the default time zone. + this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + + // Set default User-Agent. + setUserAgent("Java-SDK"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap(); + authentications.put("http_auth", new HttpBasicAuth()); + authentications.put("http_bearer_auth", new HttpBearerAuth("bearer")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Get the current base path + * + * @return String the base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set the base path, which should include the host + * + * @param basePath the base path + * @return ApiClient this client + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map the currently configured authentication types + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set token for HTTP bearer authentication. + * + * @param bearerToken the token + */ + public void setBearerToken(String bearerToken) { + setBearerToken(() -> bearerToken); + } + + /** + * Helper method to set the token supplier for HTTP bearer authentication. + * + * @param tokenSupplier the token supplier function + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + + + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent the user agent string + * @return ApiClient this client + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param name The header's name + * @param value The header's value + * @return ApiClient this client + */ + public ApiClient addDefaultHeader(String name, String value) { + if (defaultHeaders.containsKey(name)) { + defaultHeaders.remove(name); + } + defaultHeaders.add(name, value); + return this; + } + + /** + * Add a default cookie. + * + * @param name The cookie's name + * @param value The cookie's value + * @return ApiClient this client + */ + public ApiClient addDefaultCookie(String name, String value) { + if (defaultCookies.containsKey(name)) { + defaultCookies.remove(name); + } + defaultCookies.add(name, value); + return this; + } + + public void setDebugging(boolean debugging) { + List currentInterceptors = this.restTemplate.getInterceptors(); + if (debugging) { + if (currentInterceptors == null) { + currentInterceptors = new ArrayList(); + } + ClientHttpRequestInterceptor interceptor = new ApiClientHttpRequestInterceptor(); + currentInterceptors.add(interceptor); + this.restTemplate.setInterceptors(currentInterceptors); + } else { + if (currentInterceptors != null && !currentInterceptors.isEmpty()) { + Iterator iter = currentInterceptors.iterator(); + while (iter.hasNext()) { + ClientHttpRequestInterceptor interceptor = iter.next(); + if (interceptor instanceof ApiClientHttpRequestInterceptor) { + iter.remove(); + } + } + this.restTemplate.setInterceptors(currentInterceptors); + } + } + this.debugging = debugging; + } + + /** + * Check that whether debugging is enabled for this API client. + * @return boolean true if this client is enabled for debugging, false otherwise + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Get the date format used to parse/format date parameters. + * @return DateFormat format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * @param dateFormat Date format + * @return API client + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Parse the given string into Date object. + * + * @param str the string to parse + * @return the Date parsed from the string + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * + * @param date the date to format + * @return the formatted date as string + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * + * @param param the object to convert + * @return String the parameter represented as a String + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate( (Date) param); + } else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param values The values of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(CollectionFormat collectionFormat, Collection values) { + // create the value based on the collection format + if (CollectionFormat.MULTI.equals(collectionFormat)) { + // not valid for path params + return parameterToString(values); + } + + // collectionFormat is assumed to be "csv" by default + if (collectionFormat == null) { + collectionFormat = CollectionFormat.CSV; + } + + return collectionFormat.collectionToString(values); + } + + /** + * Converts a parameter to a {@link MultiValueMap} for use in REST requests + * + * @param collectionFormat The format to convert to + * @param name The name of the parameter + * @param value The parameter's value + * @return a Map containing the String value(s) of the input parameter + */ + public MultiValueMap parameterToMultiValueMap(CollectionFormat collectionFormat, String name, Object value) { + final MultiValueMap params = new LinkedMultiValueMap(); + + if (name == null || name.isEmpty() || value == null) { + return params; + } + + if (collectionFormat == null) { + collectionFormat = CollectionFormat.CSV; + } + + if (value instanceof Map) { + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + for (final Entry entry : valuesMap.entrySet()) { + params.add(entry.getKey(), parameterToString(entry.getValue())); + } + return params; + } + + Collection valueCollection = null; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(name, parameterToString(value)); + return params; + } + + if (valueCollection.isEmpty()) { + return params; + } + + if (collectionFormat.equals(CollectionFormat.MULTI)) { + for (Object item : valueCollection) { + params.add(name, parameterToString(item)); + } + return params; + } + + List values = new ArrayList(); + for (Object o : valueCollection) { + values.add(parameterToString(o)); + } + params.add(name, collectionFormat.collectionToString(values)); + + return params; + } + + /** + * Check if the given {@code String} is a JSON MIME. + * + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents JSON, false otherwise + */ + public boolean isJsonMime(String mediaType) { + // "* / *" is default to JSON + if ("*/*".equals(mediaType)) { + return true; + } + + try { + return isJsonMime(MediaType.parseMediaType(mediaType)); + } catch (InvalidMediaTypeException e) { + } + return false; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents JSON, false otherwise + */ + public boolean isJsonMime(MediaType mediaType) { + return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*\\+json[;]?\\s*$")); + } + + /** + * Check if the given {@code String} is a Problem JSON MIME (RFC-7807). + * + * @param mediaType the input MediaType + * @return boolean true if the MediaType represents Problem JSON, false otherwise + */ + public boolean isProblemJsonMime(String mediaType) { + return "application/problem+json".equalsIgnoreCase(mediaType); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return List The list of MediaTypes to use for the Accept header + */ + public List selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + MediaType mediaType = MediaType.parseMediaType(accept); + if (isJsonMime(mediaType) && !isProblemJsonMime(accept)) { + return Collections.singletonList(mediaType); + } + } + return MediaType.parseMediaTypes(StringUtils.arrayToCommaDelimitedString(accepts)); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return MediaType The Content-Type header to use. If the given array is empty, JSON will be used. + */ + public MediaType selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return MediaType.APPLICATION_JSON; + } + for (String contentType : contentTypes) { + MediaType mediaType = MediaType.parseMediaType(contentType); + if (isJsonMime(mediaType)) { + return mediaType; + } + } + return MediaType.parseMediaType(contentTypes[0]); + } + + /** + * Select the body to use for the request + * + * @param obj the body object + * @param formParams the form parameters + * @param contentType the content type of the request + * @return Object the selected body + */ + protected Object selectBody(Object obj, MultiValueMap formParams, MediaType contentType) { + boolean isForm = MediaType.MULTIPART_FORM_DATA.isCompatibleWith(contentType) || MediaType.APPLICATION_FORM_URLENCODED.isCompatibleWith(contentType); + return isForm ? formParams : obj; + } + + /** + * Expand path template with variables + * + * @param pathTemplate path template with placeholders + * @param variables variables to replace + * @return path with placeholders replaced by variables + */ + public String expandPath(String pathTemplate, Map variables) { + return restTemplate.getUriTemplateHandler().expand(pathTemplate, variables).toString(); + } + + /** + * Include queryParams in uriParams taking into account the paramName + * + * @param queryParams The query parameters + * @param uriParams The path parameters + * return templatized query string + */ + public String generateQueryUri(MultiValueMap queryParams, Map uriParams) { + StringBuilder queryBuilder = new StringBuilder(); + queryParams.forEach((name, values) -> { + try { + final String encodedName = URLEncoder.encode(name.toString(), "UTF-8"); + if (CollectionUtils.isEmpty(values)) { + if (queryBuilder.length() != 0) { + queryBuilder.append('&'); + } + queryBuilder.append(encodedName); + } else { + int valueItemCounter = 0; + for (Object value : values) { + if (queryBuilder.length() != 0) { + queryBuilder.append('&'); + } + queryBuilder.append(encodedName); + if (value != null) { + String templatizedKey = encodedName + valueItemCounter++; + uriParams.put(templatizedKey, value.toString()); + queryBuilder.append('=').append("{").append(templatizedKey).append("}"); + } + } + } + } catch (UnsupportedEncodingException e) { + + } + }); + return queryBuilder.toString(); + + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param the return type to use + * @param path The sub-path of the HTTP URL + * @param method The request method + * @param pathParams The path parameters + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @return ResponseEntity<T> The response of the chosen type + */ + public ResponseEntity invokeAPI(String path, HttpMethod method, Map pathParams, MultiValueMap queryParams, Object body, HttpHeaders headerParams, MultiValueMap cookieParams, MultiValueMap formParams, List accept, MediaType contentType, String[] authNames, ParameterizedTypeReference returnType) throws RestClientException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + + Map uriParams = new HashMap<>(); + uriParams.putAll(pathParams); + + String finalUri = path; + + if (queryParams != null && !queryParams.isEmpty()) { + //Include queryParams in uriParams taking into account the paramName + String queryUri = generateQueryUri(queryParams, uriParams); + //Append to finalUri the templatized query string like "?param1={param1Value}&....... + finalUri += "?" + queryUri; + } + String expandedPath = this.expandPath(finalUri, uriParams); + final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(expandedPath); + + URI uri; + try { + uri = new URI(builder.build().toUriString()); + } catch (URISyntaxException ex) { + throw new RestClientException("Could not build URL: " + builder.toUriString(), ex); + } + + final BodyBuilder requestBuilder = RequestEntity.method(method, UriComponentsBuilder.fromHttpUrl(basePath).toUriString() + finalUri, uriParams); + if (accept != null) { + requestBuilder.accept(accept.toArray(new MediaType[accept.size()])); + } + if (contentType != null) { + requestBuilder.contentType(contentType); + } + + addHeadersToRequest(headerParams, requestBuilder); + addHeadersToRequest(defaultHeaders, requestBuilder); + addCookiesToRequest(cookieParams, requestBuilder); + addCookiesToRequest(defaultCookies, requestBuilder); + + RequestEntity requestEntity = requestBuilder.body(selectBody(body, formParams, contentType)); + + ResponseEntity responseEntity = restTemplate.exchange(requestEntity, returnType); + + if (responseEntity.getStatusCode().is2xxSuccessful()) { + return responseEntity; + } else { + // The error handler built into the RestTemplate should handle 400 and 500 series errors. + throw new RestClientException("API returned " + responseEntity.getStatusCode() + " and it wasn't handled by the RestTemplate error handler"); + } + } + + /** + * Add headers to the request that is being built + * @param headers The headers to add + * @param requestBuilder The current request + */ + protected void addHeadersToRequest(HttpHeaders headers, BodyBuilder requestBuilder) { + for (Entry> entry : headers.entrySet()) { + List values = entry.getValue(); + for (String value : values) { + if (value != null) { + requestBuilder.header(entry.getKey(), value); + } + } + } + } + + /** + * Add cookies to the request that is being built + * + * @param cookies The cookies to add + * @param requestBuilder The current request + */ + protected void addCookiesToRequest(MultiValueMap cookies, BodyBuilder requestBuilder) { + if (!cookies.isEmpty()) { + requestBuilder.header("Cookie", buildCookieHeader(cookies)); + } + } + + /** + * Build cookie header. Keeps a single value per cookie (as per + * RFC6265 section 5.3). + * + * @param cookies map all cookies + * @return header string for cookies. + */ + private String buildCookieHeader(MultiValueMap cookies) { + final StringBuilder cookieValue = new StringBuilder(); + String delimiter = ""; + for (final Map.Entry> entry : cookies.entrySet()) { + final String value = entry.getValue().get(entry.getValue().size() - 1); + cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), value)); + delimiter = "; "; + } + return cookieValue.toString(); + } + + /** + * Build the RestTemplate used to make HTTP requests. + * @return RestTemplate + */ + protected RestTemplate buildRestTemplate() { + RestTemplate restTemplate = new RestTemplate(); + // This allows us to read the response more than once - Necessary for debugging. + restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(restTemplate.getRequestFactory())); + + // disable default URL encoding + DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory(); + uriBuilderFactory.setEncodingMode(DefaultUriBuilderFactory.EncodingMode.VALUES_ONLY); + restTemplate.setUriTemplateHandler(uriBuilderFactory); + return restTemplate; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams The query parameters + * @param headerParams The header parameters + */ + protected void updateParamsForAuth(String[] authNames, MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RestClientException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } + + private class ApiClientHttpRequestInterceptor implements ClientHttpRequestInterceptor { + private final Log log = LogFactory.getLog(ApiClientHttpRequestInterceptor.class); + + @Override + public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { + logRequest(request, body); + ClientHttpResponse response = execution.execute(request, body); + logResponse(response); + return response; + } + + private void logRequest(HttpRequest request, byte[] body) throws UnsupportedEncodingException { + log.info("URI: " + request.getURI()); + log.info("HTTP Method: " + request.getMethod()); + log.info("HTTP Headers: " + headersToString(request.getHeaders())); + log.info("Request Body: " + new String(body, StandardCharsets.UTF_8)); + } + + private void logResponse(ClientHttpResponse response) throws IOException { + log.info("HTTP Status Code: " + response.getRawStatusCode()); + log.info("Status Text: " + response.getStatusText()); + log.info("HTTP Headers: " + headersToString(response.getHeaders())); + log.info("Response Body: " + bodyToString(response.getBody())); + } + + private String headersToString(HttpHeaders headers) { + if(headers == null || headers.isEmpty()) { + return ""; + } + StringBuilder builder = new StringBuilder(); + for (Entry> entry : headers.entrySet()) { + builder.append(entry.getKey()).append("=["); + for (String value : entry.getValue()) { + builder.append(value).append(","); + } + builder.setLength(builder.length() - 1); // Get rid of trailing comma + builder.append("],"); + } + builder.setLength(builder.length() - 1); // Get rid of trailing comma + return builder.toString(); + } + + private String bodyToString(InputStream body) throws IOException { + StringBuilder builder = new StringBuilder(); + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(body, StandardCharsets.UTF_8)); + String line = bufferedReader.readLine(); + while (line != null) { + builder.append(line).append(System.lineSeparator()); + line = bufferedReader.readLine(); + } + bufferedReader.close(); + return builder.toString(); + } + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/JavaTimeFormatter.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/JavaTimeFormatter.java new file mode 100644 index 000000000000..b51199a21b06 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/JavaTimeFormatter.java @@ -0,0 +1,64 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +/** + * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class. + * It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JavaTimeFormatter { + + private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + /** + * Get the date format used to parse/format {@code OffsetDateTime} parameters. + * @return DateTimeFormatter + */ + public DateTimeFormatter getOffsetDateTimeFormatter() { + return offsetDateTimeFormatter; + } + + /** + * Set the date format used to parse/format {@code OffsetDateTime} parameters. + * @param offsetDateTimeFormatter {@code DateTimeFormatter} + */ + public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { + this.offsetDateTimeFormatter = offsetDateTimeFormatter; + } + + /** + * Parse the given string into {@code OffsetDateTime} object. + * @param str String + * @return {@code OffsetDateTime} + */ + public OffsetDateTime parseOffsetDateTime(String str) { + try { + return OffsetDateTime.parse(str, offsetDateTimeFormatter); + } catch (DateTimeParseException e) { + throw new RuntimeException(e); + } + } + /** + * Format the given {@code OffsetDateTime} object into string. + * @param offsetDateTime {@code OffsetDateTime} + * @return {@code OffsetDateTime} in string format + */ + public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { + return offsetDateTimeFormatter.format(offsetDateTime); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/RFC3339DateFormat.java new file mode 100644 index 000000000000..22bbe68c49f4 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -0,0 +1,57 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.text.DecimalFormat; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} \ No newline at end of file diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ServerConfiguration.java new file mode 100644 index 000000000000..59edc528a446 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -0,0 +1,58 @@ +package org.openapitools.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ServerVariable.java new file mode 100644 index 000000000000..c2f13e216662 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/ServerVariable.java @@ -0,0 +1,23 @@ +package org.openapitools.client; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/AuthApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/AuthApi.java new file mode 100644 index 000000000000..109f35c294aa --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/AuthApi.java @@ -0,0 +1,125 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthApi { + private ApiClient apiClient; + + public AuthApi() { + this(new ApiClient()); + } + + public AuthApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * To test HTTP basic authentication + * To test HTTP basic authentication + *

200 - Successful operation + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testAuthHttpBasic() throws RestClientException { + return testAuthHttpBasicWithHttpInfo().getBody(); + } + + /** + * To test HTTP basic authentication + * To test HTTP basic authentication + *

200 - Successful operation + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testAuthHttpBasicWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_auth" }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/auth/http/basic", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + *

200 - Successful operation + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testAuthHttpBearer() throws RestClientException { + return testAuthHttpBearerWithHttpInfo().getBody(); + } + + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + *

200 - Successful operation + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testAuthHttpBearerWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_bearer_auth" }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/auth/http/bearer", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java new file mode 100644 index 000000000000..65bf836b78c2 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java @@ -0,0 +1,398 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import java.io.File; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.Tag; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BodyApi { + private ApiClient apiClient; + + public BodyApi() { + this(new ApiClient()); + } + + public BodyApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test binary (gif) response body + * Test binary (gif) response body + *

200 - Successful operation + * @return File + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public File testBinaryGif() throws RestClientException { + return testBinaryGifWithHttpInfo().getBody(); + } + + /** + * Test binary (gif) response body + * Test binary (gif) response body + *

200 - Successful operation + * @return ResponseEntity<File> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBinaryGifWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "image/gif" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/binary/gif", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test body parameter(s) + * Test body parameter(s) + *

200 - Successful operation + * @param body (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testBodyApplicationOctetstreamBinary(File body) throws RestClientException { + return testBodyApplicationOctetstreamBinaryWithHttpInfo(body).getBody(); + } + + /** + * Test body parameter(s) + * Test body parameter(s) + *

200 - Successful operation + * @param body (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyApplicationOctetstreamBinaryWithHttpInfo(File body) throws RestClientException { + Object localVarPostBody = body; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/octet-stream" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/body/application/octetstream/binary", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test array of binary in multipart mime + * Test array of binary in multipart mime + *

200 - Successful operation + * @param files (required) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testBodyMultipartFormdataArrayOfBinary(List files) throws RestClientException { + return testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files).getBody(); + } + + /** + * Test array of binary in multipart mime + * Test array of binary in multipart mime + *

200 - Successful operation + * @param files (required) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(List files) throws RestClientException { + Object localVarPostBody = null; + + // verify the required parameter 'files' is set + if (files == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'files' when calling testBodyMultipartFormdataArrayOfBinary"); + } + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + if (files != null) + localVarFormParams.addAll("files", files.stream().map(FileSystemResource::new).collect(Collectors.toList())); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/body/application/octetstream/array_of_binary", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test body parameter(s) + * Test body parameter(s) + *

200 - Successful operation + * @param pet Pet object that needs to be added to the store (optional) + * @return Pet + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public Pet testEchoBodyAllOfPet(Pet pet) throws RestClientException { + return testEchoBodyAllOfPetWithHttpInfo(pet).getBody(); + } + + /** + * Test body parameter(s) + * Test body parameter(s) + *

200 - Successful operation + * @param pet Pet object that needs to be added to the store (optional) + * @return ResponseEntity<Pet> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEchoBodyAllOfPetWithHttpInfo(Pet pet) throws RestClientException { + Object localVarPostBody = pet; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/echo/body/allOf/Pet", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test free form object + * Test free form object + *

200 - Successful operation + * @param body Free form object (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testEchoBodyFreeFormObjectResponseString(Object body) throws RestClientException { + return testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body).getBody(); + } + + /** + * Test free form object + * Test free form object + *

200 - Successful operation + * @param body Free form object (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object body) throws RestClientException { + Object localVarPostBody = body; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/echo/body/FreeFormObject/response_string", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test body parameter(s) + * Test body parameter(s) + *

200 - Successful operation + * @param pet Pet object that needs to be added to the store (optional) + * @return Pet + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public Pet testEchoBodyPet(Pet pet) throws RestClientException { + return testEchoBodyPetWithHttpInfo(pet).getBody(); + } + + /** + * Test body parameter(s) + * Test body parameter(s) + *

200 - Successful operation + * @param pet Pet object that needs to be added to the store (optional) + * @return ResponseEntity<Pet> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEchoBodyPetWithHttpInfo(Pet pet) throws RestClientException { + Object localVarPostBody = pet; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/echo/body/Pet", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test empty response body + * Test empty response body + *

200 - Successful operation + * @param pet Pet object that needs to be added to the store (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testEchoBodyPetResponseString(Pet pet) throws RestClientException { + return testEchoBodyPetResponseStringWithHttpInfo(pet).getBody(); + } + + /** + * Test empty response body + * Test empty response body + *

200 - Successful operation + * @param pet Pet object that needs to be added to the store (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEchoBodyPetResponseStringWithHttpInfo(Pet pet) throws RestClientException { + Object localVarPostBody = pet; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/echo/body/Pet/response_string", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test empty json (request body) + * Test empty json (request body) + *

200 - Successful operation + * @param tag Tag object (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testEchoBodyTagResponseString(Tag tag) throws RestClientException { + return testEchoBodyTagResponseStringWithHttpInfo(tag).getBody(); + } + + /** + * Test empty json (request body) + * Test empty json (request body) + *

200 - Successful operation + * @param tag Tag object (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEchoBodyTagResponseStringWithHttpInfo(Tag tag) throws RestClientException { + Object localVarPostBody = tag; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/echo/body/Tag/response_string", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/FormApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/FormApi.java new file mode 100644 index 000000000000..9befcecfbaf6 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/FormApi.java @@ -0,0 +1,167 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FormApi { + private ApiClient apiClient; + + public FormApi() { + this(new ApiClient()); + } + + public FormApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test form parameter(s) + * Test form parameter(s) + *

200 - Successful operation + * @param integerForm (optional) + * @param booleanForm (optional) + * @param stringForm (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testFormIntegerBooleanString(Integer integerForm, Boolean booleanForm, String stringForm) throws RestClientException { + return testFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm).getBody(); + } + + /** + * Test form parameter(s) + * Test form parameter(s) + *

200 - Successful operation + * @param integerForm (optional) + * @param booleanForm (optional) + * @param stringForm (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testFormIntegerBooleanStringWithHttpInfo(Integer integerForm, Boolean booleanForm, String stringForm) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + if (integerForm != null) + localVarFormParams.add("integer_form", integerForm); + if (booleanForm != null) + localVarFormParams.add("boolean_form", booleanForm); + if (stringForm != null) + localVarFormParams.add("string_form", stringForm); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/form/integer/boolean/string", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test form parameter(s) for oneOf schema + * Test form parameter(s) for oneOf schema + *

200 - Successful operation + * @param form1 (optional) + * @param form2 (optional) + * @param form3 (optional) + * @param form4 (optional) + * @param id (optional) + * @param name (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testFormOneof(String form1, Integer form2, String form3, Boolean form4, Long id, String name) throws RestClientException { + return testFormOneofWithHttpInfo(form1, form2, form3, form4, id, name).getBody(); + } + + /** + * Test form parameter(s) for oneOf schema + * Test form parameter(s) for oneOf schema + *

200 - Successful operation + * @param form1 (optional) + * @param form2 (optional) + * @param form3 (optional) + * @param form4 (optional) + * @param id (optional) + * @param name (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testFormOneofWithHttpInfo(String form1, Integer form2, String form3, Boolean form4, Long id, String name) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + if (form1 != null) + localVarFormParams.add("form1", form1); + if (form2 != null) + localVarFormParams.add("form2", form2); + if (form3 != null) + localVarFormParams.add("form3", form3); + if (form4 != null) + localVarFormParams.add("form4", form4); + if (id != null) + localVarFormParams.add("id", id); + if (name != null) + localVarFormParams.add("name", name); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/form/oneof", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/HeaderApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/HeaderApi.java new file mode 100644 index 000000000000..121f8875a722 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/HeaderApi.java @@ -0,0 +1,108 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.StringEnumRef; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HeaderApi { + private ApiClient apiClient; + + public HeaderApi() { + this(new ApiClient()); + } + + public HeaderApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test header parameter(s) + * Test header parameter(s) + *

200 - Successful operation + * @param integerHeader (optional) + * @param booleanHeader (optional) + * @param stringHeader (optional) + * @param enumNonrefStringHeader (optional) + * @param enumRefStringHeader (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testHeaderIntegerBooleanStringEnums(Integer integerHeader, Boolean booleanHeader, String stringHeader, String enumNonrefStringHeader, StringEnumRef enumRefStringHeader) throws RestClientException { + return testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader).getBody(); + } + + /** + * Test header parameter(s) + * Test header parameter(s) + *

200 - Successful operation + * @param integerHeader (optional) + * @param booleanHeader (optional) + * @param stringHeader (optional) + * @param enumNonrefStringHeader (optional) + * @param enumRefStringHeader (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testHeaderIntegerBooleanStringEnumsWithHttpInfo(Integer integerHeader, Boolean booleanHeader, String stringHeader, String enumNonrefStringHeader, StringEnumRef enumRefStringHeader) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + if (integerHeader != null) + localVarHeaderParams.add("integer_header", apiClient.parameterToString(integerHeader)); + if (booleanHeader != null) + localVarHeaderParams.add("boolean_header", apiClient.parameterToString(booleanHeader)); + if (stringHeader != null) + localVarHeaderParams.add("string_header", apiClient.parameterToString(stringHeader)); + if (enumNonrefStringHeader != null) + localVarHeaderParams.add("enum_nonref_string_header", apiClient.parameterToString(enumNonrefStringHeader)); + if (enumRefStringHeader != null) + localVarHeaderParams.add("enum_ref_string_header", apiClient.parameterToString(enumRefStringHeader)); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/header/integer/boolean/string/enums", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/PathApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/PathApi.java new file mode 100644 index 000000000000..764808413412 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/PathApi.java @@ -0,0 +1,121 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.StringEnumRef; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PathApi { + private ApiClient apiClient; + + public PathApi() { + this(new ApiClient()); + } + + public PathApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test path parameter(s) + * Test path parameter(s) + *

200 - Successful operation + * @param pathString (required) + * @param pathInteger (required) + * @param enumNonrefStringPath (required) + * @param enumRefStringPath (required) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(String pathString, Integer pathInteger, String enumNonrefStringPath, StringEnumRef enumRefStringPath) throws RestClientException { + return testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath).getBody(); + } + + /** + * Test path parameter(s) + * Test path parameter(s) + *

200 - Successful operation + * @param pathString (required) + * @param pathInteger (required) + * @param enumNonrefStringPath (required) + * @param enumRefStringPath (required) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(String pathString, Integer pathInteger, String enumNonrefStringPath, StringEnumRef enumRefStringPath) throws RestClientException { + Object localVarPostBody = null; + + // verify the required parameter 'pathString' is set + if (pathString == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pathString' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + } + + // verify the required parameter 'pathInteger' is set + if (pathInteger == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pathInteger' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + } + + // verify the required parameter 'enumNonrefStringPath' is set + if (enumNonrefStringPath == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'enumNonrefStringPath' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + } + + // verify the required parameter 'enumRefStringPath' is set + if (enumRefStringPath == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'enumRefStringPath' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + } + + // create path and map variables + final Map uriVariables = new HashMap(); + uriVariables.put("path_string", pathString); + uriVariables.put("path_integer", pathInteger); + uriVariables.put("enum_nonref_string_path", enumNonrefStringPath); + uriVariables.put("enum_ref_string_path", enumRefStringPath); + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}", HttpMethod.GET, uriVariables, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/QueryApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/QueryApi.java new file mode 100644 index 000000000000..99b0206a8014 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/QueryApi.java @@ -0,0 +1,431 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.DataQuery; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.StringEnumRef; +import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class QueryApi { + private ApiClient apiClient; + + public QueryApi() { + this(new ApiClient()); + } + + public QueryApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param enumNonrefStringQuery (optional) + * @param enumRefStringQuery (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testEnumRefString(String enumNonrefStringQuery, StringEnumRef enumRefStringQuery) throws RestClientException { + return testEnumRefStringWithHttpInfo(enumNonrefStringQuery, enumRefStringQuery).getBody(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param enumNonrefStringQuery (optional) + * @param enumRefStringQuery (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testEnumRefStringWithHttpInfo(String enumNonrefStringQuery, StringEnumRef enumRefStringQuery) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_nonref_string_query", enumNonrefStringQuery)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_ref_string_query", enumRefStringQuery)); + + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/query/enum_ref_string", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param datetimeQuery (optional) + * @param dateQuery (optional) + * @param stringQuery (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testQueryDatetimeDateString(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws RestClientException { + return testQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery).getBody(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param datetimeQuery (optional) + * @param dateQuery (optional) + * @param stringQuery (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryDatetimeDateStringWithHttpInfo(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "datetime_query", datetimeQuery)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "date_query", dateQuery)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "string_query", stringQuery)); + + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/query/datetime/date/string", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param integerQuery (optional) + * @param booleanQuery (optional) + * @param stringQuery (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws RestClientException { + return testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery).getBody(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param integerQuery (optional) + * @param booleanQuery (optional) + * @param stringQuery (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryIntegerBooleanStringWithHttpInfo(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "integer_query", integerQuery)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "boolean_query", booleanQuery)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "string_query", stringQuery)); + + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/query/integer/boolean/string", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testQueryStyleDeepObjectExplodeTrueObject(Pet queryObject) throws RestClientException { + return testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject).getBody(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Pet queryObject) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "id", queryObject.getId())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "name", queryObject.getName())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "category", queryObject.getCategory())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "photoUrls", queryObject.getPhotoUrls())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "tags", queryObject.getTags())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "status", queryObject.getStatus())); + + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/query/style_deepObject/explode_true/object", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws RestClientException { + return testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject).getBody(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "query_object", queryObject)); + + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/query/style_deepObject/explode_true/object/allOf", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws RestClientException { + return testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject).getBody(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "values", queryObject.getValues())); + + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/query/style_form/explode_true/array_string", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws RestClientException { + return testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject).getBody(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryStyleFormExplodeTrueObjectWithHttpInfo(Pet queryObject) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "id", queryObject.getId())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "name", queryObject.getName())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "category", queryObject.getCategory())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "photoUrls", queryObject.getPhotoUrls())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "tags", queryObject.getTags())); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "status", queryObject.getStatus())); + + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/query/style_form/explode_true/object", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testQueryStyleFormExplodeTrueObjectAllOf(DataQuery queryObject) throws RestClientException { + return testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject).getBody(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + *

200 - Successful operation + * @param queryObject (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(DataQuery queryObject) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "query_object", queryObject)); + + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/query/style_form/explode_true/object/allOf", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java new file mode 100644 index 000000000000..9e9f3733160e --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -0,0 +1,62 @@ +package org.openapitools.client.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if (location.equals("query")) { + queryParams.add(paramName, value); + } else if (location.equals("header")) { + headerParams.add(paramName, value); + } else if (location.equals("cookie")) { + cookieParams.add(paramName, value); + } + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/Authentication.java new file mode 100644 index 000000000000..4f9a14ebd7c3 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/Authentication.java @@ -0,0 +1,14 @@ +package org.openapitools.client.auth; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +public interface Authentication { + /** + * Apply authentication settings to header and / or query parameters. + * @param queryParams The query parameters for the request + * @param headerParams The header parameters for the request + * @param cookieParams The cookie parameters for the request + */ + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams); +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java new file mode 100644 index 000000000000..81de07ee04f5 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -0,0 +1,38 @@ +package org.openapitools.client.auth; + +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java new file mode 100644 index 000000000000..51d5e3278ef7 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -0,0 +1,41 @@ +package org.openapitools.client.auth; + +import java.util.Optional; +import java.util.function.Supplier; +import org.springframework.http.HttpHeaders; +import org.springframework.util.MultiValueMap; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + public String getBearerToken() { + return tokenSupplier.get(); + } + + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + headerParams.add(HttpHeaders.AUTHORIZATION, (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Bird.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Bird.java new file mode 100644 index 000000000000..1e3195e9bdda --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Bird.java @@ -0,0 +1,135 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Bird + */ +@JsonPropertyOrder({ + Bird.JSON_PROPERTY_SIZE, + Bird.JSON_PROPERTY_COLOR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Bird { + public static final String JSON_PROPERTY_SIZE = "size"; + private String size; + + public static final String JSON_PROPERTY_COLOR = "color"; + private String color; + + public Bird() { + } + + public Bird size(String size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSize() { + return size; + } + + + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSize(String size) { + this.size = size; + } + + + public Bird color(String color) { + + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getColor() { + return color; + } + + + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColor(String color) { + this.color = color; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Bird bird = (Bird) o; + return Objects.equals(this.size, bird.size) && + Objects.equals(this.color, bird.color); + } + + @Override + public int hashCode() { + return Objects.hash(size, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Bird {\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 000000000000..29d956d6cb75 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,135 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Category + */ +@JsonPropertyOrder({ + Category.JSON_PROPERTY_ID, + Category.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Category { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Category() { + } + + public Category id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Category name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DataQuery.java new file mode 100644 index 000000000000..5f1c039d516a --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DataQuery.java @@ -0,0 +1,187 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Query; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * DataQuery + */ +@JsonPropertyOrder({ + DataQuery.JSON_PROPERTY_SUFFIX, + DataQuery.JSON_PROPERTY_TEXT, + DataQuery.JSON_PROPERTY_DATE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DataQuery extends Query { + public static final String JSON_PROPERTY_SUFFIX = "suffix"; + private String suffix; + + public static final String JSON_PROPERTY_TEXT = "text"; + private String text; + + public static final String JSON_PROPERTY_DATE = "date"; + private OffsetDateTime date; + + public DataQuery() { + + } + + public DataQuery suffix(String suffix) { + + this.suffix = suffix; + return this; + } + + /** + * test suffix + * @return suffix + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUFFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSuffix() { + return suffix; + } + + + @JsonProperty(JSON_PROPERTY_SUFFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + + public DataQuery text(String text) { + + this.text = text; + return this; + } + + /** + * Some text containing white spaces + * @return text + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getText() { + return text; + } + + + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setText(String text) { + this.text = text; + } + + + public DataQuery date(OffsetDateTime date) { + + this.date = date; + return this; + } + + /** + * A date + * @return date + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDate() { + return date; + } + + + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDate(OffsetDateTime date) { + this.date = date; + } + + @Override + public DataQuery id(Long id) { + this.setId(id); + return this; + } + + @Override + public DataQuery outcomes(List outcomes) { + this.setOutcomes(outcomes); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataQuery dataQuery = (DataQuery) o; + return Objects.equals(this.suffix, dataQuery.suffix) && + Objects.equals(this.text, dataQuery.text) && + Objects.equals(this.date, dataQuery.date) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(suffix, text, date, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataQuery {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DefaultValue.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DefaultValue.java new file mode 100644 index 000000000000..1365a5fcb045 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/DefaultValue.java @@ -0,0 +1,471 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.StringEnumRef; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * to test the default value of properties + */ +@JsonPropertyOrder({ + DefaultValue.JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT, + DefaultValue.JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT, + DefaultValue.JSON_PROPERTY_ARRAY_STRING_DEFAULT, + DefaultValue.JSON_PROPERTY_ARRAY_INTEGER_DEFAULT, + DefaultValue.JSON_PROPERTY_ARRAY_STRING, + DefaultValue.JSON_PROPERTY_ARRAY_STRING_NULLABLE, + DefaultValue.JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE, + DefaultValue.JSON_PROPERTY_STRING_NULLABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultValue { + public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT = "array_string_enum_ref_default"; + private List arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE)); + + /** + * Gets or Sets arrayStringEnumDefault + */ + public enum ArrayStringEnumDefaultEnum { + SUCCESS("success"), + + FAILURE("failure"), + + UNCLASSIFIED("unclassified"); + + private String value; + + ArrayStringEnumDefaultEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayStringEnumDefaultEnum fromValue(String value) { + for (ArrayStringEnumDefaultEnum b : ArrayStringEnumDefaultEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT = "array_string_enum_default"; + private List arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE)); + + public static final String JSON_PROPERTY_ARRAY_STRING_DEFAULT = "array_string_default"; + private List arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped")); + + public static final String JSON_PROPERTY_ARRAY_INTEGER_DEFAULT = "array_integer_default"; + private List arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3)); + + public static final String JSON_PROPERTY_ARRAY_STRING = "array_string"; + private List arrayString; + + public static final String JSON_PROPERTY_ARRAY_STRING_NULLABLE = "array_string_nullable"; + private JsonNullable> arrayStringNullable = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE = "array_string_extension_nullable"; + private JsonNullable> arrayStringExtensionNullable = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STRING_NULLABLE = "string_nullable"; + private JsonNullable stringNullable = JsonNullable.undefined(); + + public DefaultValue() { + } + + public DefaultValue arrayStringEnumRefDefault(List arrayStringEnumRefDefault) { + + this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; + return this; + } + + public DefaultValue addArrayStringEnumRefDefaultItem(StringEnumRef arrayStringEnumRefDefaultItem) { + if (this.arrayStringEnumRefDefault == null) { + this.arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE)); + } + this.arrayStringEnumRefDefault.add(arrayStringEnumRefDefaultItem); + return this; + } + + /** + * Get arrayStringEnumRefDefault + * @return arrayStringEnumRefDefault + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayStringEnumRefDefault() { + return arrayStringEnumRefDefault; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayStringEnumRefDefault(List arrayStringEnumRefDefault) { + this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; + } + + + public DefaultValue arrayStringEnumDefault(List arrayStringEnumDefault) { + + this.arrayStringEnumDefault = arrayStringEnumDefault; + return this; + } + + public DefaultValue addArrayStringEnumDefaultItem(ArrayStringEnumDefaultEnum arrayStringEnumDefaultItem) { + if (this.arrayStringEnumDefault == null) { + this.arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE)); + } + this.arrayStringEnumDefault.add(arrayStringEnumDefaultItem); + return this; + } + + /** + * Get arrayStringEnumDefault + * @return arrayStringEnumDefault + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayStringEnumDefault() { + return arrayStringEnumDefault; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayStringEnumDefault(List arrayStringEnumDefault) { + this.arrayStringEnumDefault = arrayStringEnumDefault; + } + + + public DefaultValue arrayStringDefault(List arrayStringDefault) { + + this.arrayStringDefault = arrayStringDefault; + return this; + } + + public DefaultValue addArrayStringDefaultItem(String arrayStringDefaultItem) { + if (this.arrayStringDefault == null) { + this.arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped")); + } + this.arrayStringDefault.add(arrayStringDefaultItem); + return this; + } + + /** + * Get arrayStringDefault + * @return arrayStringDefault + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayStringDefault() { + return arrayStringDefault; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayStringDefault(List arrayStringDefault) { + this.arrayStringDefault = arrayStringDefault; + } + + + public DefaultValue arrayIntegerDefault(List arrayIntegerDefault) { + + this.arrayIntegerDefault = arrayIntegerDefault; + return this; + } + + public DefaultValue addArrayIntegerDefaultItem(Integer arrayIntegerDefaultItem) { + if (this.arrayIntegerDefault == null) { + this.arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3)); + } + this.arrayIntegerDefault.add(arrayIntegerDefaultItem); + return this; + } + + /** + * Get arrayIntegerDefault + * @return arrayIntegerDefault + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayIntegerDefault() { + return arrayIntegerDefault; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayIntegerDefault(List arrayIntegerDefault) { + this.arrayIntegerDefault = arrayIntegerDefault; + } + + + public DefaultValue arrayString(List arrayString) { + + this.arrayString = arrayString; + return this; + } + + public DefaultValue addArrayStringItem(String arrayStringItem) { + if (this.arrayString == null) { + this.arrayString = new ArrayList<>(); + } + this.arrayString.add(arrayStringItem); + return this; + } + + /** + * Get arrayString + * @return arrayString + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayString() { + return arrayString; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayString(List arrayString) { + this.arrayString = arrayString; + } + + + public DefaultValue arrayStringNullable(List arrayStringNullable) { + this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); + + return this; + } + + public DefaultValue addArrayStringNullableItem(String arrayStringNullableItem) { + if (this.arrayStringNullable == null || !this.arrayStringNullable.isPresent()) { + this.arrayStringNullable = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayStringNullable.get().add(arrayStringNullableItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayStringNullable + * @return arrayStringNullable + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayStringNullable() { + return arrayStringNullable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayStringNullable_JsonNullable() { + return arrayStringNullable; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_NULLABLE) + public void setArrayStringNullable_JsonNullable(JsonNullable> arrayStringNullable) { + this.arrayStringNullable = arrayStringNullable; + } + + public void setArrayStringNullable(List arrayStringNullable) { + this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); + } + + + public DefaultValue arrayStringExtensionNullable(List arrayStringExtensionNullable) { + this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); + + return this; + } + + public DefaultValue addArrayStringExtensionNullableItem(String arrayStringExtensionNullableItem) { + if (this.arrayStringExtensionNullable == null || !this.arrayStringExtensionNullable.isPresent()) { + this.arrayStringExtensionNullable = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayStringExtensionNullable.get().add(arrayStringExtensionNullableItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayStringExtensionNullable + * @return arrayStringExtensionNullable + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayStringExtensionNullable() { + return arrayStringExtensionNullable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayStringExtensionNullable_JsonNullable() { + return arrayStringExtensionNullable; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE) + public void setArrayStringExtensionNullable_JsonNullable(JsonNullable> arrayStringExtensionNullable) { + this.arrayStringExtensionNullable = arrayStringExtensionNullable; + } + + public void setArrayStringExtensionNullable(List arrayStringExtensionNullable) { + this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); + } + + + public DefaultValue stringNullable(String stringNullable) { + this.stringNullable = JsonNullable.of(stringNullable); + + return this; + } + + /** + * Get stringNullable + * @return stringNullable + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringNullable() { + return stringNullable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringNullable_JsonNullable() { + return stringNullable; + } + + @JsonProperty(JSON_PROPERTY_STRING_NULLABLE) + public void setStringNullable_JsonNullable(JsonNullable stringNullable) { + this.stringNullable = stringNullable; + } + + public void setStringNullable(String stringNullable) { + this.stringNullable = JsonNullable.of(stringNullable); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefaultValue defaultValue = (DefaultValue) o; + return Objects.equals(this.arrayStringEnumRefDefault, defaultValue.arrayStringEnumRefDefault) && + Objects.equals(this.arrayStringEnumDefault, defaultValue.arrayStringEnumDefault) && + Objects.equals(this.arrayStringDefault, defaultValue.arrayStringDefault) && + Objects.equals(this.arrayIntegerDefault, defaultValue.arrayIntegerDefault) && + Objects.equals(this.arrayString, defaultValue.arrayString) && + equalsNullable(this.arrayStringNullable, defaultValue.arrayStringNullable) && + equalsNullable(this.arrayStringExtensionNullable, defaultValue.arrayStringExtensionNullable) && + equalsNullable(this.stringNullable, defaultValue.stringNullable); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(arrayStringEnumRefDefault, arrayStringEnumDefault, arrayStringDefault, arrayIntegerDefault, arrayString, hashCodeNullable(arrayStringNullable), hashCodeNullable(arrayStringExtensionNullable), hashCodeNullable(stringNullable)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultValue {\n"); + sb.append(" arrayStringEnumRefDefault: ").append(toIndentedString(arrayStringEnumRefDefault)).append("\n"); + sb.append(" arrayStringEnumDefault: ").append(toIndentedString(arrayStringEnumDefault)).append("\n"); + sb.append(" arrayStringDefault: ").append(toIndentedString(arrayStringDefault)).append("\n"); + sb.append(" arrayIntegerDefault: ").append(toIndentedString(arrayIntegerDefault)).append("\n"); + sb.append(" arrayString: ").append(toIndentedString(arrayString)).append("\n"); + sb.append(" arrayStringNullable: ").append(toIndentedString(arrayStringNullable)).append("\n"); + sb.append(" arrayStringExtensionNullable: ").append(toIndentedString(arrayStringExtensionNullable)).append("\n"); + sb.append(" stringNullable: ").append(toIndentedString(stringNullable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java new file mode 100644 index 000000000000..96de851944c1 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java @@ -0,0 +1,170 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NumberPropertiesOnly + */ +@JsonPropertyOrder({ + NumberPropertiesOnly.JSON_PROPERTY_NUMBER, + NumberPropertiesOnly.JSON_PROPERTY_FLOAT, + NumberPropertiesOnly.JSON_PROPERTY_DOUBLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NumberPropertiesOnly { + public static final String JSON_PROPERTY_NUMBER = "number"; + private BigDecimal number; + + public static final String JSON_PROPERTY_FLOAT = "float"; + private Float _float; + + public static final String JSON_PROPERTY_DOUBLE = "double"; + private Double _double; + + public NumberPropertiesOnly() { + } + + public NumberPropertiesOnly number(BigDecimal number) { + + this.number = number; + return this; + } + + /** + * Get number + * @return number + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumber(BigDecimal number) { + this.number = number; + } + + + public NumberPropertiesOnly _float(Float _float) { + + this._float = _float; + return this; + } + + /** + * Get _float + * @return _float + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Float getFloat() { + return _float; + } + + + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFloat(Float _float) { + this._float = _float; + } + + + public NumberPropertiesOnly _double(Double _double) { + + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 0.8 + * maximum: 50.2 + * @return _double + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getDouble() { + return _double; + } + + + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDouble(Double _double) { + this._double = _double; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberPropertiesOnly numberPropertiesOnly = (NumberPropertiesOnly) o; + return Objects.equals(this.number, numberPropertiesOnly.number) && + Objects.equals(this._float, numberPropertiesOnly._float) && + Objects.equals(this._double, numberPropertiesOnly._double); + } + + @Override + public int hashCode() { + return Objects.hash(number, _float, _double); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberPropertiesOnly {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 000000000000..35aa2634a420 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,321 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Pet + */ +@JsonPropertyOrder({ + Pet.JSON_PROPERTY_ID, + Pet.JSON_PROPERTY_NAME, + Pet.JSON_PROPERTY_CATEGORY, + Pet.JSON_PROPERTY_PHOTO_URLS, + Pet.JSON_PROPERTY_TAGS, + Pet.JSON_PROPERTY_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pet { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private Category category; + + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; + private List photoUrls; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public Pet() { + } + + public Pet id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Pet name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public Pet category(Category category) { + + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Category getCategory() { + return category; + } + + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategory(Category category) { + this.category = category; + } + + + public Pet photoUrls(List photoUrls) { + + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new ArrayList<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPhotoUrls() { + return photoUrls; + } + + + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + + public Pet tags(List tags) { + + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(List tags) { + this.tags = tags; + } + + + public Pet status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, category, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Query.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Query.java new file mode 100644 index 000000000000..5e110710d726 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Query.java @@ -0,0 +1,183 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Query + */ +@JsonPropertyOrder({ + Query.JSON_PROPERTY_ID, + Query.JSON_PROPERTY_OUTCOMES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Query { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + /** + * Gets or Sets outcomes + */ + public enum OutcomesEnum { + SUCCESS("SUCCESS"), + + FAILURE("FAILURE"), + + SKIPPED("SKIPPED"); + + private String value; + + OutcomesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OutcomesEnum fromValue(String value) { + for (OutcomesEnum b : OutcomesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_OUTCOMES = "outcomes"; + private List outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); + + public Query() { + } + + public Query id(Long id) { + + this.id = id; + return this; + } + + /** + * Query + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Query outcomes(List outcomes) { + + this.outcomes = outcomes; + return this; + } + + public Query addOutcomesItem(OutcomesEnum outcomesItem) { + if (this.outcomes == null) { + this.outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); + } + this.outcomes.add(outcomesItem); + return this; + } + + /** + * Get outcomes + * @return outcomes + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTCOMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getOutcomes() { + return outcomes; + } + + + @JsonProperty(JSON_PROPERTY_OUTCOMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutcomes(List outcomes) { + this.outcomes = outcomes; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Query query = (Query) o; + return Objects.equals(this.id, query.id) && + Objects.equals(this.outcomes, query.outcomes); + } + + @Override + public int hashCode() { + return Objects.hash(id, outcomes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Query {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" outcomes: ").append(toIndentedString(outcomes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/StringEnumRef.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/StringEnumRef.java new file mode 100644 index 000000000000..6e706b20d44c --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/StringEnumRef.java @@ -0,0 +1,61 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets StringEnumRef + */ +public enum StringEnumRef { + + SUCCESS("success"), + + FAILURE("failure"), + + UNCLASSIFIED("unclassified"); + + private String value; + + StringEnumRef(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StringEnumRef fromValue(String value) { + for (StringEnumRef b : StringEnumRef.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 000000000000..794d3457040b --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,135 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Tag + */ +@JsonPropertyOrder({ + Tag.JSON_PROPERTY_ID, + Tag.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Tag { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Tag() { + } + + public Tag id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Tag name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java new file mode 100644 index 000000000000..95ee4725f1a3 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java @@ -0,0 +1,200 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + */ +@JsonPropertyOrder({ + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_SIZE, + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_COLOR, + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_ID, + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_NAME +}) +@JsonTypeName("test_query_style_deepObject_explode_true_object_allOf_query_object_parameter") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter { + public static final String JSON_PROPERTY_SIZE = "size"; + private String size; + + public static final String JSON_PROPERTY_COLOR = "color"; + private String color; + + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() { + } + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSize() { + return size; + } + + + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSize(String size) { + this.size = size; + } + + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) { + + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getColor() { + return color; + } + + + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColor(String color) { + this.color = color; + } + + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter = (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) o; + return Objects.equals(this.size, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.size) && + Objects.equals(this.color, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.color) && + Objects.equals(this.id, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.id) && + Objects.equals(this.name, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.name); + } + + @Override + public int hashCode() { + return Objects.hash(size, color, id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java new file mode 100644 index 000000000000..a28cc79320db --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java @@ -0,0 +1,115 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +@JsonPropertyOrder({ + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.JSON_PROPERTY_VALUES +}) +@JsonTypeName("test_query_style_form_explode_true_array_string_query_object_parameter") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + public static final String JSON_PROPERTY_VALUES = "values"; + private List values; + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + } + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List values) { + + this.values = values; + return this; + } + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getValues() { + return values; + } + + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValues(List values) { + this.values = values; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter = (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) o; + return Objects.equals(this.values, testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.values); + } + + @Override + public int hashCode() { + return Objects.hash(values); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/AuthApiTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/AuthApiTest.java new file mode 100644 index 000000000000..385354f4b634 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/AuthApiTest.java @@ -0,0 +1,71 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AuthApi + */ +public class AuthApiTest { + + private final AuthApi api = new AuthApi(); + + + /** + * To test HTTP basic authentication + * + * To test HTTP basic authentication + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testAuthHttpBasicTest() { + + String response = api.testAuthHttpBasic(); + + // TODO: test validations + } + + /** + * To test HTTP bearer authentication + * + * To test HTTP bearer authentication + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testAuthHttpBearerTest() { + String response; + api.getApiClient().setBearerToken("fixed token"); + response = api.testAuthHttpBearer(); + Assert.assertTrue(response.contains("Authorization: Bearer fixed token")); + + api.getApiClient().setBearerToken(() -> "dynamic token"); + response = api.testAuthHttpBearer(); + Assert.assertTrue(response.contains("Authorization: Bearer dynamic token")); + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/BodyApiTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/BodyApiTest.java new file mode 100644 index 000000000000..1a1842f6c553 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/BodyApiTest.java @@ -0,0 +1,173 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import java.io.File; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.Tag; +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for BodyApi + */ +@Ignore +public class BodyApiTest { + + private final BodyApi api = new BodyApi(); + + + /** + * Test binary (gif) response body + * + * Test binary (gif) response body + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBinaryGifTest() { + + File response = api.testBinaryGif(); + + // TODO: test validations + } + + /** + * Test body parameter(s) + * + * Test body parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyApplicationOctetstreamBinaryTest() { + File body = null; + + String response = api.testBodyApplicationOctetstreamBinary(body); + + // TODO: test validations + } + + /** + * Test array of binary in multipart mime + * + * Test array of binary in multipart mime + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyMultipartFormdataArrayOfBinaryTest() { + List files = null; + + String response = api.testBodyMultipartFormdataArrayOfBinary(files); + + // TODO: test validations + } + + /** + * Test body parameter(s) + * + * Test body parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyAllOfPetTest() { + Pet pet = null; + + Pet response = api.testEchoBodyAllOfPet(pet); + + // TODO: test validations + } + + /** + * Test free form object + * + * Test free form object + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyFreeFormObjectResponseStringTest() { + Object body = null; + + String response = api.testEchoBodyFreeFormObjectResponseString(body); + + // TODO: test validations + } + + /** + * Test body parameter(s) + * + * Test body parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyPetTest() { + Pet pet = null; + + Pet response = api.testEchoBodyPet(pet); + + // TODO: test validations + } + + /** + * Test empty response body + * + * Test empty response body + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyPetResponseStringTest() { + Pet pet = null; + + String response = api.testEchoBodyPetResponseString(pet); + + // TODO: test validations + } + + /** + * Test empty json (request body) + * + * Test empty json (request body) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyTagResponseStringTest() { + Tag tag = null; + + String response = api.testEchoBodyTagResponseString(tag); + + // TODO: test validations + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/FormApiTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/FormApiTest.java new file mode 100644 index 000000000000..123f60544dcd --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/FormApiTest.java @@ -0,0 +1,76 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for FormApi + */ +@Ignore +public class FormApiTest { + + private final FormApi api = new FormApi(); + + + /** + * Test form parameter(s) + * + * Test form parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testFormIntegerBooleanStringTest() { + Integer integerForm = null; + Boolean booleanForm = null; + String stringForm = null; + + String response = api.testFormIntegerBooleanString(integerForm, booleanForm, stringForm); + + // TODO: test validations + } + + /** + * Test form parameter(s) for oneOf schema + * + * Test form parameter(s) for oneOf schema + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testFormOneofTest() { + String form1 = null; + Integer form2 = null; + String form3 = null; + Boolean form4 = null; + Long id = null; + String name = null; + + String response = api.testFormOneof(form1, form2, form3, form4, id, name); + + // TODO: test validations + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/HeaderApiTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/HeaderApiTest.java new file mode 100644 index 000000000000..14f3c32bc5bd --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/HeaderApiTest.java @@ -0,0 +1,57 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.StringEnumRef; +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for HeaderApi + */ +@Ignore +public class HeaderApiTest { + + private final HeaderApi api = new HeaderApi(); + + + /** + * Test header parameter(s) + * + * Test header parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testHeaderIntegerBooleanStringEnumsTest() { + Integer integerHeader = null; + Boolean booleanHeader = null; + String stringHeader = null; + String enumNonrefStringHeader = null; + StringEnumRef enumRefStringHeader = null; + + String response = api.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader); + + // TODO: test validations + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/PathApiTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/PathApiTest.java new file mode 100644 index 000000000000..0b7e986b9815 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/PathApiTest.java @@ -0,0 +1,56 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.StringEnumRef; +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for PathApi + */ +@Ignore +public class PathApiTest { + + private final PathApi api = new PathApi(); + + + /** + * Test path parameter(s) + * + * Test path parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathTest() { + String pathString = null; + Integer pathInteger = null; + String enumNonrefStringPath = null; + StringEnumRef enumRefStringPath = null; + + String response = api.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath); + + // TODO: test validations + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/QueryApiTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/QueryApiTest.java new file mode 100644 index 000000000000..8f007ca9d156 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/QueryApiTest.java @@ -0,0 +1,183 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.DataQuery; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.StringEnumRef; +import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for QueryApi + */ +@Ignore +public class QueryApiTest { + + private final QueryApi api = new QueryApi(); + + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEnumRefStringTest() { + String enumNonrefStringQuery = null; + StringEnumRef enumRefStringQuery = null; + + String response = api.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryDatetimeDateStringTest() { + OffsetDateTime datetimeQuery = null; + LocalDate dateQuery = null; + String stringQuery = null; + + String response = api.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryIntegerBooleanStringTest() { + Integer integerQuery = null; + Boolean booleanQuery = null; + String stringQuery = null; + + String response = api.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleDeepObjectExplodeTrueObjectTest() { + Pet queryObject = null; + + String response = api.testQueryStyleDeepObjectExplodeTrueObject(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleDeepObjectExplodeTrueObjectAllOfTest() { + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null; + + String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueArrayStringTest() { + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = null; + + String response = api.testQueryStyleFormExplodeTrueArrayString(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueObjectTest() { + Pet queryObject = null; + + String response = api.testQueryStyleFormExplodeTrueObject(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueObjectAllOfTest() { + DataQuery queryObject = null; + + String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject); + + // TODO: test validations + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/BirdTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/BirdTest.java new file mode 100644 index 000000000000..3e82e9d75535 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/BirdTest.java @@ -0,0 +1,55 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Bird + */ +public class BirdTest { + private final Bird model = new Bird(); + + /** + * Model tests for Bird + */ + @Test + public void testBird() { + // TODO: test Bird + } + + /** + * Test the property 'size' + */ + @Test + public void sizeTest() { + // TODO: test size + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 000000000000..5b6a08fd6773 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Category + */ +public class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + public void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/DataQueryTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/DataQueryTest.java new file mode 100644 index 000000000000..d08082e114ed --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/DataQueryTest.java @@ -0,0 +1,84 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Query; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DataQuery + */ +public class DataQueryTest { + private final DataQuery model = new DataQuery(); + + /** + * Model tests for DataQuery + */ + @Test + public void testDataQuery() { + // TODO: test DataQuery + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'outcomes' + */ + @Test + public void outcomesTest() { + // TODO: test outcomes + } + + /** + * Test the property 'suffix' + */ + @Test + public void suffixTest() { + // TODO: test suffix + } + + /** + * Test the property 'text' + */ + @Test + public void textTest() { + // TODO: test text + } + + /** + * Test the property 'date' + */ + @Test + public void dateTest() { + // TODO: test date + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/DefaultValueTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/DefaultValueTest.java new file mode 100644 index 000000000000..843a43b28d72 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/DefaultValueTest.java @@ -0,0 +1,111 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.StringEnumRef; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DefaultValue + */ +public class DefaultValueTest { + private final DefaultValue model = new DefaultValue(); + + /** + * Model tests for DefaultValue + */ + @Test + public void testDefaultValue() { + // TODO: test DefaultValue + } + + /** + * Test the property 'arrayStringEnumRefDefault' + */ + @Test + public void arrayStringEnumRefDefaultTest() { + // TODO: test arrayStringEnumRefDefault + } + + /** + * Test the property 'arrayStringEnumDefault' + */ + @Test + public void arrayStringEnumDefaultTest() { + // TODO: test arrayStringEnumDefault + } + + /** + * Test the property 'arrayStringDefault' + */ + @Test + public void arrayStringDefaultTest() { + // TODO: test arrayStringDefault + } + + /** + * Test the property 'arrayIntegerDefault' + */ + @Test + public void arrayIntegerDefaultTest() { + // TODO: test arrayIntegerDefault + } + + /** + * Test the property 'arrayString' + */ + @Test + public void arrayStringTest() { + // TODO: test arrayString + } + + /** + * Test the property 'arrayStringNullable' + */ + @Test + public void arrayStringNullableTest() { + // TODO: test arrayStringNullable + } + + /** + * Test the property 'arrayStringExtensionNullable' + */ + @Test + public void arrayStringExtensionNullableTest() { + // TODO: test arrayStringExtensionNullable + } + + /** + * Test the property 'stringNullable' + */ + @Test + public void stringNullableTest() { + // TODO: test stringNullable + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/NumberPropertiesOnlyTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/NumberPropertiesOnlyTest.java new file mode 100644 index 000000000000..80e515fd707e --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/NumberPropertiesOnlyTest.java @@ -0,0 +1,64 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for NumberPropertiesOnly + */ +public class NumberPropertiesOnlyTest { + private final NumberPropertiesOnly model = new NumberPropertiesOnly(); + + /** + * Model tests for NumberPropertiesOnly + */ + @Test + public void testNumberPropertiesOnly() { + // TODO: test NumberPropertiesOnly + } + + /** + * Test the property 'number' + */ + @Test + public void numberTest() { + // TODO: test number + } + + /** + * Test the property '_float' + */ + @Test + public void _floatTest() { + // TODO: test _float + } + + /** + * Test the property '_double' + */ + @Test + public void _doubleTest() { + // TODO: test _double + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 000000000000..30e1991c7e32 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,92 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Pet + */ +public class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + public void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'photoUrls' + */ + @Test + public void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/QueryTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/QueryTest.java new file mode 100644 index 000000000000..3ae0ecb7b70d --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/QueryTest.java @@ -0,0 +1,58 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Query + */ +public class QueryTest { + private final Query model = new Query(); + + /** + * Model tests for Query + */ + @Test + public void testQuery() { + // TODO: test Query + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'outcomes' + */ + @Test + public void outcomesTest() { + // TODO: test outcomes + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/StringEnumRefTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/StringEnumRefTest.java new file mode 100644 index 000000000000..81bf17732bda --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/StringEnumRefTest.java @@ -0,0 +1,32 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StringEnumRef + */ +public class StringEnumRefTest { + /** + * Model tests for StringEnumRef + */ + @Test + public void testStringEnumRef() { + // TODO: test StringEnumRef + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 000000000000..073b7aca33c1 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Tag + */ +public class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.java new file mode 100644 index 000000000000..8ab39f47d766 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.java @@ -0,0 +1,71 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + */ +public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest { + private final TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter model = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); + + /** + * Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + */ + @Test + public void testTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() { + // TODO: test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + } + + /** + * Test the property 'size' + */ + @Test + public void sizeTest() { + // TODO: test size + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java new file mode 100644 index 000000000000..f3e020346fa0 --- /dev/null +++ b/samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java @@ -0,0 +1,50 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest { + private final TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter model = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(); + + /** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ + @Test + public void testTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + // TODO: test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + } + + /** + * Test the property 'values' + */ + @Test + public void valuesTest() { + // TODO: test values + } + +} diff --git a/samples/client/echo_api/php-nextgen/README.md b/samples/client/echo_api/php-nextgen/README.md index 3e8fd3436dd3..702a20f599fc 100644 --- a/samples/client/echo_api/php-nextgen/README.md +++ b/samples/client/echo_api/php-nextgen/README.md @@ -77,6 +77,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**testAuthHttpBasic**](docs/Api/AuthApi.md#testauthhttpbasic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**testAuthHttpBearer**](docs/Api/AuthApi.md#testauthhttpbearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**testBinaryGif**](docs/Api/BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/Api/BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/Api/BodyApi.md#testbodymultipartformdataarrayofbinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -118,6 +119,11 @@ Class | Method | HTTP request | Description - **Type**: HTTP basic authentication + +### http_bearer_auth + +- **Type**: Bearer authentication + ## Tests To run the tests, use: diff --git a/samples/client/echo_api/php-nextgen/docs/Api/AuthApi.md b/samples/client/echo_api/php-nextgen/docs/Api/AuthApi.md index 8fb88b69afef..874f3c61c69c 100644 --- a/samples/client/echo_api/php-nextgen/docs/Api/AuthApi.md +++ b/samples/client/echo_api/php-nextgen/docs/Api/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to http://localhost:3000, except if the operation defines | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**testAuthHttpBasic()**](AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication | +| [**testAuthHttpBearer()**](AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication | ## `testAuthHttpBasic()` @@ -65,3 +66,60 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) + +## `testAuthHttpBearer()` + +```php +testAuthHttpBearer(): string +``` + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\AuthApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->testAuthHttpBearer(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AuthApi->testAuthHttpBearer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**string** + +### Authorization + +[http_bearer_auth](../../README.md#http_bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index 68b835a3ce9d..e79fd9ecf3df 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -75,6 +75,9 @@ class AuthApi 'testAuthHttpBasic' => [ 'application/json', ], + 'testAuthHttpBearer' => [ + 'application/json', + ], ]; /** @@ -400,6 +403,283 @@ public function testAuthHttpBasicRequest( ); } + /** + * Operation testAuthHttpBearer + * + * To test HTTP bearer authentication + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return string + */ + public function testAuthHttpBearer( + string $contentType = self::contentTypes['testAuthHttpBearer'][0] + ): string + { + list($response) = $this->testAuthHttpBearerWithHttpInfo($contentType); + return $response; + } + + /** + * Operation testAuthHttpBearerWithHttpInfo + * + * To test HTTP bearer authentication + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testAuthHttpBearerWithHttpInfo( + string $contentType = self::contentTypes['testAuthHttpBearer'][0] + ): array + { + $request = $this->testAuthHttpBearerRequest($contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testAuthHttpBearerAsync + * + * To test HTTP bearer authentication + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function testAuthHttpBearerAsync( + string $contentType = self::contentTypes['testAuthHttpBearer'][0] + ): PromiseInterface + { + return $this->testAuthHttpBearerAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testAuthHttpBearerAsyncWithHttpInfo + * + * To test HTTP bearer authentication + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function testAuthHttpBearerAsyncWithHttpInfo( + string $contentType = self::contentTypes['testAuthHttpBearer'][0] + ): PromiseInterface + { + $returnType = 'string'; + $request = $this->testAuthHttpBearerRequest($contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testAuthHttpBearer' + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBearer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testAuthHttpBearerRequest( + string $contentType = self::contentTypes['testAuthHttpBearer'][0] + ): Request + { + + + $resourcePath = '/auth/http/bearer'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/samples/client/echo_api/powershell/README.md b/samples/client/echo_api/powershell/README.md index 0ef000a4ecc2..f4aab75b2209 100644 --- a/samples/client/echo_api/powershell/README.md +++ b/samples/client/echo_api/powershell/README.md @@ -52,6 +52,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**Test-AuthHttpBasic**](docs/AuthApi.md#Test-AuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**Test-AuthHttpBearer**](docs/AuthApi.md#Test-AuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**Test-BinaryGif**](docs/BodyApi.md#Test-BinaryGif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**Test-BodyApplicationOctetstreamBinary**](docs/BodyApi.md#Test-BodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**Test-BodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#Test-BodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -100,3 +101,9 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### http_bearer_auth + + +- **Type**: HTTP Bearer Token authentication + diff --git a/samples/client/echo_api/powershell/docs/AuthApi.md b/samples/client/echo_api/powershell/docs/AuthApi.md index 9fabb8c0d6d8..e9675ba8f0a2 100644 --- a/samples/client/echo_api/powershell/docs/AuthApi.md +++ b/samples/client/echo_api/powershell/docs/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* Method | HTTP request | Description ------------- | ------------- | ------------- [**Test-AuthHttpBasic**](AuthApi.md#Test-AuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication +[**Test-AuthHttpBearer**](AuthApi.md#Test-AuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication @@ -51,3 +52,44 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **Test-AuthHttpBearer** +> String Test-AuthHttpBearer
+ +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example +```powershell +# general setting of the PowerShell module, e.g. base URL, authentication, etc +$Configuration = Get-Configuration + + +# To test HTTP bearer authentication +try { + $Result = Test-AuthHttpBearer +} catch { + Write-Host ("Exception occurred when calling Test-AuthHttpBearer: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/echo_api/powershell/src/PSOpenAPITools/Api/AuthApi.ps1 b/samples/client/echo_api/powershell/src/PSOpenAPITools/Api/AuthApi.ps1 index 3c3888e4e4e4..c04c137d6f67 100644 --- a/samples/client/echo_api/powershell/src/PSOpenAPITools/Api/AuthApi.ps1 +++ b/samples/client/echo_api/powershell/src/PSOpenAPITools/Api/AuthApi.ps1 @@ -76,3 +76,71 @@ function Test-AuthHttpBasic { } } +<# +.SYNOPSIS + +To test HTTP bearer authentication + +.DESCRIPTION + +No description available. + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +String +#> +function Test-AuthHttpBearer { + [CmdletBinding()] + Param ( + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-AuthHttpBearer' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-Configuration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('text/plain') + + $LocalVarUri = '/auth/http/bearer' + + if ($Configuration["AccessToken"]) { + $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] + Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) + } + + $LocalVarResult = Invoke-ApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "String" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/README.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/README.md index 1873ea15fbb4..3e277b6d69ed 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/README.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/README.md @@ -95,6 +95,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**test_auth_http_basic**](docs/AuthApi.md#test_auth_http_basic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**test_auth_http_bearer**](docs/AuthApi.md#test_auth_http_bearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -142,6 +143,11 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### http_bearer_auth + +- **Type**: Bearer authentication + ## Author diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/docs/AuthApi.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/docs/AuthApi.md index 98ce834c3176..e4db5503ece0 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/docs/AuthApi.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/docs/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* Method | HTTP request | Description ------------- | ------------- | ------------- [**test_auth_http_basic**](AuthApi.md#test_auth_http_basic) | **POST** /auth/http/basic | To test HTTP basic authentication +[**test_auth_http_bearer**](AuthApi.md#test_auth_http_bearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication # **test_auth_http_basic** @@ -80,3 +81,75 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_auth_http_bearer** +> str test_auth_http_bearer() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +* Bearer Authentication (http_bearer_auth): +```python +import time +import os +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost:3000 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "http://localhost:3000" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: http_bearer_auth +configuration = openapi_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AuthApi(api_client) + + try: + # To test HTTP bearer authentication + api_response = api_instance.test_auth_http_bearer() + print("The response of AuthApi->test_auth_http_bearer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthApi->test_auth_http_bearer: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py index 6084a540daf6..278e2f912fc4 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/auth_api.py @@ -93,8 +93,7 @@ def test_auth_http_basic( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -157,8 +156,7 @@ def test_auth_http_basic_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -221,8 +219,7 @@ def test_auth_http_basic_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -288,3 +285,247 @@ def _test_auth_http_basic_serialize( ) + + + @validate_call + def test_auth_http_bearer( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """To test HTTP bearer authentication + + To test HTTP bearer authentication + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_auth_http_bearer_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def test_auth_http_bearer_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """To test HTTP bearer authentication + + To test HTTP bearer authentication + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_auth_http_bearer_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def test_auth_http_bearer_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """To test HTTP bearer authentication + + To test HTTP bearer authentication + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_auth_http_bearer_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_auth_http_bearer_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'http_bearer_auth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/auth/http/bearer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py index e84a432c4368..ce402ce62526 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py @@ -101,8 +101,7 @@ def test_binary_gif( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - + '200': "bytearray", } response_data = self.api_client.call_api( *_param, @@ -165,8 +164,7 @@ def test_binary_gif_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - + '200': "bytearray", } response_data = self.api_client.call_api( *_param, @@ -229,8 +227,7 @@ def test_binary_gif_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - + '200': "bytearray", } response_data = self.api_client.call_api( *_param, @@ -351,8 +348,7 @@ def test_body_application_octetstream_binary( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -419,8 +415,7 @@ def test_body_application_octetstream_binary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -487,8 +482,7 @@ def test_body_application_octetstream_binary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -630,8 +624,7 @@ def test_body_multipart_formdata_array_of_binary( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -698,8 +691,7 @@ def test_body_multipart_formdata_array_of_binary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -766,8 +758,7 @@ def test_body_multipart_formdata_array_of_binary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -905,8 +896,7 @@ def test_echo_body_all_of_pet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -973,8 +963,7 @@ def test_echo_body_all_of_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1041,8 +1030,7 @@ def test_echo_body_all_of_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1179,8 +1167,7 @@ def test_echo_body_free_form_object_response_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1247,8 +1234,7 @@ def test_echo_body_free_form_object_response_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1315,8 +1301,7 @@ def test_echo_body_free_form_object_response_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1453,8 +1438,7 @@ def test_echo_body_pet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1521,8 +1505,7 @@ def test_echo_body_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1589,8 +1572,7 @@ def test_echo_body_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1727,8 +1709,7 @@ def test_echo_body_pet_response_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1795,8 +1776,7 @@ def test_echo_body_pet_response_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1863,8 +1843,7 @@ def test_echo_body_pet_response_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2001,8 +1980,7 @@ def test_echo_body_tag_response_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2069,8 +2047,7 @@ def test_echo_body_tag_response_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2137,8 +2114,7 @@ def test_echo_body_tag_response_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py index 4dcde5c69031..21d287cc789e 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/form_api.py @@ -109,8 +109,7 @@ def test_form_integer_boolean_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -185,8 +184,7 @@ def test_form_integer_boolean_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -261,8 +259,7 @@ def test_form_integer_boolean_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -425,8 +422,7 @@ def test_form_oneof( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -513,8 +509,7 @@ def test_form_oneof_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -601,8 +596,7 @@ def test_form_oneof_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py index d08d722ee89a..95a123d998e7 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/header_api.py @@ -118,8 +118,7 @@ def test_header_integer_boolean_string_enums( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -202,8 +201,7 @@ def test_header_integer_boolean_string_enums_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -286,8 +284,7 @@ def test_header_integer_boolean_string_enums_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py index 0be317d58271..9ff10b52d390 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/path_api.py @@ -112,8 +112,7 @@ def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_e ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -192,8 +191,7 @@ def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_e ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -272,8 +270,7 @@ def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_e ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py index c910defeb42e..dd0603a1fa3a 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/query_api.py @@ -110,8 +110,7 @@ def test_enum_ref_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -182,8 +181,7 @@ def test_enum_ref_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -254,8 +252,7 @@ def test_enum_ref_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -394,8 +391,7 @@ def test_query_datetime_date_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -470,8 +466,7 @@ def test_query_datetime_date_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -546,8 +541,7 @@ def test_query_datetime_date_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -709,8 +703,7 @@ def test_query_integer_boolean_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -785,8 +778,7 @@ def test_query_integer_boolean_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -861,8 +853,7 @@ def test_query_integer_boolean_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -998,8 +989,7 @@ def test_query_style_deep_object_explode_true_object( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1066,8 +1056,7 @@ def test_query_style_deep_object_explode_true_object_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1134,8 +1123,7 @@ def test_query_style_deep_object_explode_true_object_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1261,8 +1249,7 @@ def test_query_style_deep_object_explode_true_object_all_of( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1329,8 +1316,7 @@ def test_query_style_deep_object_explode_true_object_all_of_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1397,8 +1383,7 @@ def test_query_style_deep_object_explode_true_object_all_of_without_preload_cont ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1524,8 +1509,7 @@ def test_query_style_form_explode_true_array_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1592,8 +1576,7 @@ def test_query_style_form_explode_true_array_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1660,8 +1643,7 @@ def test_query_style_form_explode_true_array_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1787,8 +1769,7 @@ def test_query_style_form_explode_true_object( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1855,8 +1836,7 @@ def test_query_style_form_explode_true_object_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1923,8 +1903,7 @@ def test_query_style_form_explode_true_object_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2050,8 +2029,7 @@ def test_query_style_form_explode_true_object_all_of( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2118,8 +2096,7 @@ def test_query_style_form_explode_true_object_all_of_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2186,8 +2163,7 @@ def test_query_style_form_explode_true_object_all_of_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api_client.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api_client.py index cee9963034e2..bdf8ec05b2da 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api_client.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api_client.py @@ -282,7 +282,7 @@ def call_api( def response_deserialize( self, - response_data=None, + response_data: rest.RESTResponse = None, response_types_map=None ) -> ApiResponse: """Deserializes response into an object. @@ -297,39 +297,29 @@ def response_deserialize( # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) return ApiResponse( status_code = response_data.status, diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/configuration.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/configuration.py index 084998170504..b7218cb4ff2c 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/configuration.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/configuration.py @@ -374,6 +374,13 @@ def auth_settings(self): 'key': 'Authorization', 'value': self.get_basic_auth_token() } + if self.access_token is not None: + auth['http_bearer_auth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } return auth def to_debug_report(self): diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/exceptions.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/exceptions.py index d68e30b72de4..4ddc870f3e0b 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/exceptions.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/exceptions.py @@ -12,6 +12,9 @@ Do not edit the class manually. """ # noqa: E501 +from typing import Any, Optional + +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -102,17 +105,56 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" @@ -122,38 +164,30 @@ def __str__(self): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message + class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/bird.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/bird.py index f9965cbf2394..37b2425aa6f8 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/bird.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/bird.py @@ -36,7 +36,8 @@ class Bird(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/category.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/category.py index 5fa311ef3a5d..078fb6557194 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/category.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/category.py @@ -36,7 +36,8 @@ class Category(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/data_query.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/data_query.py index 032eca7b61d9..49d1c4ec4eb6 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/data_query.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/data_query.py @@ -39,7 +39,8 @@ class DataQuery(Query): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/default_value.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/default_value.py index 65601e0e0f80..809cb22027f4 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/default_value.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/default_value.py @@ -54,7 +54,8 @@ def array_string_enum_default_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/number_properties_only.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/number_properties_only.py index 2b431cc8a2ac..e5e6acc13b65 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/number_properties_only.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/number_properties_only.py @@ -39,7 +39,8 @@ class NumberPropertiesOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/pet.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/pet.py index 81346c1670ef..21276281a221 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/pet.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/pet.py @@ -53,7 +53,8 @@ def status_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/query.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/query.py index b9082dd618a0..863b9e47782d 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/query.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/query.py @@ -48,7 +48,8 @@ def outcomes_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/tag.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/tag.py index 4d769f71ed96..de29129b4a66 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/tag.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/tag.py @@ -36,7 +36,8 @@ class Tag(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py index 6f93ba99bf8d..683221d51dcc 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py @@ -38,7 +38,8 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py index 8b32f319d1d3..4e3509e9c6e4 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py @@ -35,7 +35,8 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/rest.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/rest.py index da77b96513fd..86762867f670 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/rest.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/rest.py @@ -22,8 +22,20 @@ from openapi_client.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + class RESTResponse(io.IOBase): def __init__(self, resp) -> None: @@ -78,15 +90,27 @@ def __init__(self, configuration) -> None: # https pool manager if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + self.pool_manager = SOCKSProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.ProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: self.pool_manager = urllib3.PoolManager( cert_reqs=cert_reqs, @@ -209,6 +233,15 @@ def request( headers=headers, preload_content=False ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided diff --git a/samples/client/echo_api/python-pydantic-v1/README.md b/samples/client/echo_api/python-pydantic-v1/README.md index 61249db8a196..1edeb3fd50dc 100644 --- a/samples/client/echo_api/python-pydantic-v1/README.md +++ b/samples/client/echo_api/python-pydantic-v1/README.md @@ -95,6 +95,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**test_auth_http_basic**](docs/AuthApi.md#test_auth_http_basic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**test_auth_http_bearer**](docs/AuthApi.md#test_auth_http_bearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -142,6 +143,11 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### http_bearer_auth + +- **Type**: Bearer authentication + ## Author diff --git a/samples/client/echo_api/python-pydantic-v1/docs/AuthApi.md b/samples/client/echo_api/python-pydantic-v1/docs/AuthApi.md index 98ce834c3176..e4db5503ece0 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/AuthApi.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* Method | HTTP request | Description ------------- | ------------- | ------------- [**test_auth_http_basic**](AuthApi.md#test_auth_http_basic) | **POST** /auth/http/basic | To test HTTP basic authentication +[**test_auth_http_bearer**](AuthApi.md#test_auth_http_bearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication # **test_auth_http_basic** @@ -80,3 +81,75 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_auth_http_bearer** +> str test_auth_http_bearer() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +* Bearer Authentication (http_bearer_auth): +```python +import time +import os +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost:3000 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "http://localhost:3000" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: http_bearer_auth +configuration = openapi_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AuthApi(api_client) + + try: + # To test HTTP bearer authentication + api_response = api_instance.test_auth_http_bearer() + print("The response of AuthApi->test_auth_http_bearer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthApi->test_auth_http_bearer: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/echo_api/python-pydantic-v1/openapi_client/api/auth_api.py b/samples/client/echo_api/python-pydantic-v1/openapi_client/api/auth_api.py index 16ee7463aad7..dcb3ff423f8e 100644 --- a/samples/client/echo_api/python-pydantic-v1/openapi_client/api/auth_api.py +++ b/samples/client/echo_api/python-pydantic-v1/openapi_client/api/auth_api.py @@ -171,3 +171,135 @@ def test_auth_http_basic_with_http_info(self, **kwargs) -> ApiResponse: # noqa: _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + + @validate_arguments + def test_auth_http_bearer(self, **kwargs) -> str: # noqa: E501 + """To test HTTP bearer authentication # noqa: E501 + + To test HTTP bearer authentication # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_auth_http_bearer(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the test_auth_http_bearer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.test_auth_http_bearer_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def test_auth_http_bearer_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """To test HTTP bearer authentication # noqa: E501 + + To test HTTP bearer authentication # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_auth_http_bearer_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_auth_http_bearer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # authentication setting + _auth_settings = ['http_bearer_auth'] # noqa: E501 + + _response_types_map = { + '200': "str", + } + + return self.api_client.call_api( + '/auth/http/bearer', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/samples/client/echo_api/python-pydantic-v1/openapi_client/configuration.py b/samples/client/echo_api/python-pydantic-v1/openapi_client/configuration.py index 8ff03cff3b9e..7c6f3e11f99f 100644 --- a/samples/client/echo_api/python-pydantic-v1/openapi_client/configuration.py +++ b/samples/client/echo_api/python-pydantic-v1/openapi_client/configuration.py @@ -382,6 +382,13 @@ def auth_settings(self): 'key': 'Authorization', 'value': self.get_basic_auth_token() } + if self.access_token is not None: + auth['http_bearer_auth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } return auth def to_debug_report(self): diff --git a/samples/client/echo_api/python-pydantic-v1/openapi_client/rest.py b/samples/client/echo_api/python-pydantic-v1/openapi_client/rest.py index d05e077260de..f4a710085985 100644 --- a/samples/client/echo_api/python-pydantic-v1/openapi_client/rest.py +++ b/samples/client/echo_api/python-pydantic-v1/openapi_client/rest.py @@ -27,6 +27,18 @@ logger = logging.getLogger(__name__) +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + class RESTResponse(io.IOBase): @@ -82,17 +94,29 @@ def __init__(self, configuration, pools_size=4, maxsize=None) -> None: # https pool manager if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + self.pool_manager = SOCKSProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: self.pool_manager = urllib3.PoolManager( num_pools=pools_size, diff --git a/samples/client/echo_api/python/README.md b/samples/client/echo_api/python/README.md index 1873ea15fbb4..3e277b6d69ed 100644 --- a/samples/client/echo_api/python/README.md +++ b/samples/client/echo_api/python/README.md @@ -95,6 +95,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthApi* | [**test_auth_http_basic**](docs/AuthApi.md#test_auth_http_basic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**test_auth_http_bearer**](docs/AuthApi.md#test_auth_http_bearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -142,6 +143,11 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### http_bearer_auth + +- **Type**: Bearer authentication + ## Author diff --git a/samples/client/echo_api/python/docs/AuthApi.md b/samples/client/echo_api/python/docs/AuthApi.md index 98ce834c3176..e4db5503ece0 100644 --- a/samples/client/echo_api/python/docs/AuthApi.md +++ b/samples/client/echo_api/python/docs/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* Method | HTTP request | Description ------------- | ------------- | ------------- [**test_auth_http_basic**](AuthApi.md#test_auth_http_basic) | **POST** /auth/http/basic | To test HTTP basic authentication +[**test_auth_http_bearer**](AuthApi.md#test_auth_http_bearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication # **test_auth_http_basic** @@ -80,3 +81,75 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_auth_http_bearer** +> str test_auth_http_bearer() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +* Bearer Authentication (http_bearer_auth): +```python +import time +import os +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost:3000 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "http://localhost:3000" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: http_bearer_auth +configuration = openapi_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AuthApi(api_client) + + try: + # To test HTTP bearer authentication + api_response = api_instance.test_auth_http_bearer() + print("The response of AuthApi->test_auth_http_bearer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthApi->test_auth_http_bearer: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/echo_api/python/openapi_client/api/auth_api.py b/samples/client/echo_api/python/openapi_client/api/auth_api.py index 6084a540daf6..278e2f912fc4 100644 --- a/samples/client/echo_api/python/openapi_client/api/auth_api.py +++ b/samples/client/echo_api/python/openapi_client/api/auth_api.py @@ -93,8 +93,7 @@ def test_auth_http_basic( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -157,8 +156,7 @@ def test_auth_http_basic_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -221,8 +219,7 @@ def test_auth_http_basic_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -288,3 +285,247 @@ def _test_auth_http_basic_serialize( ) + + + @validate_call + def test_auth_http_bearer( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """To test HTTP bearer authentication + + To test HTTP bearer authentication + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_auth_http_bearer_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def test_auth_http_bearer_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """To test HTTP bearer authentication + + To test HTTP bearer authentication + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_auth_http_bearer_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def test_auth_http_bearer_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """To test HTTP bearer authentication + + To test HTTP bearer authentication + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_auth_http_bearer_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_auth_http_bearer_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'http_bearer_auth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/auth/http/bearer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/samples/client/echo_api/python/openapi_client/api/body_api.py b/samples/client/echo_api/python/openapi_client/api/body_api.py index e84a432c4368..ce402ce62526 100644 --- a/samples/client/echo_api/python/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python/openapi_client/api/body_api.py @@ -101,8 +101,7 @@ def test_binary_gif( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - + '200': "bytearray", } response_data = self.api_client.call_api( *_param, @@ -165,8 +164,7 @@ def test_binary_gif_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - + '200': "bytearray", } response_data = self.api_client.call_api( *_param, @@ -229,8 +227,7 @@ def test_binary_gif_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - + '200': "bytearray", } response_data = self.api_client.call_api( *_param, @@ -351,8 +348,7 @@ def test_body_application_octetstream_binary( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -419,8 +415,7 @@ def test_body_application_octetstream_binary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -487,8 +482,7 @@ def test_body_application_octetstream_binary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -630,8 +624,7 @@ def test_body_multipart_formdata_array_of_binary( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -698,8 +691,7 @@ def test_body_multipart_formdata_array_of_binary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -766,8 +758,7 @@ def test_body_multipart_formdata_array_of_binary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -905,8 +896,7 @@ def test_echo_body_all_of_pet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -973,8 +963,7 @@ def test_echo_body_all_of_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1041,8 +1030,7 @@ def test_echo_body_all_of_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1179,8 +1167,7 @@ def test_echo_body_free_form_object_response_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1247,8 +1234,7 @@ def test_echo_body_free_form_object_response_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1315,8 +1301,7 @@ def test_echo_body_free_form_object_response_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1453,8 +1438,7 @@ def test_echo_body_pet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1521,8 +1505,7 @@ def test_echo_body_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1589,8 +1572,7 @@ def test_echo_body_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Pet" - + '200': "Pet", } response_data = self.api_client.call_api( *_param, @@ -1727,8 +1709,7 @@ def test_echo_body_pet_response_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1795,8 +1776,7 @@ def test_echo_body_pet_response_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1863,8 +1843,7 @@ def test_echo_body_pet_response_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2001,8 +1980,7 @@ def test_echo_body_tag_response_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2069,8 +2047,7 @@ def test_echo_body_tag_response_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2137,8 +2114,7 @@ def test_echo_body_tag_response_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python/openapi_client/api/form_api.py b/samples/client/echo_api/python/openapi_client/api/form_api.py index 4dcde5c69031..21d287cc789e 100644 --- a/samples/client/echo_api/python/openapi_client/api/form_api.py +++ b/samples/client/echo_api/python/openapi_client/api/form_api.py @@ -109,8 +109,7 @@ def test_form_integer_boolean_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -185,8 +184,7 @@ def test_form_integer_boolean_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -261,8 +259,7 @@ def test_form_integer_boolean_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -425,8 +422,7 @@ def test_form_oneof( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -513,8 +509,7 @@ def test_form_oneof_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -601,8 +596,7 @@ def test_form_oneof_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python/openapi_client/api/header_api.py b/samples/client/echo_api/python/openapi_client/api/header_api.py index d08d722ee89a..95a123d998e7 100644 --- a/samples/client/echo_api/python/openapi_client/api/header_api.py +++ b/samples/client/echo_api/python/openapi_client/api/header_api.py @@ -118,8 +118,7 @@ def test_header_integer_boolean_string_enums( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -202,8 +201,7 @@ def test_header_integer_boolean_string_enums_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -286,8 +284,7 @@ def test_header_integer_boolean_string_enums_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python/openapi_client/api/path_api.py b/samples/client/echo_api/python/openapi_client/api/path_api.py index 0be317d58271..9ff10b52d390 100644 --- a/samples/client/echo_api/python/openapi_client/api/path_api.py +++ b/samples/client/echo_api/python/openapi_client/api/path_api.py @@ -112,8 +112,7 @@ def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_e ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -192,8 +191,7 @@ def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_e ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -272,8 +270,7 @@ def tests_path_string_path_string_integer_path_integer_enum_nonref_string_path_e ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python/openapi_client/api/query_api.py b/samples/client/echo_api/python/openapi_client/api/query_api.py index c910defeb42e..dd0603a1fa3a 100644 --- a/samples/client/echo_api/python/openapi_client/api/query_api.py +++ b/samples/client/echo_api/python/openapi_client/api/query_api.py @@ -110,8 +110,7 @@ def test_enum_ref_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -182,8 +181,7 @@ def test_enum_ref_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -254,8 +252,7 @@ def test_enum_ref_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -394,8 +391,7 @@ def test_query_datetime_date_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -470,8 +466,7 @@ def test_query_datetime_date_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -546,8 +541,7 @@ def test_query_datetime_date_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -709,8 +703,7 @@ def test_query_integer_boolean_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -785,8 +778,7 @@ def test_query_integer_boolean_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -861,8 +853,7 @@ def test_query_integer_boolean_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -998,8 +989,7 @@ def test_query_style_deep_object_explode_true_object( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1066,8 +1056,7 @@ def test_query_style_deep_object_explode_true_object_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1134,8 +1123,7 @@ def test_query_style_deep_object_explode_true_object_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1261,8 +1249,7 @@ def test_query_style_deep_object_explode_true_object_all_of( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1329,8 +1316,7 @@ def test_query_style_deep_object_explode_true_object_all_of_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1397,8 +1383,7 @@ def test_query_style_deep_object_explode_true_object_all_of_without_preload_cont ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1524,8 +1509,7 @@ def test_query_style_form_explode_true_array_string( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1592,8 +1576,7 @@ def test_query_style_form_explode_true_array_string_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1660,8 +1643,7 @@ def test_query_style_form_explode_true_array_string_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1787,8 +1769,7 @@ def test_query_style_form_explode_true_object( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1855,8 +1836,7 @@ def test_query_style_form_explode_true_object_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -1923,8 +1903,7 @@ def test_query_style_form_explode_true_object_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2050,8 +2029,7 @@ def test_query_style_form_explode_true_object_all_of( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2118,8 +2096,7 @@ def test_query_style_form_explode_true_object_all_of_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2186,8 +2163,7 @@ def test_query_style_form_explode_true_object_all_of_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, diff --git a/samples/client/echo_api/python/openapi_client/api_client.py b/samples/client/echo_api/python/openapi_client/api_client.py index cee9963034e2..bdf8ec05b2da 100644 --- a/samples/client/echo_api/python/openapi_client/api_client.py +++ b/samples/client/echo_api/python/openapi_client/api_client.py @@ -282,7 +282,7 @@ def call_api( def response_deserialize( self, - response_data=None, + response_data: rest.RESTResponse = None, response_types_map=None ) -> ApiResponse: """Deserializes response into an object. @@ -297,39 +297,29 @@ def response_deserialize( # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) return ApiResponse( status_code = response_data.status, diff --git a/samples/client/echo_api/python/openapi_client/configuration.py b/samples/client/echo_api/python/openapi_client/configuration.py index 084998170504..b7218cb4ff2c 100644 --- a/samples/client/echo_api/python/openapi_client/configuration.py +++ b/samples/client/echo_api/python/openapi_client/configuration.py @@ -374,6 +374,13 @@ def auth_settings(self): 'key': 'Authorization', 'value': self.get_basic_auth_token() } + if self.access_token is not None: + auth['http_bearer_auth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } return auth def to_debug_report(self): diff --git a/samples/client/echo_api/python/openapi_client/exceptions.py b/samples/client/echo_api/python/openapi_client/exceptions.py index d68e30b72de4..4ddc870f3e0b 100644 --- a/samples/client/echo_api/python/openapi_client/exceptions.py +++ b/samples/client/echo_api/python/openapi_client/exceptions.py @@ -12,6 +12,9 @@ Do not edit the class manually. """ # noqa: E501 +from typing import Any, Optional + +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -102,17 +105,56 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" @@ -122,38 +164,30 @@ def __str__(self): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message + class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/samples/client/echo_api/python/openapi_client/models/bird.py b/samples/client/echo_api/python/openapi_client/models/bird.py index 1714c0227c16..912e333dfcf8 100644 --- a/samples/client/echo_api/python/openapi_client/models/bird.py +++ b/samples/client/echo_api/python/openapi_client/models/bird.py @@ -36,7 +36,8 @@ class Bird(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/category.py b/samples/client/echo_api/python/openapi_client/models/category.py index 228305e951a4..ce51a55a27e2 100644 --- a/samples/client/echo_api/python/openapi_client/models/category.py +++ b/samples/client/echo_api/python/openapi_client/models/category.py @@ -36,7 +36,8 @@ class Category(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/data_query.py b/samples/client/echo_api/python/openapi_client/models/data_query.py index 84436c8f8015..03d979ce5f3b 100644 --- a/samples/client/echo_api/python/openapi_client/models/data_query.py +++ b/samples/client/echo_api/python/openapi_client/models/data_query.py @@ -39,7 +39,8 @@ class DataQuery(Query): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/default_value.py b/samples/client/echo_api/python/openapi_client/models/default_value.py index 06b271b3f0d1..fac957f7aaaf 100644 --- a/samples/client/echo_api/python/openapi_client/models/default_value.py +++ b/samples/client/echo_api/python/openapi_client/models/default_value.py @@ -54,7 +54,8 @@ def array_string_enum_default_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/number_properties_only.py b/samples/client/echo_api/python/openapi_client/models/number_properties_only.py index d24cb81dd404..b149da3a87d2 100644 --- a/samples/client/echo_api/python/openapi_client/models/number_properties_only.py +++ b/samples/client/echo_api/python/openapi_client/models/number_properties_only.py @@ -39,7 +39,8 @@ class NumberPropertiesOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/pet.py b/samples/client/echo_api/python/openapi_client/models/pet.py index de43b77176cf..08269b0eabf0 100644 --- a/samples/client/echo_api/python/openapi_client/models/pet.py +++ b/samples/client/echo_api/python/openapi_client/models/pet.py @@ -53,7 +53,8 @@ def status_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/query.py b/samples/client/echo_api/python/openapi_client/models/query.py index b9082dd618a0..863b9e47782d 100644 --- a/samples/client/echo_api/python/openapi_client/models/query.py +++ b/samples/client/echo_api/python/openapi_client/models/query.py @@ -48,7 +48,8 @@ def outcomes_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/tag.py b/samples/client/echo_api/python/openapi_client/models/tag.py index 07b64937b8a0..fa3745c26a66 100644 --- a/samples/client/echo_api/python/openapi_client/models/tag.py +++ b/samples/client/echo_api/python/openapi_client/models/tag.py @@ -36,7 +36,8 @@ class Tag(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py b/samples/client/echo_api/python/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py index dfc91faa0604..1929f6cf546e 100644 --- a/samples/client/echo_api/python/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py +++ b/samples/client/echo_api/python/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py @@ -38,7 +38,8 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py b/samples/client/echo_api/python/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py index 0144aa686e47..d1d85efa1d5a 100644 --- a/samples/client/echo_api/python/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py +++ b/samples/client/echo_api/python/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py @@ -35,7 +35,8 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/client/echo_api/python/openapi_client/rest.py b/samples/client/echo_api/python/openapi_client/rest.py index da77b96513fd..86762867f670 100644 --- a/samples/client/echo_api/python/openapi_client/rest.py +++ b/samples/client/echo_api/python/openapi_client/rest.py @@ -22,8 +22,20 @@ from openapi_client.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + class RESTResponse(io.IOBase): def __init__(self, resp) -> None: @@ -78,15 +90,27 @@ def __init__(self, configuration) -> None: # https pool manager if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + self.pool_manager = SOCKSProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.ProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: self.pool_manager = urllib3.PoolManager( cert_reqs=cert_reqs, @@ -209,6 +233,15 @@ def request( headers=headers, preload_content=False ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided diff --git a/samples/client/echo_api/ruby-httpx/README.md b/samples/client/echo_api/ruby-httpx/README.md index 809a4331ef3d..eddc0da80fbc 100644 --- a/samples/client/echo_api/ruby-httpx/README.md +++ b/samples/client/echo_api/ruby-httpx/README.md @@ -84,6 +84,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *OpenapiClient::AuthApi* | [**test_auth_http_basic**](docs/AuthApi.md#test_auth_http_basic) | **POST** /auth/http/basic | To test HTTP basic authentication +*OpenapiClient::AuthApi* | [**test_auth_http_bearer**](docs/AuthApi.md#test_auth_http_bearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication *OpenapiClient::BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *OpenapiClient::BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *OpenapiClient::BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime @@ -129,3 +130,7 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication +### http_bearer_auth + +- **Type**: Bearer authentication + diff --git a/samples/client/echo_api/ruby-httpx/docs/AuthApi.md b/samples/client/echo_api/ruby-httpx/docs/AuthApi.md index d82f08464e14..9d924e77375f 100644 --- a/samples/client/echo_api/ruby-httpx/docs/AuthApi.md +++ b/samples/client/echo_api/ruby-httpx/docs/AuthApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost:3000* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**test_auth_http_basic**](AuthApi.md#test_auth_http_basic) | **POST** /auth/http/basic | To test HTTP basic authentication | +| [**test_auth_http_bearer**](AuthApi.md#test_auth_http_bearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication | ## test_auth_http_basic @@ -73,3 +74,69 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: text/plain + +## test_auth_http_bearer + +> String test_auth_http_bearer + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Examples + +```ruby +require 'time' +require 'openapi_client' +# setup authorization +OpenapiClient.configure do |config| + # Configure Bearer authorization: http_bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = OpenapiClient::AuthApi.new + +begin + # To test HTTP bearer authentication + result = api_instance.test_auth_http_bearer + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling AuthApi->test_auth_http_bearer: #{e}" +end +``` + +#### Using the test_auth_http_bearer_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> test_auth_http_bearer_with_http_info + +```ruby +begin + # To test HTTP bearer authentication + data, status_code, headers = api_instance.test_auth_http_bearer_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => String +rescue OpenapiClient::ApiError => e + puts "Error when calling AuthApi->test_auth_http_bearer_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + diff --git a/samples/client/echo_api/ruby-httpx/lib/openapi_client/api/auth_api.rb b/samples/client/echo_api/ruby-httpx/lib/openapi_client/api/auth_api.rb index ac3b26b281f3..173010b537d4 100644 --- a/samples/client/echo_api/ruby-httpx/lib/openapi_client/api/auth_api.rb +++ b/samples/client/echo_api/ruby-httpx/lib/openapi_client/api/auth_api.rb @@ -75,5 +75,62 @@ def test_auth_http_basic_with_http_info(opts = {}) end return data, status_code, headers end + + # To test HTTP bearer authentication + # To test HTTP bearer authentication + # @param [Hash] opts the optional parameters + # @return [String] + def test_auth_http_bearer(opts = {}) + data, _status_code, _headers = test_auth_http_bearer_with_http_info(opts) + data + end + + # To test HTTP bearer authentication + # To test HTTP bearer authentication + # @param [Hash] opts the optional parameters + # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers + def test_auth_http_bearer_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AuthApi.test_auth_http_bearer ...' + end + # resource path + local_var_path = '/auth/http/bearer' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['text/plain']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'String' + + # auth_names + auth_names = opts[:debug_auth_names] || ['http_bearer_auth'] + + new_options = opts.merge( + :operation => :"AuthApi.test_auth_http_bearer", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AuthApi#test_auth_http_bearer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/samples/client/echo_api/ruby-httpx/lib/openapi_client/configuration.rb b/samples/client/echo_api/ruby-httpx/lib/openapi_client/configuration.rb index eebc2734c0c1..aa57fb3eb4d4 100644 --- a/samples/client/echo_api/ruby-httpx/lib/openapi_client/configuration.rb +++ b/samples/client/echo_api/ruby-httpx/lib/openapi_client/configuration.rb @@ -209,6 +209,13 @@ def auth_settings key: 'Authorization', value: basic_auth_token }, + 'http_bearer_auth' => + { + type: 'bearer', + in: 'header', + key: 'Authorization', + value: "Bearer #{access_token_with_refresh}" + }, } end diff --git a/samples/client/echo_api/typescript-axios/build/api.ts b/samples/client/echo_api/typescript-axios/build/api.ts index 26516836aca4..5716d787bcf2 100644 --- a/samples/client/echo_api/typescript-axios/build/api.ts +++ b/samples/client/echo_api/typescript-axios/build/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -348,7 +348,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testAuthHttpBasic: async (options: AxiosRequestConfig = {}): Promise => { + testAuthHttpBasic: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/auth/http/basic`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -367,6 +367,40 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * To test HTTP bearer authentication + * @summary To test HTTP bearer authentication + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testAuthHttpBearer: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/auth/http/bearer`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication http_bearer_auth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -392,12 +426,24 @@ export const AuthApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testAuthHttpBasic(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testAuthHttpBasic(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testAuthHttpBasic(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['AuthApi.testAuthHttpBasic']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, + /** + * To test HTTP bearer authentication + * @summary To test HTTP bearer authentication + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testAuthHttpBearer(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testAuthHttpBearer(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AuthApi.testAuthHttpBearer']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, } }; @@ -417,6 +463,15 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath? testAuthHttpBasic(options?: any): AxiosPromise { return localVarFp.testAuthHttpBasic(options).then((request) => request(axios, basePath)); }, + /** + * To test HTTP bearer authentication + * @summary To test HTTP bearer authentication + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testAuthHttpBearer(options?: any): AxiosPromise { + return localVarFp.testAuthHttpBearer(options).then((request) => request(axios, basePath)); + }, }; }; @@ -434,9 +489,20 @@ export class AuthApi extends BaseAPI { * @throws {RequiredError} * @memberof AuthApi */ - public testAuthHttpBasic(options?: AxiosRequestConfig) { + public testAuthHttpBasic(options?: RawAxiosRequestConfig) { return AuthApiFp(this.configuration).testAuthHttpBasic(options).then((request) => request(this.axios, this.basePath)); } + + /** + * To test HTTP bearer authentication + * @summary To test HTTP bearer authentication + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuthApi + */ + public testAuthHttpBearer(options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).testAuthHttpBearer(options).then((request) => request(this.axios, this.basePath)); + } } @@ -453,7 +519,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBinaryGif: async (options: AxiosRequestConfig = {}): Promise => { + testBinaryGif: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/binary/gif`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -484,7 +550,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyApplicationOctetstreamBinary: async (body?: File, options: AxiosRequestConfig = {}): Promise => { + testBodyApplicationOctetstreamBinary: async (body?: File, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/body/application/octetstream/binary`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -518,7 +584,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyMultipartFormdataArrayOfBinary: async (files: Array, options: AxiosRequestConfig = {}): Promise => { + testBodyMultipartFormdataArrayOfBinary: async (files: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'files' is not null or undefined assertParamExists('testBodyMultipartFormdataArrayOfBinary', 'files', files) const localVarPath = `/body/application/octetstream/array_of_binary`; @@ -561,7 +627,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyAllOfPet: async (pet?: Pet, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyAllOfPet: async (pet?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/allOf/Pet`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -595,7 +661,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyFreeFormObjectResponseString: async (body?: object, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyFreeFormObjectResponseString: async (body?: object, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/FreeFormObject/response_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -629,7 +695,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyPet: async (pet?: Pet, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyPet: async (pet?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/Pet`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -663,7 +729,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyPetResponseString: async (pet?: Pet, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyPetResponseString: async (pet?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/Pet/response_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -697,7 +763,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyTagResponseString: async (tag?: Tag, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyTagResponseString: async (tag?: Tag, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/Tag/response_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -740,7 +806,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBinaryGif(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBinaryGif(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBinaryGif(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testBinaryGif']?.[index]?.url; @@ -753,7 +819,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyApplicationOctetstreamBinary(body?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyApplicationOctetstreamBinary(body?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyApplicationOctetstreamBinary(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testBodyApplicationOctetstreamBinary']?.[index]?.url; @@ -766,7 +832,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyMultipartFormdataArrayOfBinary(files: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyMultipartFormdataArrayOfBinary(files: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyMultipartFormdataArrayOfBinary(files, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testBodyMultipartFormdataArrayOfBinary']?.[index]?.url; @@ -779,7 +845,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyAllOfPet(pet?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyAllOfPet(pet?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyAllOfPet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyAllOfPet']?.[index]?.url; @@ -792,7 +858,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyFreeFormObjectResponseString(body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyFreeFormObjectResponseString(body?: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyFreeFormObjectResponseString(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyFreeFormObjectResponseString']?.[index]?.url; @@ -805,7 +871,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyPet(pet?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyPet(pet?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyPet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyPet']?.[index]?.url; @@ -818,7 +884,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyPetResponseString(pet?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyPetResponseString(pet?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyPetResponseString(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyPetResponseString']?.[index]?.url; @@ -831,7 +897,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyTagResponseString(tag?: Tag, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyTagResponseString(tag?: Tag, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyTagResponseString(tag, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyTagResponseString']?.[index]?.url; @@ -943,7 +1009,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testBinaryGif(options?: AxiosRequestConfig) { + public testBinaryGif(options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testBinaryGif(options).then((request) => request(this.axios, this.basePath)); } @@ -955,7 +1021,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testBodyApplicationOctetstreamBinary(body?: File, options?: AxiosRequestConfig) { + public testBodyApplicationOctetstreamBinary(body?: File, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testBodyApplicationOctetstreamBinary(body, options).then((request) => request(this.axios, this.basePath)); } @@ -967,7 +1033,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testBodyMultipartFormdataArrayOfBinary(files: Array, options?: AxiosRequestConfig) { + public testBodyMultipartFormdataArrayOfBinary(files: Array, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testBodyMultipartFormdataArrayOfBinary(files, options).then((request) => request(this.axios, this.basePath)); } @@ -979,7 +1045,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyAllOfPet(pet?: Pet, options?: AxiosRequestConfig) { + public testEchoBodyAllOfPet(pet?: Pet, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyAllOfPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -991,7 +1057,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyFreeFormObjectResponseString(body?: object, options?: AxiosRequestConfig) { + public testEchoBodyFreeFormObjectResponseString(body?: object, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyFreeFormObjectResponseString(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1003,7 +1069,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyPet(pet?: Pet, options?: AxiosRequestConfig) { + public testEchoBodyPet(pet?: Pet, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -1015,7 +1081,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyPetResponseString(pet?: Pet, options?: AxiosRequestConfig) { + public testEchoBodyPetResponseString(pet?: Pet, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyPetResponseString(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -1027,7 +1093,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyTagResponseString(tag?: Tag, options?: AxiosRequestConfig) { + public testEchoBodyTagResponseString(tag?: Tag, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyTagResponseString(tag, options).then((request) => request(this.axios, this.basePath)); } } @@ -1049,7 +1115,7 @@ export const FormApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testFormIntegerBooleanString: async (integerForm?: number, booleanForm?: boolean, stringForm?: string, options: AxiosRequestConfig = {}): Promise => { + testFormIntegerBooleanString: async (integerForm?: number, booleanForm?: boolean, stringForm?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/form/integer/boolean/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1101,7 +1167,7 @@ export const FormApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testFormOneof: async (form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options: AxiosRequestConfig = {}): Promise => { + testFormOneof: async (form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/form/oneof`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1172,7 +1238,7 @@ export const FormApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testFormIntegerBooleanString(integerForm?: number, booleanForm?: boolean, stringForm?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testFormIntegerBooleanString(integerForm?: number, booleanForm?: boolean, stringForm?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testFormIntegerBooleanString(integerForm, booleanForm, stringForm, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FormApi.testFormIntegerBooleanString']?.[index]?.url; @@ -1190,7 +1256,7 @@ export const FormApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testFormOneof(form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testFormOneof(form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testFormOneof(form1, form2, form3, form4, id, name, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FormApi.testFormOneof']?.[index]?.url; @@ -1253,7 +1319,7 @@ export class FormApi extends BaseAPI { * @throws {RequiredError} * @memberof FormApi */ - public testFormIntegerBooleanString(integerForm?: number, booleanForm?: boolean, stringForm?: string, options?: AxiosRequestConfig) { + public testFormIntegerBooleanString(integerForm?: number, booleanForm?: boolean, stringForm?: string, options?: RawAxiosRequestConfig) { return FormApiFp(this.configuration).testFormIntegerBooleanString(integerForm, booleanForm, stringForm, options).then((request) => request(this.axios, this.basePath)); } @@ -1270,7 +1336,7 @@ export class FormApi extends BaseAPI { * @throws {RequiredError} * @memberof FormApi */ - public testFormOneof(form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options?: AxiosRequestConfig) { + public testFormOneof(form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options?: RawAxiosRequestConfig) { return FormApiFp(this.configuration).testFormOneof(form1, form2, form3, form4, id, name, options).then((request) => request(this.axios, this.basePath)); } } @@ -1294,7 +1360,7 @@ export const HeaderApiAxiosParamCreator = function (configuration?: Configuratio * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testHeaderIntegerBooleanStringEnums: async (integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options: AxiosRequestConfig = {}): Promise => { + testHeaderIntegerBooleanStringEnums: async (integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/header/integer/boolean/string/enums`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1365,7 +1431,7 @@ export const HeaderApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testHeaderIntegerBooleanStringEnums(integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testHeaderIntegerBooleanStringEnums(integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['HeaderApi.testHeaderIntegerBooleanStringEnums']?.[index]?.url; @@ -1417,7 +1483,7 @@ export class HeaderApi extends BaseAPI { * @throws {RequiredError} * @memberof HeaderApi */ - public testHeaderIntegerBooleanStringEnums(integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options?: AxiosRequestConfig) { + public testHeaderIntegerBooleanStringEnums(integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options?: RawAxiosRequestConfig) { return HeaderApiFp(this.configuration).testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, options).then((request) => request(this.axios, this.basePath)); } } @@ -1449,7 +1515,7 @@ export const PathApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath: async (pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options: AxiosRequestConfig = {}): Promise => { + testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath: async (pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pathString' is not null or undefined assertParamExists('testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath', 'pathString', pathString) // verify required parameter 'pathInteger' is not null or undefined @@ -1505,7 +1571,7 @@ export const PathApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PathApi.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath']?.[index]?.url; @@ -1555,7 +1621,7 @@ export class PathApi extends BaseAPI { * @throws {RequiredError} * @memberof PathApi */ - public testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options?: AxiosRequestConfig) { + public testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options?: RawAxiosRequestConfig) { return PathApiFp(this.configuration).testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, options).then((request) => request(this.axios, this.basePath)); } } @@ -1585,7 +1651,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEnumRefString: async (enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options: AxiosRequestConfig = {}): Promise => { + testEnumRefString: async (enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/enum_ref_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1626,7 +1692,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryDatetimeDateString: async (datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options: AxiosRequestConfig = {}): Promise => { + testQueryDatetimeDateString: async (datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/datetime/date/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1675,7 +1741,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryIntegerBooleanString: async (integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options: AxiosRequestConfig = {}): Promise => { + testQueryIntegerBooleanString: async (integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/integer/boolean/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1718,7 +1784,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleDeepObjectExplodeTrueObject: async (queryObject?: Pet, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleDeepObjectExplodeTrueObject: async (queryObject?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_deepObject/explode_true/object`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1755,7 +1821,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleDeepObjectExplodeTrueObjectAllOf: async (queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleDeepObjectExplodeTrueObjectAllOf: async (queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_deepObject/explode_true/object/allOf`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1792,7 +1858,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleFormExplodeTrueArrayString: async (queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleFormExplodeTrueArrayString: async (queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_form/explode_true/array_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1829,7 +1895,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleFormExplodeTrueObject: async (queryObject?: Pet, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleFormExplodeTrueObject: async (queryObject?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_form/explode_true/object`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1866,7 +1932,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleFormExplodeTrueObjectAllOf: async (queryObject?: DataQuery, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleFormExplodeTrueObjectAllOf: async (queryObject?: DataQuery, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_form/explode_true/object/allOf`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1914,7 +1980,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEnumRefString(enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEnumRefString(enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testEnumRefString']?.[index]?.url; @@ -1929,7 +1995,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryDatetimeDateString(datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryDatetimeDateString(datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryDatetimeDateString']?.[index]?.url; @@ -1944,7 +2010,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryIntegerBooleanString(integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryIntegerBooleanString(integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryIntegerBooleanString']?.[index]?.url; @@ -1957,7 +2023,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleDeepObjectExplodeTrueObject(queryObject?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleDeepObjectExplodeTrueObject(queryObject?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleDeepObjectExplodeTrueObject(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleDeepObjectExplodeTrueObject']?.[index]?.url; @@ -1970,7 +2036,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleDeepObjectExplodeTrueObjectAllOf']?.[index]?.url; @@ -1983,7 +2049,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleFormExplodeTrueArrayString(queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleFormExplodeTrueArrayString(queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleFormExplodeTrueArrayString(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleFormExplodeTrueArrayString']?.[index]?.url; @@ -1996,7 +2062,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleFormExplodeTrueObject(queryObject?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleFormExplodeTrueObject(queryObject?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleFormExplodeTrueObject(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleFormExplodeTrueObject']?.[index]?.url; @@ -2009,7 +2075,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleFormExplodeTrueObjectAllOf(queryObject?: DataQuery, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleFormExplodeTrueObjectAllOf(queryObject?: DataQuery, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleFormExplodeTrueObjectAllOf(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleFormExplodeTrueObjectAllOf']?.[index]?.url; @@ -2129,7 +2195,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testEnumRefString(enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options?: AxiosRequestConfig) { + public testEnumRefString(enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testEnumRefString(enumNonrefStringQuery, enumRefStringQuery, options).then((request) => request(this.axios, this.basePath)); } @@ -2143,7 +2209,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryDatetimeDateString(datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options?: AxiosRequestConfig) { + public testQueryDatetimeDateString(datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery, options).then((request) => request(this.axios, this.basePath)); } @@ -2157,7 +2223,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryIntegerBooleanString(integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options?: AxiosRequestConfig) { + public testQueryIntegerBooleanString(integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery, options).then((request) => request(this.axios, this.basePath)); } @@ -2169,7 +2235,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleDeepObjectExplodeTrueObject(queryObject?: Pet, options?: AxiosRequestConfig) { + public testQueryStyleDeepObjectExplodeTrueObject(queryObject?: Pet, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleDeepObjectExplodeTrueObject(queryObject, options).then((request) => request(this.axios, this.basePath)); } @@ -2181,7 +2247,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options?: AxiosRequestConfig) { + public testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject, options).then((request) => request(this.axios, this.basePath)); } @@ -2193,7 +2259,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleFormExplodeTrueArrayString(queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options?: AxiosRequestConfig) { + public testQueryStyleFormExplodeTrueArrayString(queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleFormExplodeTrueArrayString(queryObject, options).then((request) => request(this.axios, this.basePath)); } @@ -2205,7 +2271,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleFormExplodeTrueObject(queryObject?: Pet, options?: AxiosRequestConfig) { + public testQueryStyleFormExplodeTrueObject(queryObject?: Pet, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleFormExplodeTrueObject(queryObject, options).then((request) => request(this.axios, this.basePath)); } @@ -2217,7 +2283,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleFormExplodeTrueObjectAllOf(queryObject?: DataQuery, options?: AxiosRequestConfig) { + public testQueryStyleFormExplodeTrueObjectAllOf(queryObject?: DataQuery, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleFormExplodeTrueObjectAllOf(queryObject, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/echo_api/typescript-axios/build/base.ts b/samples/client/echo_api/typescript-axios/build/base.ts index 0b934f634802..b95cd69a9ed8 100644 --- a/samples/client/echo_api/typescript-axios/build/base.ts +++ b/samples/client/echo_api/typescript-axios/build/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/echo_api/typescript-axios/build/package.json b/samples/client/echo_api/typescript-axios/build/package.json index 2e6610e9576c..fc256cc498a5 100644 --- a/samples/client/echo_api/typescript-axios/build/package.json +++ b/samples/client/echo_api/typescript-axios/build/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index 817b0ca83fbe..db1100f03d6e 100644 --- a/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index 9f9baa8434ec..71f91cca2d83 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java index ebe0199f829f..a267982e2ca2 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java @@ -128,7 +128,6 @@ public SomeObj() { } public SomeObj $type(TypeEnum $type) { - this.$type = $type; return this; } @@ -142,14 +141,12 @@ public SomeObj() { return $type; } - public void set$Type(TypeEnum $type) { this.$type = $type; } public SomeObj id(Long id) { - this.id = id; return this; } @@ -163,14 +160,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public SomeObj name(String name) { - this.name = name; return this; } @@ -184,14 +179,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public SomeObj active(Boolean active) { - this.active = active; return this; } @@ -205,14 +198,12 @@ public Boolean getActive() { return active; } - public void setActive(Boolean active) { this.active = active; } public SomeObj type(String type) { - this.type = type; return this; } @@ -226,7 +217,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts index d0ca3a315641..208ec53dda46 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 66408e8d3281..acda1cdef8ff 100644 --- a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -9,7 +9,7 @@ - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/ManualTests.Latest.UseSourceGeneration.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/ManualTests.Latest.UseSourceGeneration.csproj index b7165522a829..9e5f1f956bfa 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/ManualTests.Latest.UseSourceGeneration.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/ManualTests.Latest.UseSourceGeneration.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable @@ -10,10 +10,13 @@ - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/OpenAPIClient-generichost-manual-tests/OpenAPIClient-generichost-manual-tests.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/OpenAPIClient-generichost-manual-tests/OpenAPIClient-generichost-manual-tests.csproj index b1f2fbeee07c..d87af4c4d16b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/OpenAPIClient-generichost-manual-tests/OpenAPIClient-generichost-manual-tests.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/OpenAPIClient-generichost-manual-tests/OpenAPIClient-generichost-manual-tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 OpenAPIClient_generichost_manual_tests enable enable @@ -11,10 +11,13 @@ - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj index 4711912c0ea2..59d5db6798dd 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj @@ -3,13 +3,13 @@ UseSourceGeneration.Test UseSourceGeneration.Test - net7.0 + net8.0 false enable - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/README.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/README.md index b6e75fbf4990..a285755b8126 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/README.md @@ -6,7 +6,7 @@ ```ps1 $properties = @( 'apiName=Api', - 'targetFramework=net7.0', + 'targetFramework=net8.0', 'validatable=true', 'nullableReferenceTypes=true', 'hideGenerationTimestamp=true', @@ -249,7 +249,7 @@ Authentication schemes defined for the API: - returnICollection: false - sortParamsByRequiredFlag: - sourceFolder: src -- targetFramework: net7.0 +- targetFramework: net8.0 - useCollection: false - useDateTimeOffset: false - useOneOfDiscriminatorLookup: false diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/UseSourceGeneration.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/UseSourceGeneration.csproj index 2f4353587e30..61d9add574f9 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/UseSourceGeneration.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/UseSourceGeneration.csproj @@ -2,7 +2,7 @@ true - net7.0 + net8.0 UseSourceGeneration UseSourceGeneration Library @@ -22,9 +22,9 @@ - - - + + + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 87c2b274318b..872d1687aa20 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -3,13 +3,13 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - net7.0 + net8.0 false enable - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 0f690b2ce61a..cee8b7854c74 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ true - net7.0 + net8.0 Org.OpenAPITools Org.OpenAPITools Library @@ -22,9 +22,9 @@ - - - + + + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/README.md index 704bd29f834f..98fc6c19c074 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/README.md @@ -6,7 +6,7 @@ ```ps1 $properties = @( 'apiName=Api', - 'targetFramework=net7.0', + 'targetFramework=net8.0', 'validatable=true', 'nullableReferenceTypes=true', 'hideGenerationTimestamp=true', @@ -249,7 +249,7 @@ Authentication schemes defined for the API: - returnICollection: false - sortParamsByRequiredFlag: - sourceFolder: src -- targetFramework: net7.0 +- targetFramework: net8.0 - useCollection: false - useDateTimeOffset: false - useOneOfDiscriminatorLookup: false diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 086c8a39d348..6335b173b1af 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -3,12 +3,12 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - net7.0 + net8.0 false - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 62f0afe2618f..d49f3a81795e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ true - net7.0 + net8.0 Org.OpenAPITools Org.OpenAPITools Library @@ -21,9 +21,9 @@ - - - + + + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/README.md index f35af0325070..2b94e7baeb2f 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/README.md @@ -6,7 +6,7 @@ ```ps1 $properties = @( 'apiName=Api', - 'targetFramework=net7.0', + 'targetFramework=net8.0', 'validatable=true', 'nullableReferenceTypes=false', 'hideGenerationTimestamp=true', @@ -249,7 +249,7 @@ Authentication schemes defined for the API: - returnICollection: false - sortParamsByRequiredFlag: - sourceFolder: src -- targetFramework: net7.0 +- targetFramework: net8.0 - useCollection: false - useDateTimeOffset: false - useOneOfDiscriminatorLookup: false diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 87c2b274318b..872d1687aa20 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -3,13 +3,13 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - net7.0 + net8.0 false enable - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 0f690b2ce61a..cee8b7854c74 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ true - net7.0 + net8.0 Org.OpenAPITools Org.OpenAPITools Library @@ -22,9 +22,9 @@ - - - + + + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/README.md index 404458e0b5a3..a9f072d3f49b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/README.md @@ -6,7 +6,7 @@ ```ps1 $properties = @( 'apiName=Api', - 'targetFramework=net7.0', + 'targetFramework=net8.0', 'validatable=true', 'nullableReferenceTypes=true', 'hideGenerationTimestamp=true', @@ -168,7 +168,7 @@ Endpoints do not require authorization. - returnICollection: false - sortParamsByRequiredFlag: - sourceFolder: src -- targetFramework: net7.0 +- targetFramework: net8.0 - useCollection: false - useDateTimeOffset: false - useOneOfDiscriminatorLookup: false diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 87c2b274318b..872d1687aa20 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -3,13 +3,13 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - net7.0 + net8.0 false enable - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 0f690b2ce61a..cee8b7854c74 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ true - net7.0 + net8.0 Org.OpenAPITools Org.OpenAPITools Library @@ -22,9 +22,9 @@ - - - + + + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/README.md index d4c30c3cd7bb..5fbf4cd118b2 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/README.md @@ -6,7 +6,7 @@ ```ps1 $properties = @( 'apiName=Api', - 'targetFramework=net7.0', + 'targetFramework=net8.0', 'validatable=true', 'nullableReferenceTypes=true', 'hideGenerationTimestamp=true', @@ -168,7 +168,7 @@ Endpoints do not require authorization. - returnICollection: false - sortParamsByRequiredFlag: - sourceFolder: src -- targetFramework: net7.0 +- targetFramework: net8.0 - useCollection: false - useDateTimeOffset: false - useOneOfDiscriminatorLookup: false diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 87c2b274318b..872d1687aa20 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -3,13 +3,13 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - net7.0 + net8.0 false enable - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 0f690b2ce61a..cee8b7854c74 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ true - net7.0 + net8.0 Org.OpenAPITools Org.OpenAPITools Library @@ -22,9 +22,9 @@ - - - + + + diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/README.md index d4c30c3cd7bb..5fbf4cd118b2 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/README.md @@ -6,7 +6,7 @@ ```ps1 $properties = @( 'apiName=Api', - 'targetFramework=net7.0', + 'targetFramework=net8.0', 'validatable=true', 'nullableReferenceTypes=true', 'hideGenerationTimestamp=true', @@ -168,7 +168,7 @@ Endpoints do not require authorization. - returnICollection: false - sortParamsByRequiredFlag: - sourceFolder: src -- targetFramework: net7.0 +- targetFramework: net8.0 - useCollection: false - useDateTimeOffset: false - useOneOfDiscriminatorLookup: false diff --git a/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 4894e3983d79..7d108b4e7df3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -8,7 +8,7 @@ - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 6e1e97fd27d1..d6af6b81ea78 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -8,7 +8,7 @@ - + diff --git a/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index fd52336309ad..3ddd6b44be59 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -9,7 +9,7 @@ - + diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index b11d62b0718a..d25e81a52783 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java index ce03faf30dda..e93327f47e76 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java @@ -64,7 +64,6 @@ public Animal() { } public Animal className(String className) { - this.className = className; return this; } @@ -78,14 +77,12 @@ public String getClassName() { return className; } - public void setClassName(String className) { this.className = className; } public Animal color(String color) { - this.color = color; return this; } @@ -99,7 +96,6 @@ public String getColor() { return color; } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java index 669801f89208..876f2c52bb26 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java @@ -61,7 +61,6 @@ public Cat() { } public Cat declawed(Boolean declawed) { - this.declawed = declawed; return this; } @@ -75,7 +74,6 @@ public Boolean getDeclawed() { return declawed; } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java index ec41d25fa99f..f12855dae504 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java @@ -63,7 +63,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java index 569f75188d9f..52f9e1adea2a 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java @@ -61,7 +61,6 @@ public Dog() { } public Dog breed(String breed) { - this.breed = breed; return this; } @@ -75,7 +74,6 @@ public String getBreed() { return breed; } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index a1df10aece5f..59645dcffcc2 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -67,7 +67,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -81,14 +80,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -102,14 +99,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -123,7 +118,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java index 8ebfab4c22a4..53a96c763a7c 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java @@ -134,7 +134,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -148,14 +147,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -169,14 +166,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -190,14 +185,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -211,14 +204,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -232,14 +223,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -253,7 +242,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java index 691d44432202..9d0e1e017afa 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java @@ -138,7 +138,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -152,14 +151,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -173,14 +170,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -194,14 +189,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -223,14 +216,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -252,7 +243,6 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } @@ -260,7 +250,6 @@ public void setTags(List tags) { @Deprecated public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -276,7 +265,6 @@ public StatusEnum getStatus() { return status; } - @Deprecated public void setStatus(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java index 262ef93dbbd3..bae59a3dedb3 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java @@ -63,7 +63,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java index 8c1f31e4d16a..157f92c49599 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java @@ -87,7 +87,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -101,14 +100,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -122,14 +119,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -143,14 +138,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -164,14 +157,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -185,14 +176,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -206,14 +195,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -227,14 +214,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -248,7 +233,6 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index b11d62b0718a..d25e81a52783 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Category.java index ec41d25fa99f..f12855dae504 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Category.java @@ -63,7 +63,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/ModelApiResponse.java index a1df10aece5f..59645dcffcc2 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -67,7 +67,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -81,14 +80,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -102,14 +99,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -123,7 +118,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Order.java index 8ebfab4c22a4..53a96c763a7c 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Order.java @@ -134,7 +134,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -148,14 +147,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -169,14 +166,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -190,14 +185,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -211,14 +204,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -232,14 +223,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -253,7 +242,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Pet.java index 691d44432202..9d0e1e017afa 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Pet.java @@ -138,7 +138,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -152,14 +151,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -173,14 +170,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -194,14 +189,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -223,14 +216,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -252,7 +243,6 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } @@ -260,7 +250,6 @@ public void setTags(List tags) { @Deprecated public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -276,7 +265,6 @@ public StatusEnum getStatus() { return status; } - @Deprecated public void setStatus(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Tag.java index 262ef93dbbd3..bae59a3dedb3 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Tag.java @@ -63,7 +63,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/User.java index 8c1f31e4d16a..157f92c49599 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/User.java @@ -87,7 +87,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -101,14 +100,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -122,14 +119,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -143,14 +138,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -164,14 +157,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -185,14 +176,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -206,14 +195,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -227,14 +214,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -248,7 +233,6 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index fbe51042e1a9..f50f7a96cc56 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index ec21cd1712b4..668b07a52c66 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -59,7 +59,6 @@ public AdditionalPropertiesAnyType() { } public AdditionalPropertiesAnyType name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 7a1c195ef71c..26d5f8cdd69c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -60,7 +60,6 @@ public AdditionalPropertiesArray() { } public AdditionalPropertiesArray name(String name) { - this.name = name; return this; } @@ -74,7 +73,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index c2da10296171..9e411cc5ba72 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -59,7 +59,6 @@ public AdditionalPropertiesBoolean() { } public AdditionalPropertiesBoolean name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 6f46c20df649..c8778337114d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -103,7 +103,6 @@ public AdditionalPropertiesClass() { } public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; return this; } @@ -125,14 +124,12 @@ public Map getMapString() { return mapString; } - public void setMapString(Map mapString) { this.mapString = mapString; } public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; return this; } @@ -154,14 +151,12 @@ public Map getMapNumber() { return mapNumber; } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } public AdditionalPropertiesClass mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; return this; } @@ -183,14 +178,12 @@ public Map getMapInteger() { return mapInteger; } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; return this; } @@ -212,14 +205,12 @@ public Map getMapBoolean() { return mapBoolean; } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; return this; } @@ -241,14 +232,12 @@ public Map> getMapArrayInteger() { return mapArrayInteger; } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; return this; } @@ -270,14 +259,12 @@ public Map> getMapArrayAnytype() { return mapArrayAnytype; } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; return this; } @@ -299,14 +286,12 @@ public Map> getMapMapString() { return mapMapString; } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; return this; } @@ -328,14 +313,12 @@ public Map> getMapMapAnytype() { return mapMapAnytype; } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } public AdditionalPropertiesClass anytype1(Object anytype1) { - this.anytype1 = anytype1; return this; } @@ -349,14 +332,12 @@ public Object getAnytype1() { return anytype1; } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = anytype2; return this; } @@ -370,14 +351,12 @@ public Object getAnytype2() { return anytype2; } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } public AdditionalPropertiesClass anytype3(Object anytype3) { - this.anytype3 = anytype3; return this; } @@ -391,7 +370,6 @@ public Object getAnytype3() { return anytype3; } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 019fa46ff80a..cd8624dcc7ce 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -59,7 +59,6 @@ public AdditionalPropertiesInteger() { } public AdditionalPropertiesInteger name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 567c325dcaab..c5bba0308f6f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -60,7 +60,6 @@ public AdditionalPropertiesNumber() { } public AdditionalPropertiesNumber name(String name) { - this.name = name; return this; } @@ -74,7 +73,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index 37b7091e0bcc..d5523899c5ba 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -60,7 +60,6 @@ public AdditionalPropertiesObject() { } public AdditionalPropertiesObject name(String name) { - this.name = name; return this; } @@ -74,7 +73,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 9d911a03b4da..9f40983f2dc8 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -59,7 +59,6 @@ public AdditionalPropertiesString() { } public AdditionalPropertiesString name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Animal.java index bdb0dcd35913..0136596cb66f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Animal.java @@ -64,7 +64,6 @@ public Animal() { } public Animal className(String className) { - this.className = className; return this; } @@ -78,14 +77,12 @@ public String getClassName() { return className; } - public void setClassName(String className) { this.className = className; } public Animal color(String color) { - this.color = color; return this; } @@ -99,7 +96,6 @@ public String getColor() { return color; } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 84e446adfe35..8fd1a94f2598 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -62,7 +62,6 @@ public ArrayOfArrayOfNumberOnly() { } public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; return this; } @@ -84,7 +83,6 @@ public List> getArrayArrayNumber() { return arrayArrayNumber; } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index b032848a8052..4c1a3fd40b04 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -62,7 +62,6 @@ public ArrayOfNumberOnly() { } public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; return this; } @@ -84,7 +83,6 @@ public List getArrayNumber() { return arrayNumber; } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayTest.java index 1d325c079da5..52dc1f51e136 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -70,7 +70,6 @@ public ArrayTest() { } public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; return this; } @@ -92,14 +91,12 @@ public List getArrayOfString() { return arrayOfString; } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; return this; } @@ -121,14 +118,12 @@ public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -150,7 +145,6 @@ public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCat.java index b685d1b61605..ab690a217b09 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCat.java @@ -117,7 +117,6 @@ public BigCat() { } public BigCat kind(KindEnum kind) { - this.kind = kind; return this; } @@ -131,7 +130,6 @@ public KindEnum getKind() { return kind; } - public void setKind(KindEnum kind) { this.kind = kind; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Capitalization.java index 366e48a5a77b..288c559b9a4a 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Capitalization.java @@ -79,7 +79,6 @@ public Capitalization() { } public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; return this; } @@ -93,14 +92,12 @@ public String getSmallCamel() { return smallCamel; } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; return this; } @@ -114,14 +111,12 @@ public String getCapitalCamel() { return capitalCamel; } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; return this; } @@ -135,14 +130,12 @@ public String getSmallSnake() { return smallSnake; } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; return this; } @@ -156,14 +149,12 @@ public String getCapitalSnake() { return capitalSnake; } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; return this; } @@ -177,14 +168,12 @@ public String getScAETHFlowPoints() { return scAETHFlowPoints; } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; return this; } @@ -198,7 +187,6 @@ public String getATTNAME() { return ATT_NAME; } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Cat.java index 80e40e90099b..82abfcbae8a6 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Cat.java @@ -61,7 +61,6 @@ public Cat() { } public Cat declawed(Boolean declawed) { - this.declawed = declawed; return this; } @@ -75,7 +74,6 @@ public Boolean getDeclawed() { return declawed; } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Category.java index 671e228b4205..47b8484413eb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Category.java @@ -63,7 +63,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ClassModel.java index b473437102ca..73d93ccab308 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ClassModel.java @@ -59,7 +59,6 @@ public ClassModel() { } public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; return this; } @@ -73,7 +72,6 @@ public String getPropertyClass() { return propertyClass; } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Client.java index fde656f3e93b..b5bf39b59833 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Client.java @@ -59,7 +59,6 @@ public Client() { } public Client client(String client) { - this.client = client; return this; } @@ -73,7 +72,6 @@ public String getClient() { return client; } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Dog.java index 56ba84484ee0..8688f797390d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Dog.java @@ -61,7 +61,6 @@ public Dog() { } public Dog breed(String breed) { - this.breed = breed; return this; } @@ -75,7 +74,6 @@ public String getBreed() { return breed; } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumArrays.java index 2bf075043ec9..ac1d4b206962 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -169,7 +169,6 @@ public EnumArrays() { } public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; return this; } @@ -183,14 +182,12 @@ public JustSymbolEnum getJustSymbol() { return justSymbol; } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; return this; } @@ -212,7 +209,6 @@ public List getArrayEnum() { return arrayEnum; } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumTest.java index d0dac18f44d3..162d8f7285b5 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/EnumTest.java @@ -288,7 +288,6 @@ public EnumTest() { } public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; return this; } @@ -302,14 +301,12 @@ public EnumStringEnum getEnumString() { return enumString; } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; return this; } @@ -323,14 +320,12 @@ public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; return this; } @@ -344,14 +339,12 @@ public EnumIntegerEnum getEnumInteger() { return enumInteger; } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; return this; } @@ -365,14 +358,12 @@ public EnumNumberEnum getEnumNumber() { return enumNumber; } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; return this; } @@ -386,7 +377,6 @@ public OuterEnum getOuterEnum() { return outerEnum; } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 8adfae2c7418..94f2a71eae4b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -66,7 +66,6 @@ public FileSchemaTestClass() { } public FileSchemaTestClass _file(ModelFile _file) { - this._file = _file; return this; } @@ -80,14 +79,12 @@ public ModelFile getFile() { return _file; } - public void setFile(ModelFile _file) { this._file = _file; } public FileSchemaTestClass files(List files) { - this.files = files; return this; } @@ -109,7 +106,6 @@ public List getFiles() { return files; } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FormatTest.java index f649e01789ec..12e860ed470e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/FormatTest.java @@ -116,7 +116,6 @@ public FormatTest() { } public FormatTest integer(Integer integer) { - this.integer = integer; return this; } @@ -132,14 +131,12 @@ public Integer getInteger() { return integer; } - public void setInteger(Integer integer) { this.integer = integer; } public FormatTest int32(Integer int32) { - this.int32 = int32; return this; } @@ -155,14 +152,12 @@ public Integer getInt32() { return int32; } - public void setInt32(Integer int32) { this.int32 = int32; } public FormatTest int64(Long int64) { - this.int64 = int64; return this; } @@ -176,14 +171,12 @@ public Long getInt64() { return int64; } - public void setInt64(Long int64) { this.int64 = int64; } public FormatTest number(BigDecimal number) { - this.number = number; return this; } @@ -199,14 +192,12 @@ public BigDecimal getNumber() { return number; } - public void setNumber(BigDecimal number) { this.number = number; } public FormatTest _float(Float _float) { - this._float = _float; return this; } @@ -222,14 +213,12 @@ public Float getFloat() { return _float; } - public void setFloat(Float _float) { this._float = _float; } public FormatTest _double(Double _double) { - this._double = _double; return this; } @@ -245,14 +234,12 @@ public Double getDouble() { return _double; } - public void setDouble(Double _double) { this._double = _double; } public FormatTest string(String string) { - this.string = string; return this; } @@ -266,14 +253,12 @@ public String getString() { return string; } - public void setString(String string) { this.string = string; } public FormatTest _byte(byte[] _byte) { - this._byte = _byte; return this; } @@ -287,14 +272,12 @@ public byte[] getByte() { return _byte; } - public void setByte(byte[] _byte) { this._byte = _byte; } public FormatTest binary(File binary) { - this.binary = binary; return this; } @@ -308,14 +291,12 @@ public File getBinary() { return binary; } - public void setBinary(File binary) { this.binary = binary; } public FormatTest date(LocalDate date) { - this.date = date; return this; } @@ -329,14 +310,12 @@ public LocalDate getDate() { return date; } - public void setDate(LocalDate date) { this.date = date; } public FormatTest dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; return this; } @@ -350,14 +329,12 @@ public OffsetDateTime getDateTime() { return dateTime; } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } public FormatTest uuid(UUID uuid) { - this.uuid = uuid; return this; } @@ -371,14 +348,12 @@ public UUID getUuid() { return uuid; } - public void setUuid(UUID uuid) { this.uuid = uuid; } public FormatTest password(String password) { - this.password = password; return this; } @@ -392,14 +367,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; return this; } @@ -413,7 +386,6 @@ public BigDecimal getBigDecimal() { return bigDecimal; } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 1c5d73e03bae..32032e5bc343 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -62,7 +62,6 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - public HasOnlyReadOnly( String bar, String foo @@ -83,7 +82,6 @@ public String getBar() { - /** * Get foo * @return foo @@ -96,7 +94,6 @@ public String getFoo() { - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MapTest.java index 4111615eddc9..cc727e2593be 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MapTest.java @@ -125,7 +125,6 @@ public MapTest() { } public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; return this; } @@ -147,14 +146,12 @@ public Map> getMapMapOfString() { return mapMapOfString; } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; return this; } @@ -176,14 +173,12 @@ public Map getMapOfEnumString() { return mapOfEnumString; } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } public MapTest directMap(Map directMap) { - this.directMap = directMap; return this; } @@ -205,14 +200,12 @@ public Map getDirectMap() { return directMap; } - public void setDirectMap(Map directMap) { this.directMap = directMap; } public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; return this; } @@ -234,7 +227,6 @@ public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 79f54cca16fa..d0826a2b882d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -72,7 +72,6 @@ public MixedPropertiesAndAdditionalPropertiesClass() { } public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; return this; } @@ -86,14 +85,12 @@ public UUID getUuid() { return uuid; } - public void setUuid(UUID uuid) { this.uuid = uuid; } public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; return this; } @@ -107,14 +104,12 @@ public OffsetDateTime getDateTime() { return dateTime; } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; return this; } @@ -136,7 +131,6 @@ public Map getMap() { return map; } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Model200Response.java index dec6111e406a..8297feeb63c9 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Model200Response.java @@ -63,7 +63,6 @@ public Model200Response() { } public Model200Response name(Integer name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public Integer getName() { return name; } - public void setName(Integer name) { this.name = name; } public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; return this; } @@ -98,7 +95,6 @@ public String getPropertyClass() { return propertyClass; } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 376aeed28c3d..177129845247 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -67,7 +67,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -81,14 +80,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -102,14 +99,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -123,7 +118,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelFile.java index 52f2a80efac7..11ae33c68658 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelFile.java @@ -59,7 +59,6 @@ public ModelFile() { } public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; return this; } @@ -73,7 +72,6 @@ public String getSourceURI() { return sourceURI; } - public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelList.java index d99033eeb2c2..dccad3c38e6b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelList.java @@ -59,7 +59,6 @@ public ModelList() { } public ModelList _123list(String _123list) { - this._123list = _123list; return this; } @@ -73,7 +72,6 @@ public String get123list() { return _123list; } - public void set123list(String _123list) { this._123list = _123list; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelReturn.java index 127d5ba93373..5e3c67935087 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -59,7 +59,6 @@ public ModelReturn() { } public ModelReturn _return(Integer _return) { - this._return = _return; return this; } @@ -73,7 +72,6 @@ public Integer getReturn() { return _return; } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Name.java index c47403447339..6bd4ca194801 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Name.java @@ -70,7 +70,6 @@ public class Name { public Name() { } - public Name( Integer snakeCase, Integer _123number @@ -81,7 +80,6 @@ public Name( } public Name name(Integer name) { - this.name = name; return this; } @@ -95,7 +93,6 @@ public Integer getName() { return name; } - public void setName(Integer name) { this.name = name; } @@ -112,9 +109,7 @@ public Integer getSnakeCase() { - public Name property(String property) { - this.property = property; return this; } @@ -128,7 +123,6 @@ public String getProperty() { return property; } - public void setProperty(String property) { this.property = property; } @@ -146,7 +140,6 @@ public Integer get123number() { - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/NumberOnly.java index 2ba74c8749df..af3b96e032fd 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -60,7 +60,6 @@ public NumberOnly() { } public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; return this; } @@ -74,7 +73,6 @@ public BigDecimal getJustNumber() { return justNumber; } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Order.java index 7835c9aa54d0..78bdbf3a864b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Order.java @@ -134,7 +134,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -148,14 +147,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -169,14 +166,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -190,14 +185,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -211,14 +204,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -232,14 +223,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -253,7 +242,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/OuterComposite.java index f160e0fb4a42..bc13c7ae288d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -68,7 +68,6 @@ public OuterComposite() { } public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; return this; } @@ -82,14 +81,12 @@ public BigDecimal getMyNumber() { return myNumber; } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } public OuterComposite myString(String myString) { - this.myString = myString; return this; } @@ -103,14 +100,12 @@ public String getMyString() { return myString; } - public void setMyString(String myString) { this.myString = myString; } public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; return this; } @@ -124,7 +119,6 @@ public Boolean getMyBoolean() { return myBoolean; } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Pet.java index b52d215946d9..26194976154e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Pet.java @@ -139,7 +139,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -153,14 +152,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -174,14 +171,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -195,14 +190,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(Set photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -224,14 +217,12 @@ public Set getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -253,14 +244,12 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -274,7 +263,6 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index fdc80bb4cd9b..23839d4ca244 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -62,7 +62,6 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - public ReadOnlyFirst( String bar ) { @@ -81,9 +80,7 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { - this.baz = baz; return this; } @@ -97,7 +94,6 @@ public String getBaz() { return baz; } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/SpecialModelName.java index cc84c9dbd0a3..132b997b8b1d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -59,7 +59,6 @@ public SpecialModelName() { } public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; return this; } @@ -73,7 +72,6 @@ public SpecialModelName() { return $specialPropertyName; } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Tag.java index aa4e38f9d985..efb4f0925bef 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/Tag.java @@ -63,7 +63,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 8edb189ba004..5fef2c268a54 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -78,7 +78,6 @@ public TypeHolderDefault() { } public TypeHolderDefault stringItem(String stringItem) { - this.stringItem = stringItem; return this; } @@ -92,14 +91,12 @@ public String getStringItem() { return stringItem; } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } public TypeHolderDefault numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; return this; } @@ -113,14 +110,12 @@ public BigDecimal getNumberItem() { return numberItem; } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } public TypeHolderDefault integerItem(Integer integerItem) { - this.integerItem = integerItem; return this; } @@ -134,14 +129,12 @@ public Integer getIntegerItem() { return integerItem; } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } public TypeHolderDefault boolItem(Boolean boolItem) { - this.boolItem = boolItem; return this; } @@ -155,14 +148,12 @@ public Boolean getBoolItem() { return boolItem; } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } public TypeHolderDefault arrayItem(List arrayItem) { - this.arrayItem = arrayItem; return this; } @@ -184,7 +175,6 @@ public List getArrayItem() { return arrayItem; } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderExample.java index d1510fde0e55..9996cdd7a987 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -82,7 +82,6 @@ public TypeHolderExample() { } public TypeHolderExample stringItem(String stringItem) { - this.stringItem = stringItem; return this; } @@ -96,14 +95,12 @@ public String getStringItem() { return stringItem; } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } public TypeHolderExample numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; return this; } @@ -117,14 +114,12 @@ public BigDecimal getNumberItem() { return numberItem; } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } public TypeHolderExample floatItem(Float floatItem) { - this.floatItem = floatItem; return this; } @@ -138,14 +133,12 @@ public Float getFloatItem() { return floatItem; } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } public TypeHolderExample integerItem(Integer integerItem) { - this.integerItem = integerItem; return this; } @@ -159,14 +152,12 @@ public Integer getIntegerItem() { return integerItem; } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } public TypeHolderExample boolItem(Boolean boolItem) { - this.boolItem = boolItem; return this; } @@ -180,14 +171,12 @@ public Boolean getBoolItem() { return boolItem; } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } public TypeHolderExample arrayItem(List arrayItem) { - this.arrayItem = arrayItem; return this; } @@ -209,7 +198,6 @@ public List getArrayItem() { return arrayItem; } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/User.java index 32df1b0dd1b4..fb730ebf22bc 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/User.java @@ -87,7 +87,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -101,14 +100,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -122,14 +119,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -143,14 +138,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -164,14 +157,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -185,14 +176,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -206,14 +195,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -227,14 +214,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -248,7 +233,6 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/XmlItem.java index 94ac9dcc8bab..9c3b7f0ecd1e 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/XmlItem.java @@ -174,7 +174,6 @@ public XmlItem() { } public XmlItem attributeString(String attributeString) { - this.attributeString = attributeString; return this; } @@ -188,14 +187,12 @@ public String getAttributeString() { return attributeString; } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } public XmlItem attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; return this; } @@ -209,14 +206,12 @@ public BigDecimal getAttributeNumber() { return attributeNumber; } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } public XmlItem attributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; return this; } @@ -230,14 +225,12 @@ public Integer getAttributeInteger() { return attributeInteger; } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } public XmlItem attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; return this; } @@ -251,14 +244,12 @@ public Boolean getAttributeBoolean() { return attributeBoolean; } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } public XmlItem wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; return this; } @@ -280,14 +271,12 @@ public List getWrappedArray() { return wrappedArray; } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } public XmlItem nameString(String nameString) { - this.nameString = nameString; return this; } @@ -301,14 +290,12 @@ public String getNameString() { return nameString; } - public void setNameString(String nameString) { this.nameString = nameString; } public XmlItem nameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; return this; } @@ -322,14 +309,12 @@ public BigDecimal getNameNumber() { return nameNumber; } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } public XmlItem nameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; return this; } @@ -343,14 +328,12 @@ public Integer getNameInteger() { return nameInteger; } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } public XmlItem nameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; return this; } @@ -364,14 +347,12 @@ public Boolean getNameBoolean() { return nameBoolean; } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } public XmlItem nameArray(List nameArray) { - this.nameArray = nameArray; return this; } @@ -393,14 +374,12 @@ public List getNameArray() { return nameArray; } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } public XmlItem nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; return this; } @@ -422,14 +401,12 @@ public List getNameWrappedArray() { return nameWrappedArray; } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } public XmlItem prefixString(String prefixString) { - this.prefixString = prefixString; return this; } @@ -443,14 +420,12 @@ public String getPrefixString() { return prefixString; } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } public XmlItem prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; return this; } @@ -464,14 +439,12 @@ public BigDecimal getPrefixNumber() { return prefixNumber; } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } public XmlItem prefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; return this; } @@ -485,14 +458,12 @@ public Integer getPrefixInteger() { return prefixInteger; } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } public XmlItem prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; return this; } @@ -506,14 +477,12 @@ public Boolean getPrefixBoolean() { return prefixBoolean; } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } public XmlItem prefixArray(List prefixArray) { - this.prefixArray = prefixArray; return this; } @@ -535,14 +504,12 @@ public List getPrefixArray() { return prefixArray; } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } public XmlItem prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; return this; } @@ -564,14 +531,12 @@ public List getPrefixWrappedArray() { return prefixWrappedArray; } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } public XmlItem namespaceString(String namespaceString) { - this.namespaceString = namespaceString; return this; } @@ -585,14 +550,12 @@ public String getNamespaceString() { return namespaceString; } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; return this; } @@ -606,14 +569,12 @@ public BigDecimal getNamespaceNumber() { return namespaceNumber; } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } public XmlItem namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; return this; } @@ -627,14 +588,12 @@ public Integer getNamespaceInteger() { return namespaceInteger; } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; return this; } @@ -648,14 +607,12 @@ public Boolean getNamespaceBoolean() { return namespaceBoolean; } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } public XmlItem namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; return this; } @@ -677,14 +634,12 @@ public List getNamespaceArray() { return namespaceArray; } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; return this; } @@ -706,14 +661,12 @@ public List getNamespaceWrappedArray() { return namespaceWrappedArray; } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } public XmlItem prefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; return this; } @@ -727,14 +680,12 @@ public String getPrefixNsString() { return prefixNsString; } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; return this; } @@ -748,14 +699,12 @@ public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } public XmlItem prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; return this; } @@ -769,14 +718,12 @@ public Integer getPrefixNsInteger() { return prefixNsInteger; } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; return this; } @@ -790,14 +737,12 @@ public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } public XmlItem prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; return this; } @@ -819,14 +764,12 @@ public List getPrefixNsArray() { return prefixNsArray; } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; return this; } @@ -848,7 +791,6 @@ public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index b11d62b0718a..d25e81a52783 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java index ec41d25fa99f..f12855dae504 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java @@ -63,7 +63,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java index a1df10aece5f..59645dcffcc2 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -67,7 +67,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -81,14 +80,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -102,14 +99,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -123,7 +118,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java index 8ebfab4c22a4..53a96c763a7c 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java @@ -134,7 +134,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -148,14 +147,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -169,14 +166,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -190,14 +185,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -211,14 +204,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -232,14 +223,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -253,7 +242,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java index 691d44432202..9d0e1e017afa 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java @@ -138,7 +138,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -152,14 +151,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -173,14 +170,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -194,14 +189,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -223,14 +216,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -252,7 +243,6 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } @@ -260,7 +250,6 @@ public void setTags(List tags) { @Deprecated public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -276,7 +265,6 @@ public StatusEnum getStatus() { return status; } - @Deprecated public void setStatus(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java index 262ef93dbbd3..bae59a3dedb3 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java @@ -63,7 +63,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java index 8c1f31e4d16a..157f92c49599 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java @@ -87,7 +87,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -101,14 +100,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -122,14 +119,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -143,14 +138,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -164,14 +157,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -185,14 +176,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -206,14 +195,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -227,14 +214,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -248,7 +233,6 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index b11d62b0718a..d25e81a52783 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Category.java index ec41d25fa99f..f12855dae504 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Category.java @@ -63,7 +63,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/ModelApiResponse.java index a1df10aece5f..59645dcffcc2 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -67,7 +67,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -81,14 +80,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -102,14 +99,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -123,7 +118,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Order.java index 8ebfab4c22a4..53a96c763a7c 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Order.java @@ -134,7 +134,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -148,14 +147,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -169,14 +166,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -190,14 +185,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -211,14 +204,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -232,14 +223,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -253,7 +242,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Pet.java index 691d44432202..9d0e1e017afa 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Pet.java @@ -138,7 +138,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -152,14 +151,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -173,14 +170,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -194,14 +189,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -223,14 +216,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -252,7 +243,6 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } @@ -260,7 +250,6 @@ public void setTags(List tags) { @Deprecated public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -276,7 +265,6 @@ public StatusEnum getStatus() { return status; } - @Deprecated public void setStatus(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases1.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases1.java index d02d925e4ef9..dea91cf710b6 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases1.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases1.java @@ -139,7 +139,6 @@ public PetWithRequiredNullableCases1() { } public PetWithRequiredNullableCases1 id(Long id) { - this.id = id; return this; } @@ -153,14 +152,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public PetWithRequiredNullableCases1 category(Category category) { - this.category = category; return this; } @@ -174,14 +171,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public PetWithRequiredNullableCases1 name(String name) { - this.name = name; return this; } @@ -195,14 +190,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public PetWithRequiredNullableCases1 photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -224,14 +217,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public PetWithRequiredNullableCases1 tags(List tags) { - this.tags = tags; return this; } @@ -253,7 +244,6 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } @@ -261,7 +251,6 @@ public void setTags(List tags) { @Deprecated public PetWithRequiredNullableCases1 status(StatusEnum status) { - this.status = status; return this; } @@ -277,7 +266,6 @@ public StatusEnum getStatus() { return status; } - @Deprecated public void setStatus(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases2.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases2.java index d8bbe12404ff..df70736606c8 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases2.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases2.java @@ -138,7 +138,6 @@ public PetWithRequiredNullableCases2() { } public PetWithRequiredNullableCases2 id(Long id) { - this.id = id; return this; } @@ -152,14 +151,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public PetWithRequiredNullableCases2 category(Category category) { - this.category = category; return this; } @@ -173,14 +170,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public PetWithRequiredNullableCases2 name(String name) { - this.name = name; return this; } @@ -194,14 +189,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public PetWithRequiredNullableCases2 photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -223,14 +216,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public PetWithRequiredNullableCases2 tags(List tags) { - this.tags = tags; return this; } @@ -252,7 +243,6 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } @@ -260,7 +250,6 @@ public void setTags(List tags) { @Deprecated public PetWithRequiredNullableCases2 status(StatusEnum status) { - this.status = status; return this; } @@ -276,7 +265,6 @@ public StatusEnum getStatus() { return status; } - @Deprecated public void setStatus(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Tag.java index 262ef93dbbd3..bae59a3dedb3 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Tag.java @@ -63,7 +63,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/User.java index 8c1f31e4d16a..157f92c49599 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/User.java @@ -87,7 +87,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -101,14 +100,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -122,14 +119,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -143,14 +138,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -164,14 +157,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -185,14 +176,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -206,14 +195,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -227,14 +214,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -248,7 +233,6 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index fbe51042e1a9..f50f7a96cc56 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 869c75fbc82b..fce6c842805d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -61,7 +61,6 @@ public AdditionalPropertiesAnyType() { } public AdditionalPropertiesAnyType name(String name) { - this.name = name; return this; } @@ -75,7 +74,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index a9982955fce7..4200d730130a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -62,7 +62,6 @@ public AdditionalPropertiesArray() { } public AdditionalPropertiesArray name(String name) { - this.name = name; return this; } @@ -76,7 +75,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 37980109cdfe..1927fc3a5ac8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -61,7 +61,6 @@ public AdditionalPropertiesBoolean() { } public AdditionalPropertiesBoolean name(String name) { - this.name = name; return this; } @@ -75,7 +74,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 45ccb799d064..2caca34dfab0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -105,7 +105,6 @@ public AdditionalPropertiesClass() { } public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; return this; } @@ -127,14 +126,12 @@ public Map getMapString() { return mapString; } - public void setMapString(Map mapString) { this.mapString = mapString; } public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; return this; } @@ -156,14 +153,12 @@ public Map getMapNumber() { return mapNumber; } - public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } public AdditionalPropertiesClass mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; return this; } @@ -185,14 +180,12 @@ public Map getMapInteger() { return mapInteger; } - public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; return this; } @@ -214,14 +207,12 @@ public Map getMapBoolean() { return mapBoolean; } - public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; return this; } @@ -243,14 +234,12 @@ public Map> getMapArrayInteger() { return mapArrayInteger; } - public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; return this; } @@ -272,14 +261,12 @@ public Map> getMapArrayAnytype() { return mapArrayAnytype; } - public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; return this; } @@ -301,14 +288,12 @@ public Map> getMapMapString() { return mapMapString; } - public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; return this; } @@ -330,14 +315,12 @@ public Map> getMapMapAnytype() { return mapMapAnytype; } - public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } public AdditionalPropertiesClass anytype1(Object anytype1) { - this.anytype1 = anytype1; return this; } @@ -351,14 +334,12 @@ public Object getAnytype1() { return anytype1; } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = anytype2; return this; } @@ -372,14 +353,12 @@ public Object getAnytype2() { return anytype2; } - public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } public AdditionalPropertiesClass anytype3(Object anytype3) { - this.anytype3 = anytype3; return this; } @@ -393,7 +372,6 @@ public Object getAnytype3() { return anytype3; } - public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 049441a9747e..e897db69fa32 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -61,7 +61,6 @@ public AdditionalPropertiesInteger() { } public AdditionalPropertiesInteger name(String name) { - this.name = name; return this; } @@ -75,7 +74,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index bba08fa29920..ecb9eebe7834 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -62,7 +62,6 @@ public AdditionalPropertiesNumber() { } public AdditionalPropertiesNumber name(String name) { - this.name = name; return this; } @@ -76,7 +75,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index cac4aa9c62eb..2240e88cc7db 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -62,7 +62,6 @@ public AdditionalPropertiesObject() { } public AdditionalPropertiesObject name(String name) { - this.name = name; return this; } @@ -76,7 +75,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index a05ec68e139f..84a3278be2d7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -61,7 +61,6 @@ public AdditionalPropertiesString() { } public AdditionalPropertiesString name(String name) { - this.name = name; return this; } @@ -75,7 +74,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java index 791e9a803c78..5eb6e448bdb8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java @@ -66,7 +66,6 @@ public Animal() { } public Animal className(String className) { - this.className = className; return this; } @@ -80,14 +79,12 @@ public String getClassName() { return className; } - public void setClassName(String className) { this.className = className; } public Animal color(String color) { - this.color = color; return this; } @@ -101,7 +98,6 @@ public String getColor() { return color; } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 189ba1a2f01e..56363a103f5a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -64,7 +64,6 @@ public ArrayOfArrayOfNumberOnly() { } public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; return this; } @@ -86,7 +85,6 @@ public List> getArrayArrayNumber() { return arrayArrayNumber; } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index afd92de01c6f..895c38d5a30b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -64,7 +64,6 @@ public ArrayOfNumberOnly() { } public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; return this; } @@ -86,7 +85,6 @@ public List getArrayNumber() { return arrayNumber; } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java index 3c53a2c1472e..78591ee3f931 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -72,7 +72,6 @@ public ArrayTest() { } public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; return this; } @@ -94,14 +93,12 @@ public List getArrayOfString() { return arrayOfString; } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; return this; } @@ -123,14 +120,12 @@ public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -152,7 +147,6 @@ public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCat.java index 18f2ee6d6bd0..1f55dc021f43 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCat.java @@ -120,7 +120,6 @@ public BigCat() { } public BigCat kind(KindEnum kind) { - this.kind = kind; return this; } @@ -134,7 +133,6 @@ public KindEnum getKind() { return kind; } - public void setKind(KindEnum kind) { this.kind = kind; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java index f1e1f7b26438..1f1ba12c811a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java @@ -81,7 +81,6 @@ public Capitalization() { } public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; return this; } @@ -95,14 +94,12 @@ public String getSmallCamel() { return smallCamel; } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; return this; } @@ -116,14 +113,12 @@ public String getCapitalCamel() { return capitalCamel; } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; return this; } @@ -137,14 +132,12 @@ public String getSmallSnake() { return smallSnake; } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; return this; } @@ -158,14 +151,12 @@ public String getCapitalSnake() { return capitalSnake; } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; return this; } @@ -179,14 +170,12 @@ public String getScAETHFlowPoints() { return scAETHFlowPoints; } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; return this; } @@ -200,7 +189,6 @@ public String getATTNAME() { return ATT_NAME; } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java index 1b5c6626f0f8..e50186056906 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java @@ -64,7 +64,6 @@ public Cat() { } public Cat declawed(Boolean declawed) { - this.declawed = declawed; return this; } @@ -78,7 +77,6 @@ public Boolean getDeclawed() { return declawed; } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java index 17277ecb05b5..c33b5fddc169 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java @@ -65,7 +65,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -79,14 +78,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -100,7 +97,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java index c439f0e47ec7..fdb8f7fde3dd 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java @@ -61,7 +61,6 @@ public ClassModel() { } public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; return this; } @@ -75,7 +74,6 @@ public String getPropertyClass() { return propertyClass; } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java index 111f813645e9..eff9a8e4c6f3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java @@ -61,7 +61,6 @@ public Client() { } public Client client(String client) { - this.client = client; return this; } @@ -75,7 +74,6 @@ public String getClient() { return client; } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java index ffc75f091c97..28e5b7f8d5c7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java @@ -64,7 +64,6 @@ public Dog() { } public Dog breed(String breed) { - this.breed = breed; return this; } @@ -78,7 +77,6 @@ public String getBreed() { return breed; } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java index cfd7a4171fc3..ef44420e0b0d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -171,7 +171,6 @@ public EnumArrays() { } public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; return this; } @@ -185,14 +184,12 @@ public JustSymbolEnum getJustSymbol() { return justSymbol; } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; return this; } @@ -214,7 +211,6 @@ public List getArrayEnum() { return arrayEnum; } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java index f590a466338b..252907697aba 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java @@ -290,7 +290,6 @@ public EnumTest() { } public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; return this; } @@ -304,14 +303,12 @@ public EnumStringEnum getEnumString() { return enumString; } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; return this; } @@ -325,14 +322,12 @@ public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; return this; } @@ -346,14 +341,12 @@ public EnumIntegerEnum getEnumInteger() { return enumInteger; } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; return this; } @@ -367,14 +360,12 @@ public EnumNumberEnum getEnumNumber() { return enumNumber; } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; return this; } @@ -388,7 +379,6 @@ public OuterEnum getOuterEnum() { return outerEnum; } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 83cd0c5647ff..8f9f79761bd0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -68,7 +68,6 @@ public FileSchemaTestClass() { } public FileSchemaTestClass _file(ModelFile _file) { - this._file = _file; return this; } @@ -82,14 +81,12 @@ public ModelFile getFile() { return _file; } - public void setFile(ModelFile _file) { this._file = _file; } public FileSchemaTestClass files(List files) { - this.files = files; return this; } @@ -111,7 +108,6 @@ public List getFiles() { return files; } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java index b5cb842ac4f1..20b4ff70f417 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java @@ -118,7 +118,6 @@ public FormatTest() { } public FormatTest integer(Integer integer) { - this.integer = integer; return this; } @@ -134,14 +133,12 @@ public Integer getInteger() { return integer; } - public void setInteger(Integer integer) { this.integer = integer; } public FormatTest int32(Integer int32) { - this.int32 = int32; return this; } @@ -157,14 +154,12 @@ public Integer getInt32() { return int32; } - public void setInt32(Integer int32) { this.int32 = int32; } public FormatTest int64(Long int64) { - this.int64 = int64; return this; } @@ -178,14 +173,12 @@ public Long getInt64() { return int64; } - public void setInt64(Long int64) { this.int64 = int64; } public FormatTest number(BigDecimal number) { - this.number = number; return this; } @@ -201,14 +194,12 @@ public BigDecimal getNumber() { return number; } - public void setNumber(BigDecimal number) { this.number = number; } public FormatTest _float(Float _float) { - this._float = _float; return this; } @@ -224,14 +215,12 @@ public Float getFloat() { return _float; } - public void setFloat(Float _float) { this._float = _float; } public FormatTest _double(Double _double) { - this._double = _double; return this; } @@ -247,14 +236,12 @@ public Double getDouble() { return _double; } - public void setDouble(Double _double) { this._double = _double; } public FormatTest string(String string) { - this.string = string; return this; } @@ -268,14 +255,12 @@ public String getString() { return string; } - public void setString(String string) { this.string = string; } public FormatTest _byte(byte[] _byte) { - this._byte = _byte; return this; } @@ -289,14 +274,12 @@ public byte[] getByte() { return _byte; } - public void setByte(byte[] _byte) { this._byte = _byte; } public FormatTest binary(File binary) { - this.binary = binary; return this; } @@ -310,14 +293,12 @@ public File getBinary() { return binary; } - public void setBinary(File binary) { this.binary = binary; } public FormatTest date(LocalDate date) { - this.date = date; return this; } @@ -331,14 +312,12 @@ public LocalDate getDate() { return date; } - public void setDate(LocalDate date) { this.date = date; } public FormatTest dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; return this; } @@ -352,14 +331,12 @@ public OffsetDateTime getDateTime() { return dateTime; } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } public FormatTest uuid(UUID uuid) { - this.uuid = uuid; return this; } @@ -373,14 +350,12 @@ public UUID getUuid() { return uuid; } - public void setUuid(UUID uuid) { this.uuid = uuid; } public FormatTest password(String password) { - this.password = password; return this; } @@ -394,14 +369,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; return this; } @@ -415,7 +388,6 @@ public BigDecimal getBigDecimal() { return bigDecimal; } - public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 67c601002152..06525b52074d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -64,7 +64,6 @@ public class HasOnlyReadOnly implements Parcelable { public HasOnlyReadOnly() { } - public HasOnlyReadOnly( String bar, String foo @@ -85,7 +84,6 @@ public String getBar() { - /** * Get foo * @return foo @@ -98,7 +96,6 @@ public String getFoo() { - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java index ecdac8b00a37..5d376530b172 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java @@ -127,7 +127,6 @@ public MapTest() { } public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; return this; } @@ -149,14 +148,12 @@ public Map> getMapMapOfString() { return mapMapOfString; } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; return this; } @@ -178,14 +175,12 @@ public Map getMapOfEnumString() { return mapOfEnumString; } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } public MapTest directMap(Map directMap) { - this.directMap = directMap; return this; } @@ -207,14 +202,12 @@ public Map getDirectMap() { return directMap; } - public void setDirectMap(Map directMap) { this.directMap = directMap; } public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; return this; } @@ -236,7 +229,6 @@ public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index c45274a1b892..67e777bc3950 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -74,7 +74,6 @@ public MixedPropertiesAndAdditionalPropertiesClass() { } public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; return this; } @@ -88,14 +87,12 @@ public UUID getUuid() { return uuid; } - public void setUuid(UUID uuid) { this.uuid = uuid; } public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; return this; } @@ -109,14 +106,12 @@ public OffsetDateTime getDateTime() { return dateTime; } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; return this; } @@ -138,7 +133,6 @@ public Map getMap() { return map; } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java index f5c73cdb43b0..2f8ec36e0ef6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java @@ -65,7 +65,6 @@ public Model200Response() { } public Model200Response name(Integer name) { - this.name = name; return this; } @@ -79,14 +78,12 @@ public Integer getName() { return name; } - public void setName(Integer name) { this.name = name; } public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; return this; } @@ -100,7 +97,6 @@ public String getPropertyClass() { return propertyClass; } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java index a23df3a13c78..5b312ced45ea 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -69,7 +69,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -83,14 +82,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -104,14 +101,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -125,7 +120,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelFile.java index 8f3483020899..adb2b574c44f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelFile.java @@ -61,7 +61,6 @@ public ModelFile() { } public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; return this; } @@ -75,7 +74,6 @@ public String getSourceURI() { return sourceURI; } - public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelList.java index fb26a6e8ce1e..c65bb0b66df5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelList.java @@ -61,7 +61,6 @@ public ModelList() { } public ModelList _123list(String _123list) { - this._123list = _123list; return this; } @@ -75,7 +74,6 @@ public String get123list() { return _123list; } - public void set123list(String _123list) { this._123list = _123list; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java index 556612cdb6d3..787f98a8afa6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -61,7 +61,6 @@ public ModelReturn() { } public ModelReturn _return(Integer _return) { - this._return = _return; return this; } @@ -75,7 +74,6 @@ public Integer getReturn() { return _return; } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java index 7c6922f1fec2..92101c648816 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java @@ -72,7 +72,6 @@ public class Name implements Parcelable { public Name() { } - public Name( Integer snakeCase, Integer _123number @@ -83,7 +82,6 @@ public Name( } public Name name(Integer name) { - this.name = name; return this; } @@ -97,7 +95,6 @@ public Integer getName() { return name; } - public void setName(Integer name) { this.name = name; } @@ -114,9 +111,7 @@ public Integer getSnakeCase() { - public Name property(String property) { - this.property = property; return this; } @@ -130,7 +125,6 @@ public String getProperty() { return property; } - public void setProperty(String property) { this.property = property; } @@ -148,7 +142,6 @@ public Integer get123number() { - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java index 433ccbe9ad78..c9cab3da84b9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -62,7 +62,6 @@ public NumberOnly() { } public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; return this; } @@ -76,7 +75,6 @@ public BigDecimal getJustNumber() { return justNumber; } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java index 95952ffda41f..0934a149f5ae 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java @@ -136,7 +136,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -150,14 +149,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -171,14 +168,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -192,14 +187,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -213,14 +206,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -234,14 +225,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -255,7 +244,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java index 1b91cc66b891..694acc793679 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -70,7 +70,6 @@ public OuterComposite() { } public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; return this; } @@ -84,14 +83,12 @@ public BigDecimal getMyNumber() { return myNumber; } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } public OuterComposite myString(String myString) { - this.myString = myString; return this; } @@ -105,14 +102,12 @@ public String getMyString() { return myString; } - public void setMyString(String myString) { this.myString = myString; } public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; return this; } @@ -126,7 +121,6 @@ public Boolean getMyBoolean() { return myBoolean; } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java index db0704f99bb4..25216412fc82 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java @@ -141,7 +141,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -155,14 +154,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -176,14 +173,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -197,14 +192,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(Set photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -226,14 +219,12 @@ public Set getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -255,14 +246,12 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -276,7 +265,6 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index d6a6dd981d75..7aeb3a73c1d5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -64,7 +64,6 @@ public class ReadOnlyFirst implements Parcelable { public ReadOnlyFirst() { } - public ReadOnlyFirst( String bar ) { @@ -83,9 +82,7 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { - this.baz = baz; return this; } @@ -99,7 +96,6 @@ public String getBaz() { return baz; } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java index 3c2b3320e699..b6c92e881545 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -61,7 +61,6 @@ public SpecialModelName() { } public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; return this; } @@ -75,7 +74,6 @@ public SpecialModelName() { return $specialPropertyName; } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java index 521da9b77d9b..68dbf7e100b3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java @@ -65,7 +65,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -79,14 +78,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -100,7 +97,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java index 6b47b72bd7f5..9c3661530af6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderDefault.java @@ -80,7 +80,6 @@ public TypeHolderDefault() { } public TypeHolderDefault stringItem(String stringItem) { - this.stringItem = stringItem; return this; } @@ -94,14 +93,12 @@ public String getStringItem() { return stringItem; } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } public TypeHolderDefault numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; return this; } @@ -115,14 +112,12 @@ public BigDecimal getNumberItem() { return numberItem; } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } public TypeHolderDefault integerItem(Integer integerItem) { - this.integerItem = integerItem; return this; } @@ -136,14 +131,12 @@ public Integer getIntegerItem() { return integerItem; } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } public TypeHolderDefault boolItem(Boolean boolItem) { - this.boolItem = boolItem; return this; } @@ -157,14 +150,12 @@ public Boolean getBoolItem() { return boolItem; } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } public TypeHolderDefault arrayItem(List arrayItem) { - this.arrayItem = arrayItem; return this; } @@ -186,7 +177,6 @@ public List getArrayItem() { return arrayItem; } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java index eaa770cfffe3..731407590f7c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/TypeHolderExample.java @@ -84,7 +84,6 @@ public TypeHolderExample() { } public TypeHolderExample stringItem(String stringItem) { - this.stringItem = stringItem; return this; } @@ -98,14 +97,12 @@ public String getStringItem() { return stringItem; } - public void setStringItem(String stringItem) { this.stringItem = stringItem; } public TypeHolderExample numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; return this; } @@ -119,14 +116,12 @@ public BigDecimal getNumberItem() { return numberItem; } - public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } public TypeHolderExample floatItem(Float floatItem) { - this.floatItem = floatItem; return this; } @@ -140,14 +135,12 @@ public Float getFloatItem() { return floatItem; } - public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } public TypeHolderExample integerItem(Integer integerItem) { - this.integerItem = integerItem; return this; } @@ -161,14 +154,12 @@ public Integer getIntegerItem() { return integerItem; } - public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } public TypeHolderExample boolItem(Boolean boolItem) { - this.boolItem = boolItem; return this; } @@ -182,14 +173,12 @@ public Boolean getBoolItem() { return boolItem; } - public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } public TypeHolderExample arrayItem(List arrayItem) { - this.arrayItem = arrayItem; return this; } @@ -211,7 +200,6 @@ public List getArrayItem() { return arrayItem; } - public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java index 886bcde68448..6c7a391d3941 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java @@ -89,7 +89,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -103,14 +102,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -124,14 +121,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -145,14 +140,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -166,14 +159,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -187,14 +178,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -208,14 +197,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -229,14 +216,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -250,7 +235,6 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java index f8eca10657be..2681238d0506 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/XmlItem.java @@ -176,7 +176,6 @@ public XmlItem() { } public XmlItem attributeString(String attributeString) { - this.attributeString = attributeString; return this; } @@ -190,14 +189,12 @@ public String getAttributeString() { return attributeString; } - public void setAttributeString(String attributeString) { this.attributeString = attributeString; } public XmlItem attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; return this; } @@ -211,14 +208,12 @@ public BigDecimal getAttributeNumber() { return attributeNumber; } - public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } public XmlItem attributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; return this; } @@ -232,14 +227,12 @@ public Integer getAttributeInteger() { return attributeInteger; } - public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } public XmlItem attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; return this; } @@ -253,14 +246,12 @@ public Boolean getAttributeBoolean() { return attributeBoolean; } - public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } public XmlItem wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; return this; } @@ -282,14 +273,12 @@ public List getWrappedArray() { return wrappedArray; } - public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } public XmlItem nameString(String nameString) { - this.nameString = nameString; return this; } @@ -303,14 +292,12 @@ public String getNameString() { return nameString; } - public void setNameString(String nameString) { this.nameString = nameString; } public XmlItem nameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; return this; } @@ -324,14 +311,12 @@ public BigDecimal getNameNumber() { return nameNumber; } - public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } public XmlItem nameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; return this; } @@ -345,14 +330,12 @@ public Integer getNameInteger() { return nameInteger; } - public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } public XmlItem nameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; return this; } @@ -366,14 +349,12 @@ public Boolean getNameBoolean() { return nameBoolean; } - public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } public XmlItem nameArray(List nameArray) { - this.nameArray = nameArray; return this; } @@ -395,14 +376,12 @@ public List getNameArray() { return nameArray; } - public void setNameArray(List nameArray) { this.nameArray = nameArray; } public XmlItem nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; return this; } @@ -424,14 +403,12 @@ public List getNameWrappedArray() { return nameWrappedArray; } - public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } public XmlItem prefixString(String prefixString) { - this.prefixString = prefixString; return this; } @@ -445,14 +422,12 @@ public String getPrefixString() { return prefixString; } - public void setPrefixString(String prefixString) { this.prefixString = prefixString; } public XmlItem prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; return this; } @@ -466,14 +441,12 @@ public BigDecimal getPrefixNumber() { return prefixNumber; } - public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } public XmlItem prefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; return this; } @@ -487,14 +460,12 @@ public Integer getPrefixInteger() { return prefixInteger; } - public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } public XmlItem prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; return this; } @@ -508,14 +479,12 @@ public Boolean getPrefixBoolean() { return prefixBoolean; } - public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } public XmlItem prefixArray(List prefixArray) { - this.prefixArray = prefixArray; return this; } @@ -537,14 +506,12 @@ public List getPrefixArray() { return prefixArray; } - public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } public XmlItem prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; return this; } @@ -566,14 +533,12 @@ public List getPrefixWrappedArray() { return prefixWrappedArray; } - public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } public XmlItem namespaceString(String namespaceString) { - this.namespaceString = namespaceString; return this; } @@ -587,14 +552,12 @@ public String getNamespaceString() { return namespaceString; } - public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; return this; } @@ -608,14 +571,12 @@ public BigDecimal getNamespaceNumber() { return namespaceNumber; } - public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } public XmlItem namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; return this; } @@ -629,14 +590,12 @@ public Integer getNamespaceInteger() { return namespaceInteger; } - public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; return this; } @@ -650,14 +609,12 @@ public Boolean getNamespaceBoolean() { return namespaceBoolean; } - public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } public XmlItem namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; return this; } @@ -679,14 +636,12 @@ public List getNamespaceArray() { return namespaceArray; } - public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; return this; } @@ -708,14 +663,12 @@ public List getNamespaceWrappedArray() { return namespaceWrappedArray; } - public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } public XmlItem prefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; return this; } @@ -729,14 +682,12 @@ public String getPrefixNsString() { return prefixNsString; } - public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; return this; } @@ -750,14 +701,12 @@ public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } public XmlItem prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; return this; } @@ -771,14 +720,12 @@ public Integer getPrefixNsInteger() { return prefixNsInteger; } - public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; return this; } @@ -792,14 +739,12 @@ public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } public XmlItem prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; return this; } @@ -821,14 +766,12 @@ public List getPrefixNsArray() { return prefixNsArray; } - public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; return this; } @@ -850,7 +793,6 @@ public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index b11d62b0718a..d25e81a52783 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java index 1226e87fd79c..94ef2380da2f 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java @@ -66,7 +66,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -81,14 +80,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -103,7 +100,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index e4545a10b0b2..5e45e9cbb5c6 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -70,7 +70,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -85,14 +84,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -107,14 +104,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -129,7 +124,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java index a21e41e316cf..2f5c92ea24f0 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java @@ -137,7 +137,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -152,14 +151,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -174,14 +171,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -196,14 +191,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -218,14 +211,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -240,14 +231,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -262,7 +251,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java index b9a7248b1b67..4de57ffcf427 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java @@ -141,7 +141,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -156,14 +155,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -178,14 +175,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -200,14 +195,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -230,14 +223,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -260,7 +251,6 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } @@ -268,7 +258,6 @@ public void setTags(List tags) { @Deprecated public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -285,7 +274,6 @@ public StatusEnum getStatus() { return status; } - @Deprecated public void setStatus(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java index 2d4c0bd37409..6344b83163f1 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java @@ -66,7 +66,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -81,14 +80,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -103,7 +100,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java index dc91068c424b..b90cf6a61167 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java @@ -90,7 +90,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -105,14 +104,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -127,14 +124,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -149,14 +144,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -171,14 +164,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -193,14 +184,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -215,14 +204,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -237,14 +224,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -259,7 +244,6 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index b11d62b0718a..d25e81a52783 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Category.java index 30f74d21b8ce..f9db9aa2d845 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Category.java @@ -65,7 +65,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -80,14 +79,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -102,7 +99,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 87f5cb13f42d..2303dd860515 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -69,7 +69,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -84,14 +83,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -106,14 +103,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -128,7 +123,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Order.java index ccea576a1ca4..3ae19717874d 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Order.java @@ -136,7 +136,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -151,14 +150,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -173,14 +170,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -195,14 +190,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -217,14 +210,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -239,14 +230,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -261,7 +250,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Pet.java index a4f2ff9b7933..9ce45418da62 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Pet.java @@ -140,7 +140,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -155,14 +154,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -177,14 +174,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -199,14 +194,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -229,14 +222,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -259,7 +250,6 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } @@ -267,7 +257,6 @@ public void setTags(List tags) { @Deprecated public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -284,7 +273,6 @@ public StatusEnum getStatus() { return status; } - @Deprecated public void setStatus(StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Tag.java index efe5fff33af0..1b9168c583aa 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Tag.java @@ -65,7 +65,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -80,14 +79,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -102,7 +99,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/User.java index 8f9cf858edda..e191ba04322d 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/User.java @@ -89,7 +89,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -104,14 +103,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -126,14 +123,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -148,14 +143,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -170,14 +163,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -192,14 +183,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -214,14 +203,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -236,14 +223,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -258,7 +243,6 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java/okhttp-gson/README.md b/samples/client/petstore/java/okhttp-gson/README.md index 4b2ed954eaf0..5bb2a315d282 100644 --- a/samples/client/petstore/java/okhttp-gson/README.md +++ b/samples/client/petstore/java/okhttp-gson/README.md @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description *AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags *AnotherFakeApi* | [**getParameterArrayNumber**](docs/AnotherFakeApi.md#getParameterArrayNumber) | **GET** /fake/parameter-array-number | parameter array number default value *AnotherFakeApi* | [**getParameterStringNumber**](docs/AnotherFakeApi.md#getParameterStringNumber) | **GET** /fake/parameter-string-number | parameter string number +*AnotherFakeApi* | [**nullRequestBody**](docs/AnotherFakeApi.md#nullRequestBody) | **GET** /fake/null-request-body | null request body *DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | *FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint *FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index 37b2af48ba6b..d8888a185e4c 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -1230,6 +1230,56 @@ paths: tags: - another_fake x-accepts: application/json + /fake/null-request-body: + get: + operationId: null-request-body + parameters: + - explode: false + in: header + name: Accept-Language + required: false + schema: + example: application/json + type: string + style: simple + requestBody: + content: + text/plain: + examples: + Generar Orden por External ID: + value: |- + { + "external_reference": "{{external_order_ref}}", + "notification_url": "www.yourserver.com/yourendpoint", + "sponsor_id": 446566691, + "items": [ + { + "title": "Papas frita", + "currency_id": "{{currency_id}}", + "unit_price": 6000, + "quantity": 1 + }, + { + "title": "Gaseosa", + "currency_id": "{{currency_id}}", + "unit_price": 3000, + "quantity": 1 + } + ]/*, + "taxes": [ + { + "value": 0, + "type": "IVA" + } + ]*/ + } + responses: + "200": + description: "" + summary: null request body + tags: + - another_fake + x-accepts: application/json /values: get: description: "" diff --git a/samples/client/petstore/java/okhttp-gson/docs/AnotherFakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/AnotherFakeApi.md index 6cca209c72b1..d21e29ab0926 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/AnotherFakeApi.md @@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | | [**getParameterArrayNumber**](AnotherFakeApi.md#getParameterArrayNumber) | **GET** /fake/parameter-array-number | parameter array number default value | | [**getParameterStringNumber**](AnotherFakeApi.md#getParameterStringNumber) | **GET** /fake/parameter-string-number | parameter string number | +| [**nullRequestBody**](AnotherFakeApi.md#nullRequestBody) | **GET** /fake/null-request-body | null request body | @@ -189,3 +190,62 @@ No authorization required |-------------|-------------|------------------| | **200** | OK | - | + +# **nullRequestBody** +> nullRequestBody(acceptLanguage) + +null request body + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AnotherFakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + String acceptLanguage = "application/json"; // String | + try { + apiInstance.nullRequestBody(acceptLanguage); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#nullRequestBody"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **acceptLanguage** | **String**| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: text/plain + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | + diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index f7529bc74764..a58d4bf127b5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -438,4 +438,121 @@ public okhttp3.Call getParameterStringNumberAsync(BigDecimal stringNumber, final localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for nullRequestBody + * @param acceptLanguage (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 -
+ */ + public okhttp3.Call nullRequestBodyCall(String acceptLanguage, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fake/null-request-body"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (acceptLanguage != null) { + localVarHeaderParams.put("Accept-Language", localVarApiClient.parameterToString(acceptLanguage)); + } + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "text/plain" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call nullRequestBodyValidateBeforeCall(String acceptLanguage, final ApiCallback _callback) throws ApiException { + return nullRequestBodyCall(acceptLanguage, _callback); + + } + + /** + * null request body + * + * @param acceptLanguage (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 -
+ */ + public void nullRequestBody(String acceptLanguage) throws ApiException { + nullRequestBodyWithHttpInfo(acceptLanguage); + } + + /** + * null request body + * + * @param acceptLanguage (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 -
+ */ + public ApiResponse nullRequestBodyWithHttpInfo(String acceptLanguage) throws ApiException { + okhttp3.Call localVarCall = nullRequestBodyValidateBeforeCall(acceptLanguage, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * null request body (asynchronously) + * + * @param acceptLanguage (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 -
+ */ + public okhttp3.Call nullRequestBodyAsync(String acceptLanguage, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = nullRequestBodyValidateBeforeCall(acceptLanguage, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index fbe51042e1a9..f50f7a96cc56 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -18,8 +18,6 @@ import java.lang.reflect.Type; import java.util.Map; -//import com.fasterxml.jackson.annotation.JsonValue; - /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 18d619235d26..6678d9c6e18b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -90,7 +90,6 @@ public AdditionalPropertiesClass() { } public AdditionalPropertiesClass mapProperty(Map mapProperty) { - this.mapProperty = mapProperty; return this; } @@ -112,14 +111,12 @@ public Map getMapProperty() { return mapProperty; } - public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { - this.mapOfMapProperty = mapOfMapProperty; return this; } @@ -141,14 +138,12 @@ public Map> getMapOfMapProperty() { return mapOfMapProperty; } - public void setMapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; } public AdditionalPropertiesClass anytype1(Object anytype1) { - this.anytype1 = anytype1; return this; } @@ -162,14 +157,12 @@ public Object getAnytype1() { return anytype1; } - public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) { - this.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; return this; } @@ -183,14 +176,12 @@ public Object getMapWithUndeclaredPropertiesAnytype1() { return mapWithUndeclaredPropertiesAnytype1; } - public void setMapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) { this.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; } public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) { - this.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; return this; } @@ -204,14 +195,12 @@ public Object getMapWithUndeclaredPropertiesAnytype2() { return mapWithUndeclaredPropertiesAnytype2; } - public void setMapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) { this.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; } public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype3(Map mapWithUndeclaredPropertiesAnytype3) { - this.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; return this; } @@ -233,14 +222,12 @@ public Map getMapWithUndeclaredPropertiesAnytype3() { return mapWithUndeclaredPropertiesAnytype3; } - public void setMapWithUndeclaredPropertiesAnytype3(Map mapWithUndeclaredPropertiesAnytype3) { this.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; } public AdditionalPropertiesClass emptyMap(Object emptyMap) { - this.emptyMap = emptyMap; return this; } @@ -254,14 +241,12 @@ public Object getEmptyMap() { return emptyMap; } - public void setEmptyMap(Object emptyMap) { this.emptyMap = emptyMap; } public AdditionalPropertiesClass mapWithUndeclaredPropertiesString(Map mapWithUndeclaredPropertiesString) { - this.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; return this; } @@ -283,7 +268,6 @@ public Map getMapWithUndeclaredPropertiesString() { return mapWithUndeclaredPropertiesString; } - public void setMapWithUndeclaredPropertiesString(Map mapWithUndeclaredPropertiesString) { this.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java index fe146635badd..50a98b04ea4f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java @@ -64,7 +64,6 @@ public Animal() { } public Animal className(String className) { - this.className = className; return this; } @@ -78,14 +77,12 @@ public String getClassName() { return className; } - public void setClassName(String className) { this.className = className; } public Animal color(String color) { - this.color = color; return this; } @@ -99,7 +96,6 @@ public String getColor() { return color; } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java index f927e212aff7..0432813c2255 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java @@ -63,7 +63,6 @@ public Apple() { } public Apple cultivar(String cultivar) { - this.cultivar = cultivar; return this; } @@ -77,14 +76,12 @@ public String getCultivar() { return cultivar; } - public void setCultivar(String cultivar) { this.cultivar = cultivar; } public Apple origin(String origin) { - this.origin = origin; return this; } @@ -98,7 +95,6 @@ public String getOrigin() { return origin; } - public void setOrigin(String origin) { this.origin = origin; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AppleReq.java index b4c5a403ee3a..69d000adc280 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AppleReq.java @@ -63,7 +63,6 @@ public AppleReq() { } public AppleReq cultivar(String cultivar) { - this.cultivar = cultivar; return this; } @@ -77,14 +76,12 @@ public String getCultivar() { return cultivar; } - public void setCultivar(String cultivar) { this.cultivar = cultivar; } public AppleReq mealy(Boolean mealy) { - this.mealy = mealy; return this; } @@ -98,7 +95,6 @@ public Boolean getMealy() { return mealy; } - public void setMealy(Boolean mealy) { this.mealy = mealy; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayDefault.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayDefault.java index c4a841f46e26..44fffcda53da 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayDefault.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayDefault.java @@ -65,7 +65,6 @@ public ArrayDefault() { } public ArrayDefault withDefaultEmptyBracket(List withDefaultEmptyBracket) { - this.withDefaultEmptyBracket = withDefaultEmptyBracket; return this; } @@ -87,14 +86,12 @@ public List getWithDefaultEmptyBracket() { return withDefaultEmptyBracket; } - public void setWithDefaultEmptyBracket(List withDefaultEmptyBracket) { this.withDefaultEmptyBracket = withDefaultEmptyBracket; } public ArrayDefault withoutDefault(List withoutDefault) { - this.withoutDefault = withoutDefault; return this; } @@ -116,7 +113,6 @@ public List getWithoutDefault() { return withoutDefault; } - public void setWithoutDefault(List withoutDefault) { this.withoutDefault = withoutDefault; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 05504ec70ef7..6a53ba98352e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -62,7 +62,6 @@ public ArrayOfArrayOfNumberOnly() { } public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; return this; } @@ -84,7 +83,6 @@ public List> getArrayArrayNumber() { return arrayArrayNumber; } - public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java index 5885b0849545..085b1fdcd91f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java @@ -70,7 +70,6 @@ public ArrayOfInlineAllOf() { } public ArrayOfInlineAllOf id(Long id) { - this.id = id; return this; } @@ -84,14 +83,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public ArrayOfInlineAllOf name(String name) { - this.name = name; return this; } @@ -105,14 +102,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public ArrayOfInlineAllOf arrayAllofDogProperty(List arrayAllofDogProperty) { - this.arrayAllofDogProperty = arrayAllofDogProperty; return this; } @@ -134,7 +129,6 @@ public List getArrayAllofDogProper return arrayAllofDogProperty; } - public void setArrayAllofDogProperty(List arrayAllofDogProperty) { this.arrayAllofDogProperty = arrayAllofDogProperty; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java index 5442ca84a4cd..41c5a5b8c13c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java @@ -63,7 +63,6 @@ public ArrayOfInlineAllOfArrayAllofDogPropertyInner() { } public ArrayOfInlineAllOfArrayAllofDogPropertyInner breed(String breed) { - this.breed = breed; return this; } @@ -77,14 +76,12 @@ public String getBreed() { return breed; } - public void setBreed(String breed) { this.breed = breed; } public ArrayOfInlineAllOfArrayAllofDogPropertyInner color(String color) { - this.color = color; return this; } @@ -98,7 +95,6 @@ public String getColor() { return color; } - public void setColor(String color) { this.color = color; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 5e08583d21ce..49a39cbdd116 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -62,7 +62,6 @@ public ArrayOfNumberOnly() { } public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; return this; } @@ -84,7 +83,6 @@ public List getArrayNumber() { return arrayNumber; } - public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java index b5b1bfba4c33..d746708c37c8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -70,7 +70,6 @@ public ArrayTest() { } public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; return this; } @@ -92,14 +91,12 @@ public List getArrayOfString() { return arrayOfString; } - public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; return this; } @@ -121,14 +118,12 @@ public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; return this; } @@ -150,7 +145,6 @@ public List> getArrayArrayOfModel() { return arrayArrayOfModel; } - public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java index e90b61781d96..2a0476998e21 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java @@ -60,7 +60,6 @@ public Banana() { } public Banana lengthCm(BigDecimal lengthCm) { - this.lengthCm = lengthCm; return this; } @@ -74,7 +73,6 @@ public BigDecimal getLengthCm() { return lengthCm; } - public void setLengthCm(BigDecimal lengthCm) { this.lengthCm = lengthCm; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BananaReq.java index 79d05b18dfc0..cb83cfd347ce 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BananaReq.java @@ -64,7 +64,6 @@ public BananaReq() { } public BananaReq lengthCm(BigDecimal lengthCm) { - this.lengthCm = lengthCm; return this; } @@ -78,14 +77,12 @@ public BigDecimal getLengthCm() { return lengthCm; } - public void setLengthCm(BigDecimal lengthCm) { this.lengthCm = lengthCm; } public BananaReq sweet(Boolean sweet) { - this.sweet = sweet; return this; } @@ -99,7 +96,6 @@ public Boolean getSweet() { return sweet; } - public void setSweet(Boolean sweet) { this.sweet = sweet; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java index 90b851a6a599..ee1ea4993a85 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java @@ -59,7 +59,6 @@ public BasquePig() { } public BasquePig className(String className) { - this.className = className; return this; } @@ -73,7 +72,6 @@ public String getClassName() { return className; } - public void setClassName(String className) { this.className = className; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java index aab6db17dfe5..0017449f46e6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -79,7 +79,6 @@ public Capitalization() { } public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; return this; } @@ -93,14 +92,12 @@ public String getSmallCamel() { return smallCamel; } - public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; return this; } @@ -114,14 +111,12 @@ public String getCapitalCamel() { return capitalCamel; } - public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; return this; } @@ -135,14 +130,12 @@ public String getSmallSnake() { return smallSnake; } - public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; return this; } @@ -156,14 +149,12 @@ public String getCapitalSnake() { return capitalSnake; } - public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; return this; } @@ -177,14 +168,12 @@ public String getScAETHFlowPoints() { return scAETHFlowPoints; } - public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; return this; } @@ -198,7 +187,6 @@ public String getATTNAME() { return ATT_NAME; } - public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java index 24326e6a2747..591a096f5ccb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java @@ -61,7 +61,6 @@ public Cat() { } public Cat declawed(Boolean declawed) { - this.declawed = declawed; return this; } @@ -75,7 +74,6 @@ public Boolean getDeclawed() { return declawed; } - public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java index 1f80bb7764e3..23059e9bc757 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java @@ -63,7 +63,6 @@ public Category() { } public Category id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Category name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java index bc568aa2a729..0f0b135f6512 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java @@ -59,7 +59,6 @@ public ClassModel() { } public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; return this; } @@ -73,7 +72,6 @@ public String getPropertyClass() { return propertyClass; } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java index d2c16bb78834..6bdfb17d0a39 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java @@ -59,7 +59,6 @@ public Client() { } public Client client(String client) { - this.client = client; return this; } @@ -73,7 +72,6 @@ public String getClient() { return client; } - public void setClient(String client) { this.client = client; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index 7167f835a7e7..0fcf924bcd93 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -63,7 +63,6 @@ public ComplexQuadrilateral() { } public ComplexQuadrilateral shapeType(String shapeType) { - this.shapeType = shapeType; return this; } @@ -77,14 +76,12 @@ public String getShapeType() { return shapeType; } - public void setShapeType(String shapeType) { this.shapeType = shapeType; } public ComplexQuadrilateral quadrilateralType(String quadrilateralType) { - this.quadrilateralType = quadrilateralType; return this; } @@ -98,7 +95,6 @@ public String getQuadrilateralType() { return quadrilateralType; } - public void setQuadrilateralType(String quadrilateralType) { this.quadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java index c7d32495f310..4812f05c662d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java @@ -59,7 +59,6 @@ public DanishPig() { } public DanishPig className(String className) { - this.className = className; return this; } @@ -73,7 +72,6 @@ public String getClassName() { return className; } - public void setClassName(String className) { this.className = className; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java index e254d15c350d..680f7492fa6c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -61,7 +61,6 @@ public DeprecatedObject() { } public DeprecatedObject name(String name) { - this.name = name; return this; } @@ -75,7 +74,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java index bcc8b6c1a547..841f7995038f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java @@ -61,7 +61,6 @@ public Dog() { } public Dog breed(String breed) { - this.breed = breed; return this; } @@ -75,7 +74,6 @@ public String getBreed() { return breed; } - public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java index 5576a241d42c..6e24bac2f69b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java @@ -78,7 +78,6 @@ public Drawing() { } public Drawing mainShape(Shape mainShape) { - this.mainShape = mainShape; return this; } @@ -92,14 +91,12 @@ public Shape getMainShape() { return mainShape; } - public void setMainShape(Shape mainShape) { this.mainShape = mainShape; } public Drawing shapeOrNull(ShapeOrNull shapeOrNull) { - this.shapeOrNull = shapeOrNull; return this; } @@ -113,14 +110,12 @@ public ShapeOrNull getShapeOrNull() { return shapeOrNull; } - public void setShapeOrNull(ShapeOrNull shapeOrNull) { this.shapeOrNull = shapeOrNull; } public Drawing nullableShape(NullableShape nullableShape) { - this.nullableShape = nullableShape; return this; } @@ -134,14 +129,12 @@ public NullableShape getNullableShape() { return nullableShape; } - public void setNullableShape(NullableShape nullableShape) { this.nullableShape = nullableShape; } public Drawing shapes(List shapes) { - this.shapes = shapes; return this; } @@ -163,7 +156,6 @@ public List getShapes() { return shapes; } - public void setShapes(List shapes) { this.shapes = shapes; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java index 3ba3e0c3e423..9f770ae1df02 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -169,7 +169,6 @@ public EnumArrays() { } public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; return this; } @@ -183,14 +182,12 @@ public JustSymbolEnum getJustSymbol() { return justSymbol; } - public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; return this; } @@ -212,7 +209,6 @@ public List getArrayEnum() { return arrayEnum; } - public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java index 48d26fda964a..a0b0f90ba7c0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java @@ -111,7 +111,6 @@ public EnumStringDiscriminator() { } public EnumStringDiscriminator enumStrType(EnumStrTypeEnum enumStrType) { - this.enumStrType = enumStrType; return this; } @@ -125,7 +124,6 @@ public EnumStrTypeEnum getEnumStrType() { return enumStrType; } - public void setEnumStrType(EnumStrTypeEnum enumStrType) { this.enumStrType = enumStrType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java index f0d68e57232e..2a2513d4f872 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -360,7 +360,6 @@ public EnumTest() { } public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; return this; } @@ -374,14 +373,12 @@ public EnumStringEnum getEnumString() { return enumString; } - public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; return this; } @@ -395,14 +392,12 @@ public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; return this; } @@ -416,14 +411,12 @@ public EnumIntegerEnum getEnumInteger() { return enumInteger; } - public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } public EnumTest enumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) { - this.enumIntegerOnly = enumIntegerOnly; return this; } @@ -437,14 +430,12 @@ public EnumIntegerOnlyEnum getEnumIntegerOnly() { return enumIntegerOnly; } - public void setEnumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) { this.enumIntegerOnly = enumIntegerOnly; } public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; return this; } @@ -458,14 +449,12 @@ public EnumNumberEnum getEnumNumber() { return enumNumber; } - public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; return this; } @@ -479,14 +468,12 @@ public OuterEnum getOuterEnum() { return outerEnum; } - public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { - this.outerEnumInteger = outerEnumInteger; return this; } @@ -500,14 +487,12 @@ public OuterEnumInteger getOuterEnumInteger() { return outerEnumInteger; } - public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { this.outerEnumInteger = outerEnumInteger; } public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { - this.outerEnumDefaultValue = outerEnumDefaultValue; return this; } @@ -521,14 +506,12 @@ public OuterEnumDefaultValue getOuterEnumDefaultValue() { return outerEnumDefaultValue; } - public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.outerEnumDefaultValue = outerEnumDefaultValue; } public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { - this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; return this; } @@ -542,7 +525,6 @@ public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { return outerEnumIntegerDefaultValue; } - public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 4cdc86a22521..e08e3b59bba1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -63,7 +63,6 @@ public EquilateralTriangle() { } public EquilateralTriangle shapeType(String shapeType) { - this.shapeType = shapeType; return this; } @@ -77,14 +76,12 @@ public String getShapeType() { return shapeType; } - public void setShapeType(String shapeType) { this.shapeType = shapeType; } public EquilateralTriangle triangleType(String triangleType) { - this.triangleType = triangleType; return this; } @@ -98,7 +95,6 @@ public String getTriangleType() { return triangleType; } - public void setTriangleType(String triangleType) { this.triangleType = triangleType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index dba7bf93f77a..20d67d3dea3b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -66,7 +66,6 @@ public FileSchemaTestClass() { } public FileSchemaTestClass _file(ModelFile _file) { - this._file = _file; return this; } @@ -80,14 +79,12 @@ public ModelFile getFile() { return _file; } - public void setFile(ModelFile _file) { this._file = _file; } public FileSchemaTestClass files(List files) { - this.files = files; return this; } @@ -109,7 +106,6 @@ public List getFiles() { return files; } - public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java index a44b4b64332f..c4a791e06251 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java @@ -59,7 +59,6 @@ public Foo() { } public Foo bar(String bar) { - this.bar = bar; return this; } @@ -73,7 +72,6 @@ public String getBar() { return bar; } - public void setBar(String bar) { this.bar = bar; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index 3184c14874df..60491b9857dc 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -60,7 +60,6 @@ public FooGetDefaultResponse() { } public FooGetDefaultResponse string(Foo string) { - this.string = string; return this; } @@ -74,7 +73,6 @@ public Foo getString() { return string; } - public void setString(Foo string) { this.string = string; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java index b1bb0c85acb0..ac5bac325c7a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -128,7 +128,6 @@ public FormatTest() { } public FormatTest integer(Integer integer) { - this.integer = integer; return this; } @@ -144,14 +143,12 @@ public Integer getInteger() { return integer; } - public void setInteger(Integer integer) { this.integer = integer; } public FormatTest int32(Integer int32) { - this.int32 = int32; return this; } @@ -167,14 +164,12 @@ public Integer getInt32() { return int32; } - public void setInt32(Integer int32) { this.int32 = int32; } public FormatTest int64(Long int64) { - this.int64 = int64; return this; } @@ -188,14 +183,12 @@ public Long getInt64() { return int64; } - public void setInt64(Long int64) { this.int64 = int64; } public FormatTest number(BigDecimal number) { - this.number = number; return this; } @@ -211,14 +204,12 @@ public BigDecimal getNumber() { return number; } - public void setNumber(BigDecimal number) { this.number = number; } public FormatTest _float(Float _float) { - this._float = _float; return this; } @@ -234,14 +225,12 @@ public Float getFloat() { return _float; } - public void setFloat(Float _float) { this._float = _float; } public FormatTest _double(Double _double) { - this._double = _double; return this; } @@ -257,14 +246,12 @@ public Double getDouble() { return _double; } - public void setDouble(Double _double) { this._double = _double; } public FormatTest decimal(BigDecimal decimal) { - this.decimal = decimal; return this; } @@ -278,14 +265,12 @@ public BigDecimal getDecimal() { return decimal; } - public void setDecimal(BigDecimal decimal) { this.decimal = decimal; } public FormatTest string(String string) { - this.string = string; return this; } @@ -299,14 +284,12 @@ public String getString() { return string; } - public void setString(String string) { this.string = string; } public FormatTest _byte(byte[] _byte) { - this._byte = _byte; return this; } @@ -320,14 +303,12 @@ public byte[] getByte() { return _byte; } - public void setByte(byte[] _byte) { this._byte = _byte; } public FormatTest binary(File binary) { - this.binary = binary; return this; } @@ -341,14 +322,12 @@ public File getBinary() { return binary; } - public void setBinary(File binary) { this.binary = binary; } public FormatTest date(LocalDate date) { - this.date = date; return this; } @@ -362,14 +341,12 @@ public LocalDate getDate() { return date; } - public void setDate(LocalDate date) { this.date = date; } public FormatTest dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; return this; } @@ -383,14 +360,12 @@ public OffsetDateTime getDateTime() { return dateTime; } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } public FormatTest uuid(UUID uuid) { - this.uuid = uuid; return this; } @@ -404,14 +379,12 @@ public UUID getUuid() { return uuid; } - public void setUuid(UUID uuid) { this.uuid = uuid; } public FormatTest uuidWithDefault(UUID uuidWithDefault) { - this.uuidWithDefault = uuidWithDefault; return this; } @@ -425,14 +398,12 @@ public UUID getUuidWithDefault() { return uuidWithDefault; } - public void setUuidWithDefault(UUID uuidWithDefault) { this.uuidWithDefault = uuidWithDefault; } public FormatTest password(String password) { - this.password = password; return this; } @@ -446,14 +417,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public FormatTest patternWithDigits(String patternWithDigits) { - this.patternWithDigits = patternWithDigits; return this; } @@ -467,14 +436,12 @@ public String getPatternWithDigits() { return patternWithDigits; } - public void setPatternWithDigits(String patternWithDigits) { this.patternWithDigits = patternWithDigits; } public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { - this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; return this; } @@ -488,7 +455,6 @@ public String getPatternWithDigitsAndDelimiter() { return patternWithDigitsAndDelimiter; } - public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index d3bd545e3238..db7ac8c957d8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -60,7 +60,6 @@ public GrandparentAnimal() { } public GrandparentAnimal petType(String petType) { - this.petType = petType; return this; } @@ -74,7 +73,6 @@ public String getPetType() { return petType; } - public void setPetType(String petType) { this.petType = petType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index ca13d52c777c..0e0a97837e43 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -62,7 +62,6 @@ public class HasOnlyReadOnly { public HasOnlyReadOnly() { } - public HasOnlyReadOnly( String bar, String foo @@ -83,7 +82,6 @@ public String getBar() { - /** * Get foo * @return foo @@ -94,7 +92,6 @@ public String getFoo() { } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 5ed30eef075f..334f7d0d514e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -60,7 +60,6 @@ public HealthCheckResult() { } public HealthCheckResult nullableMessage(String nullableMessage) { - this.nullableMessage = nullableMessage; return this; } @@ -74,7 +73,6 @@ public String getNullableMessage() { return nullableMessage; } - public void setNullableMessage(String nullableMessage) { this.nullableMessage = nullableMessage; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index 0a94cb568363..853a361ce94e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -63,7 +63,6 @@ public IsoscelesTriangle() { } public IsoscelesTriangle shapeType(String shapeType) { - this.shapeType = shapeType; return this; } @@ -77,14 +76,12 @@ public String getShapeType() { return shapeType; } - public void setShapeType(String shapeType) { this.shapeType = shapeType; } public IsoscelesTriangle triangleType(String triangleType) { - this.triangleType = triangleType; return this; } @@ -98,7 +95,6 @@ public String getTriangleType() { return triangleType; } - public void setTriangleType(String triangleType) { this.triangleType = triangleType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java index b404a1f1b7c1..7152aa83fd9b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java @@ -125,7 +125,6 @@ public MapTest() { } public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; return this; } @@ -147,14 +146,12 @@ public Map> getMapMapOfString() { return mapMapOfString; } - public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; return this; } @@ -176,14 +173,12 @@ public Map getMapOfEnumString() { return mapOfEnumString; } - public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } public MapTest directMap(Map directMap) { - this.directMap = directMap; return this; } @@ -205,14 +200,12 @@ public Map getDirectMap() { return directMap; } - public void setDirectMap(Map directMap) { this.directMap = directMap; } public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; return this; } @@ -234,7 +227,6 @@ public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index ae108748e626..d22ff1a8b393 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -72,7 +72,6 @@ public MixedPropertiesAndAdditionalPropertiesClass() { } public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; return this; } @@ -86,14 +85,12 @@ public UUID getUuid() { return uuid; } - public void setUuid(UUID uuid) { this.uuid = uuid; } public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; return this; } @@ -107,14 +104,12 @@ public OffsetDateTime getDateTime() { return dateTime; } - public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; return this; } @@ -136,7 +131,6 @@ public Map getMap() { return map; } - public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java index 5d0c4924d52b..9dc547f27358 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -63,7 +63,6 @@ public Model200Response() { } public Model200Response name(Integer name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public Integer getName() { return name; } - public void setName(Integer name) { this.name = name; } public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; return this; } @@ -98,7 +95,6 @@ public String getPropertyClass() { return propertyClass; } - public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 84e8fd55e302..44737026be2b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -67,7 +67,6 @@ public ModelApiResponse() { } public ModelApiResponse code(Integer code) { - this.code = code; return this; } @@ -81,14 +80,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public ModelApiResponse type(String type) { - this.type = type; return this; } @@ -102,14 +99,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public ModelApiResponse message(String message) { - this.message = message; return this; } @@ -123,7 +118,6 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java index b89e35bc9705..cf66685d0666 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java @@ -59,7 +59,6 @@ public ModelFile() { } public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; return this; } @@ -73,7 +72,6 @@ public String getSourceURI() { return sourceURI; } - public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java index 0f63d447a16d..6990be88242c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java @@ -59,7 +59,6 @@ public ModelList() { } public ModelList _123list(String _123list) { - this._123list = _123list; return this; } @@ -73,7 +72,6 @@ public String get123list() { return _123list; } - public void set123list(String _123list) { this._123list = _123list; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java index 406fc1c36066..e0e70a486093 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -59,7 +59,6 @@ public ModelReturn() { } public ModelReturn _return(Integer _return) { - this._return = _return; return this; } @@ -73,7 +72,6 @@ public Integer getReturn() { return _return; } - public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java index ae591dba4061..c267a8eaad95 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java @@ -70,7 +70,6 @@ public class Name { public Name() { } - public Name( Integer snakeCase, Integer _123number @@ -81,7 +80,6 @@ public Name( } public Name name(Integer name) { - this.name = name; return this; } @@ -95,7 +93,6 @@ public Integer getName() { return name; } - public void setName(Integer name) { this.name = name; } @@ -112,9 +109,7 @@ public Integer getSnakeCase() { - public Name property(String property) { - this.property = property; return this; } @@ -128,7 +123,6 @@ public String getProperty() { return property; } - public void setProperty(String property) { this.property = property; } @@ -144,7 +138,6 @@ public Integer get123number() { } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPet.java index f5300eb6d167..4db1b70c4c9a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPet.java @@ -142,7 +142,6 @@ public NewPet() { } public NewPet id(Long id) { - this.id = id; return this; } @@ -156,14 +155,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public NewPet categoryInlineAllof(NewPetCategoryInlineAllof categoryInlineAllof) { - this.categoryInlineAllof = categoryInlineAllof; return this; } @@ -177,14 +174,12 @@ public NewPetCategoryInlineAllof getCategoryInlineAllof() { return categoryInlineAllof; } - public void setCategoryInlineAllof(NewPetCategoryInlineAllof categoryInlineAllof) { this.categoryInlineAllof = categoryInlineAllof; } public NewPet categoryAllOfRef(Category categoryAllOfRef) { - this.categoryAllOfRef = categoryAllOfRef; return this; } @@ -198,14 +193,12 @@ public Category getCategoryAllOfRef() { return categoryAllOfRef; } - public void setCategoryAllOfRef(Category categoryAllOfRef) { this.categoryAllOfRef = categoryAllOfRef; } public NewPet name(String name) { - this.name = name; return this; } @@ -219,14 +212,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public NewPet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -248,14 +239,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public NewPet tags(List tags) { - this.tags = tags; return this; } @@ -277,14 +266,12 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } public NewPet status(StatusEnum status) { - this.status = status; return this; } @@ -298,7 +285,6 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllof.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllof.java index a30bddad6039..0a1d6e357757 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllof.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllof.java @@ -68,7 +68,6 @@ public NewPetCategoryInlineAllof() { } public NewPetCategoryInlineAllof id(Long id) { - this.id = id; return this; } @@ -82,14 +81,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public NewPetCategoryInlineAllof name(String name) { - this.name = name; return this; } @@ -103,14 +100,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public NewPetCategoryInlineAllof categoryTag(NewPetCategoryInlineAllofAllOfCategoryTag categoryTag) { - this.categoryTag = categoryTag; return this; } @@ -124,7 +119,6 @@ public NewPetCategoryInlineAllofAllOfCategoryTag getCategoryTag() { return categoryTag; } - public void setCategoryTag(NewPetCategoryInlineAllofAllOfCategoryTag categoryTag) { this.categoryTag = categoryTag; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllofAllOfCategoryTag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllofAllOfCategoryTag.java index 035d0bb636ad..24827720cbf2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllofAllOfCategoryTag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllofAllOfCategoryTag.java @@ -63,7 +63,6 @@ public NewPetCategoryInlineAllofAllOfCategoryTag() { } public NewPetCategoryInlineAllofAllOfCategoryTag id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public NewPetCategoryInlineAllofAllOfCategoryTag name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java index 7cb3b91cf451..2f14f3b93daf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java @@ -111,7 +111,6 @@ public NullableClass() { } public NullableClass integerProp(Integer integerProp) { - this.integerProp = integerProp; return this; } @@ -125,14 +124,12 @@ public Integer getIntegerProp() { return integerProp; } - public void setIntegerProp(Integer integerProp) { this.integerProp = integerProp; } public NullableClass numberProp(BigDecimal numberProp) { - this.numberProp = numberProp; return this; } @@ -146,14 +143,12 @@ public BigDecimal getNumberProp() { return numberProp; } - public void setNumberProp(BigDecimal numberProp) { this.numberProp = numberProp; } public NullableClass booleanProp(Boolean booleanProp) { - this.booleanProp = booleanProp; return this; } @@ -167,14 +162,12 @@ public Boolean getBooleanProp() { return booleanProp; } - public void setBooleanProp(Boolean booleanProp) { this.booleanProp = booleanProp; } public NullableClass stringProp(String stringProp) { - this.stringProp = stringProp; return this; } @@ -188,14 +181,12 @@ public String getStringProp() { return stringProp; } - public void setStringProp(String stringProp) { this.stringProp = stringProp; } public NullableClass dateProp(LocalDate dateProp) { - this.dateProp = dateProp; return this; } @@ -209,14 +200,12 @@ public LocalDate getDateProp() { return dateProp; } - public void setDateProp(LocalDate dateProp) { this.dateProp = dateProp; } public NullableClass datetimeProp(OffsetDateTime datetimeProp) { - this.datetimeProp = datetimeProp; return this; } @@ -230,14 +219,12 @@ public OffsetDateTime getDatetimeProp() { return datetimeProp; } - public void setDatetimeProp(OffsetDateTime datetimeProp) { this.datetimeProp = datetimeProp; } public NullableClass arrayNullableProp(List arrayNullableProp) { - this.arrayNullableProp = arrayNullableProp; return this; } @@ -259,14 +246,12 @@ public List getArrayNullableProp() { return arrayNullableProp; } - public void setArrayNullableProp(List arrayNullableProp) { this.arrayNullableProp = arrayNullableProp; } public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { - this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; return this; } @@ -288,14 +273,12 @@ public List getArrayAndItemsNullableProp() { return arrayAndItemsNullableProp; } - public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; } public NullableClass arrayItemsNullable(List arrayItemsNullable) { - this.arrayItemsNullable = arrayItemsNullable; return this; } @@ -317,14 +300,12 @@ public List getArrayItemsNullable() { return arrayItemsNullable; } - public void setArrayItemsNullable(List arrayItemsNullable) { this.arrayItemsNullable = arrayItemsNullable; } public NullableClass objectNullableProp(Map objectNullableProp) { - this.objectNullableProp = objectNullableProp; return this; } @@ -346,14 +327,12 @@ public Map getObjectNullableProp() { return objectNullableProp; } - public void setObjectNullableProp(Map objectNullableProp) { this.objectNullableProp = objectNullableProp; } public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = objectAndItemsNullableProp; return this; } @@ -375,14 +354,12 @@ public Map getObjectAndItemsNullableProp() { return objectAndItemsNullableProp; } - public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.objectAndItemsNullableProp = objectAndItemsNullableProp; } public NullableClass objectItemsNullable(Map objectItemsNullable) { - this.objectItemsNullable = objectItemsNullable; return this; } @@ -404,7 +381,6 @@ public Map getObjectItemsNullable() { return objectItemsNullable; } - public void setObjectItemsNullable(Map objectItemsNullable) { this.objectItemsNullable = objectItemsNullable; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java index 210bdef5598d..923c2f1739dd 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -60,7 +60,6 @@ public NumberOnly() { } public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; return this; } @@ -74,7 +73,6 @@ public BigDecimal getJustNumber() { return justNumber; } - public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 5e6850019948..f6f5c81f38b9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -78,7 +78,6 @@ public ObjectWithDeprecatedFields() { } public ObjectWithDeprecatedFields uuid(String uuid) { - this.uuid = uuid; return this; } @@ -92,7 +91,6 @@ public String getUuid() { return uuid; } - public void setUuid(String uuid) { this.uuid = uuid; } @@ -100,7 +98,6 @@ public void setUuid(String uuid) { @Deprecated public ObjectWithDeprecatedFields id(BigDecimal id) { - this.id = id; return this; } @@ -116,7 +113,6 @@ public BigDecimal getId() { return id; } - @Deprecated public void setId(BigDecimal id) { this.id = id; @@ -125,7 +121,6 @@ public void setId(BigDecimal id) { @Deprecated public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { - this.deprecatedRef = deprecatedRef; return this; } @@ -141,7 +136,6 @@ public DeprecatedObject getDeprecatedRef() { return deprecatedRef; } - @Deprecated public void setDeprecatedRef(DeprecatedObject deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -150,7 +144,6 @@ public void setDeprecatedRef(DeprecatedObject deprecatedRef) { @Deprecated public ObjectWithDeprecatedFields bars(List bars) { - this.bars = bars; return this; } @@ -174,7 +167,6 @@ public List getBars() { return bars; } - @Deprecated public void setBars(List bars) { this.bars = bars; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java index 443cd66cc9e8..12d497ecc005 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java @@ -134,7 +134,6 @@ public Order() { } public Order id(Long id) { - this.id = id; return this; } @@ -148,14 +147,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Order petId(Long petId) { - this.petId = petId; return this; } @@ -169,14 +166,12 @@ public Long getPetId() { return petId; } - public void setPetId(Long petId) { this.petId = petId; } public Order quantity(Integer quantity) { - this.quantity = quantity; return this; } @@ -190,14 +185,12 @@ public Integer getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { this.quantity = quantity; } public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; return this; } @@ -211,14 +204,12 @@ public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } public Order status(StatusEnum status) { - this.status = status; return this; } @@ -232,14 +223,12 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } public Order complete(Boolean complete) { - this.complete = complete; return this; } @@ -253,7 +242,6 @@ public Boolean getComplete() { return complete; } - public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java index ab21ff720a17..220c40e5c7d4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -68,7 +68,6 @@ public OuterComposite() { } public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; return this; } @@ -82,14 +81,12 @@ public BigDecimal getMyNumber() { return myNumber; } - public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } public OuterComposite myString(String myString) { - this.myString = myString; return this; } @@ -103,14 +100,12 @@ public String getMyString() { return myString; } - public void setMyString(String myString) { this.myString = myString; } public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; return this; } @@ -124,7 +119,6 @@ public Boolean getMyBoolean() { return myBoolean; } - public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java index 9abee8b2a9cb..90e7f9ef2b31 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java @@ -137,7 +137,6 @@ public Pet() { } public Pet id(Long id) { - this.id = id; return this; } @@ -151,14 +150,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Pet category(Category category) { - this.category = category; return this; } @@ -172,14 +169,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public Pet name(String name) { - this.name = name; return this; } @@ -193,14 +188,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -222,14 +215,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet tags(List tags) { - this.tags = tags; return this; } @@ -251,14 +242,12 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } public Pet status(StatusEnum status) { - this.status = status; return this; } @@ -272,7 +261,6 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java index c094150f27e3..25815f11b938 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java @@ -137,7 +137,6 @@ public PetWithRequiredTags() { } public PetWithRequiredTags id(Long id) { - this.id = id; return this; } @@ -151,14 +150,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public PetWithRequiredTags category(Category category) { - this.category = category; return this; } @@ -172,14 +169,12 @@ public Category getCategory() { return category; } - public void setCategory(Category category) { this.category = category; } public PetWithRequiredTags name(String name) { - this.name = name; return this; } @@ -193,14 +188,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public PetWithRequiredTags photoUrls(List photoUrls) { - this.photoUrls = photoUrls; return this; } @@ -222,14 +215,12 @@ public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public PetWithRequiredTags tags(List tags) { - this.tags = tags; return this; } @@ -251,14 +242,12 @@ public List getTags() { return tags; } - public void setTags(List tags) { this.tags = tags; } public PetWithRequiredTags status(StatusEnum status) { - this.status = status; return this; } @@ -272,7 +261,6 @@ public StatusEnum getStatus() { return status; } - public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PropertyNameCollision.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PropertyNameCollision.java index ec27136abd10..15c94c8ef4ca 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PropertyNameCollision.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PropertyNameCollision.java @@ -67,7 +67,6 @@ public PropertyNameCollision() { } public PropertyNameCollision underscoreType(String underscoreType) { - this.underscoreType = underscoreType; return this; } @@ -81,14 +80,12 @@ public String getUnderscoreType() { return underscoreType; } - public void setUnderscoreType(String underscoreType) { this.underscoreType = underscoreType; } public PropertyNameCollision type(String type) { - this.type = type; return this; } @@ -102,14 +99,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public PropertyNameCollision typeWithUnderscore(String typeWithUnderscore) { - this.typeWithUnderscore = typeWithUnderscore; return this; } @@ -123,7 +118,6 @@ public String getTypeWithUnderscore() { return typeWithUnderscore; } - public void setTypeWithUnderscore(String typeWithUnderscore) { this.typeWithUnderscore = typeWithUnderscore; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index c95020df057c..64961f1cd447 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -59,7 +59,6 @@ public QuadrilateralInterface() { } public QuadrilateralInterface quadrilateralType(String quadrilateralType) { - this.quadrilateralType = quadrilateralType; return this; } @@ -73,7 +72,6 @@ public String getQuadrilateralType() { return quadrilateralType; } - public void setQuadrilateralType(String quadrilateralType) { this.quadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index b62bb2dddc67..e6aaed50f39f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -62,7 +62,6 @@ public class ReadOnlyFirst { public ReadOnlyFirst() { } - public ReadOnlyFirst( String bar ) { @@ -81,9 +80,7 @@ public String getBar() { - public ReadOnlyFirst baz(String baz) { - this.baz = baz; return this; } @@ -97,7 +94,6 @@ public String getBaz() { return baz; } - public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index c30678320ca9..a2cf0be049ef 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -63,7 +63,6 @@ public ScaleneTriangle() { } public ScaleneTriangle shapeType(String shapeType) { - this.shapeType = shapeType; return this; } @@ -77,14 +76,12 @@ public String getShapeType() { return shapeType; } - public void setShapeType(String shapeType) { this.shapeType = shapeType; } public ScaleneTriangle triangleType(String triangleType) { - this.triangleType = triangleType; return this; } @@ -98,7 +95,6 @@ public String getTriangleType() { return triangleType; } - public void setTriangleType(String triangleType) { this.triangleType = triangleType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java index f3dd889e637d..7a5fc8a3f0e8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -59,7 +59,6 @@ public ShapeInterface() { } public ShapeInterface shapeType(String shapeType) { - this.shapeType = shapeType; return this; } @@ -73,7 +72,6 @@ public String getShapeType() { return shapeType; } - public void setShapeType(String shapeType) { this.shapeType = shapeType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 8f3b3c9d3dd6..e0cf4149770d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -63,7 +63,6 @@ public SimpleQuadrilateral() { } public SimpleQuadrilateral shapeType(String shapeType) { - this.shapeType = shapeType; return this; } @@ -77,14 +76,12 @@ public String getShapeType() { return shapeType; } - public void setShapeType(String shapeType) { this.shapeType = shapeType; } public SimpleQuadrilateral quadrilateralType(String quadrilateralType) { - this.quadrilateralType = quadrilateralType; return this; } @@ -98,7 +95,6 @@ public String getQuadrilateralType() { return quadrilateralType; } - public void setQuadrilateralType(String quadrilateralType) { this.quadrilateralType = quadrilateralType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java index 776cea58df91..31986709b6e1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -63,7 +63,6 @@ public SpecialModelName() { } public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; return this; } @@ -77,14 +76,12 @@ public SpecialModelName() { return $specialPropertyName; } - public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } public SpecialModelName specialModelName(String specialModelName) { - this.specialModelName = specialModelName; return this; } @@ -98,7 +95,6 @@ public String getSpecialModelName() { return specialModelName; } - public void setSpecialModelName(String specialModelName) { this.specialModelName = specialModelName; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java index 6f2b2cb137bb..5eeadfefd5de 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java @@ -63,7 +63,6 @@ public Tag() { } public Tag id(Long id) { - this.id = id; return this; } @@ -77,14 +76,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public Tag name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 6aa03af08bcb..a7054eef57cf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -59,7 +59,6 @@ public TestInlineFreeformAdditionalPropertiesRequest() { } public TestInlineFreeformAdditionalPropertiesRequest someProperty(String someProperty) { - this.someProperty = someProperty; return this; } @@ -73,7 +72,6 @@ public String getSomeProperty() { return someProperty; } - public void setSomeProperty(String someProperty) { this.someProperty = someProperty; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java index dc00208db465..c427ab318054 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -59,7 +59,6 @@ public TriangleInterface() { } public TriangleInterface triangleType(String triangleType) { - this.triangleType = triangleType; return this; } @@ -73,7 +72,6 @@ public String getTriangleType() { return triangleType; } - public void setTriangleType(String triangleType) { this.triangleType = triangleType; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java index ab60644bf648..94931c39db55 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java @@ -104,7 +104,6 @@ public User() { } public User id(Long id) { - this.id = id; return this; } @@ -118,14 +117,12 @@ public Long getId() { return id; } - public void setId(Long id) { this.id = id; } public User username(String username) { - this.username = username; return this; } @@ -139,14 +136,12 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } public User firstName(String firstName) { - this.firstName = firstName; return this; } @@ -160,14 +155,12 @@ public String getFirstName() { return firstName; } - public void setFirstName(String firstName) { this.firstName = firstName; } public User lastName(String lastName) { - this.lastName = lastName; return this; } @@ -181,14 +174,12 @@ public String getLastName() { return lastName; } - public void setLastName(String lastName) { this.lastName = lastName; } public User email(String email) { - this.email = email; return this; } @@ -202,14 +193,12 @@ public String getEmail() { return email; } - public void setEmail(String email) { this.email = email; } public User password(String password) { - this.password = password; return this; } @@ -223,14 +212,12 @@ public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } public User phone(String phone) { - this.phone = phone; return this; } @@ -244,14 +231,12 @@ public String getPhone() { return phone; } - public void setPhone(String phone) { this.phone = phone; } public User userStatus(Integer userStatus) { - this.userStatus = userStatus; return this; } @@ -265,14 +250,12 @@ public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } public User objectWithNoDeclaredProps(Object objectWithNoDeclaredProps) { - this.objectWithNoDeclaredProps = objectWithNoDeclaredProps; return this; } @@ -286,14 +269,12 @@ public Object getObjectWithNoDeclaredProps() { return objectWithNoDeclaredProps; } - public void setObjectWithNoDeclaredProps(Object objectWithNoDeclaredProps) { this.objectWithNoDeclaredProps = objectWithNoDeclaredProps; } public User objectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) { - this.objectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; return this; } @@ -307,14 +288,12 @@ public Object getObjectWithNoDeclaredPropsNullable() { return objectWithNoDeclaredPropsNullable; } - public void setObjectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) { this.objectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; } public User anyTypeProp(Object anyTypeProp) { - this.anyTypeProp = anyTypeProp; return this; } @@ -328,14 +307,12 @@ public Object getAnyTypeProp() { return anyTypeProp; } - public void setAnyTypeProp(Object anyTypeProp) { this.anyTypeProp = anyTypeProp; } public User anyTypePropNullable(Object anyTypePropNullable) { - this.anyTypePropNullable = anyTypePropNullable; return this; } @@ -349,7 +326,6 @@ public Object getAnyTypePropNullable() { return anyTypePropNullable; } - public void setAnyTypePropNullable(Object anyTypePropNullable) { this.anyTypePropNullable = anyTypePropNullable; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Variable.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Variable.java index 69c3b0d4d519..ce93b3ba30a5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Variable.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Variable.java @@ -64,7 +64,6 @@ public Variable() { } public Variable name(String name) { - this.name = name; return this; } @@ -78,14 +77,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public Variable value(Value value) { - this.value = value; return this; } @@ -99,7 +96,6 @@ public Value getValue() { return value; } - public void setValue(Value value) { this.value = value; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java index bb0f3f6f4b38..b56277c926fd 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java @@ -67,7 +67,6 @@ public Whale() { } public Whale hasBaleen(Boolean hasBaleen) { - this.hasBaleen = hasBaleen; return this; } @@ -81,14 +80,12 @@ public Boolean getHasBaleen() { return hasBaleen; } - public void setHasBaleen(Boolean hasBaleen) { this.hasBaleen = hasBaleen; } public Whale hasTeeth(Boolean hasTeeth) { - this.hasTeeth = hasTeeth; return this; } @@ -102,14 +99,12 @@ public Boolean getHasTeeth() { return hasTeeth; } - public void setHasTeeth(Boolean hasTeeth) { this.hasTeeth = hasTeeth; } public Whale className(String className) { - this.className = className; return this; } @@ -123,7 +118,6 @@ public String getClassName() { return className; } - public void setClassName(String className) { this.className = className; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java index 33e9757e4d20..2ceafc48c075 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java @@ -117,7 +117,6 @@ public Zebra() { } public Zebra type(TypeEnum type) { - this.type = type; return this; } @@ -131,14 +130,12 @@ public TypeEnum getType() { return type; } - public void setType(TypeEnum type) { this.type = type; } public Zebra className(String className) { - this.className = className; return this; } @@ -152,7 +149,6 @@ public String getClassName() { return className; } - public void setClassName(String className) { this.className = className; } diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts index 5474f6bcd41f..c1752e116e98 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -188,7 +188,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - filePost: async (filePostRequest?: FilePostRequest, options: AxiosRequestConfig = {}): Promise => { + filePost: async (filePostRequest?: FilePostRequest, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/file`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -221,7 +221,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - petsFilteredPatch: async (petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options: AxiosRequestConfig = {}): Promise => { + petsFilteredPatch: async (petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/pets-filtered`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -254,7 +254,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - petsPatch: async (petsPatchRequest?: PetsPatchRequest | null, options: AxiosRequestConfig = {}): Promise => { + petsPatch: async (petsPatchRequest?: PetsPatchRequest | null, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/pets`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -297,7 +297,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async filePost(filePostRequest?: FilePostRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async filePost(filePostRequest?: FilePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.filePost(filePostRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.filePost']?.[index]?.url; @@ -309,7 +309,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.petsFilteredPatch(petsFilteredPatchRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.petsFilteredPatch']?.[index]?.url; @@ -321,7 +321,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async petsPatch(petsPatchRequest?: PetsPatchRequest | null, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async petsPatch(petsPatchRequest?: PetsPatchRequest | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.petsPatch(petsPatchRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.petsPatch']?.[index]?.url; @@ -381,7 +381,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public filePost(filePostRequest?: FilePostRequest, options?: AxiosRequestConfig) { + public filePost(filePostRequest?: FilePostRequest, options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).filePost(filePostRequest, options).then((request) => request(this.axios, this.basePath)); } @@ -392,7 +392,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options?: AxiosRequestConfig) { + public petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).petsFilteredPatch(petsFilteredPatchRequest, options).then((request) => request(this.axios, this.basePath)); } @@ -403,7 +403,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public petsPatch(petsPatchRequest?: PetsPatchRequest | null, options?: AxiosRequestConfig) { + public petsPatch(petsPatchRequest?: PetsPatchRequest | null, options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).petsPatch(petsPatchRequest, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts index 00697e3ddbc4..e215695bd26e 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://api.example.xyz/v1".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index b2d5f4574057..f74593fe5bb7 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -833,7 +833,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -846,7 +846,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -858,7 +858,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -871,7 +871,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -883,7 +883,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -923,7 +923,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -952,7 +952,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1019,7 +1019,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1053,7 +1053,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1099,7 +1099,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1111,7 +1111,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1124,7 +1124,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1137,7 +1137,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1210,7 +1210,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1221,7 +1221,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1233,7 +1233,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1245,7 +1245,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1265,7 +1265,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1301,7 +1301,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1337,7 +1337,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1373,7 +1373,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1407,7 +1407,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1484,7 +1484,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1516,7 +1516,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1578,7 +1578,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1591,7 +1591,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1604,7 +1604,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1617,7 +1617,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1631,7 +1631,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1643,7 +1643,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1657,7 +1657,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1772,7 +1772,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1796,7 +1796,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1820,7 +1820,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1833,7 +1833,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1844,7 +1844,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1857,7 +1857,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/default/base.ts b/samples/client/petstore/typescript-axios/builds/default/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/default/base.ts +++ b/samples/client/petstore/typescript-axios/builds/default/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index b2d5f4574057..f74593fe5bb7 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -833,7 +833,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -846,7 +846,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -858,7 +858,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -871,7 +871,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -883,7 +883,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -923,7 +923,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -952,7 +952,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1019,7 +1019,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1053,7 +1053,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1099,7 +1099,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1111,7 +1111,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1124,7 +1124,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1137,7 +1137,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1210,7 +1210,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1221,7 +1221,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1233,7 +1233,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1245,7 +1245,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1265,7 +1265,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1301,7 +1301,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1337,7 +1337,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1373,7 +1373,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1407,7 +1407,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1484,7 +1484,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1516,7 +1516,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1578,7 +1578,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1591,7 +1591,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1604,7 +1604,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1617,7 +1617,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1631,7 +1631,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1643,7 +1643,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1657,7 +1657,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1772,7 +1772,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1796,7 +1796,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1820,7 +1820,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1833,7 +1833,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1844,7 +1844,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1857,7 +1857,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/package.json b/samples/client/petstore/typescript-axios/builds/es6-target/package.json index dc2da01a43e4..07a92ace734a 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/package.json +++ b/samples/client/petstore/typescript-axios/builds/es6-target/package.json @@ -24,7 +24,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index 258ae1dc7561..a2119d89b148 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -1709,7 +1709,7 @@ export const AnotherFakeApiAxiosParamCreator = function (configuration?: Configu * @param {*} [options] Override http request option. * @throws {RequiredError} */ - _123testSpecialTags: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + _123testSpecialTags: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('_123testSpecialTags', 'client', client) const localVarPath = `/another-fake/dummy`; @@ -1755,7 +1755,7 @@ export const AnotherFakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async _123testSpecialTags(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async _123testSpecialTags(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator._123testSpecialTags(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['AnotherFakeApi._123testSpecialTags']?.[index]?.url; @@ -1799,7 +1799,7 @@ export class AnotherFakeApi extends BaseAPI { * @throws {RequiredError} * @memberof AnotherFakeApi */ - public _123testSpecialTags(client: Client, options?: AxiosRequestConfig) { + public _123testSpecialTags(client: Client, options?: RawAxiosRequestConfig) { return AnotherFakeApiFp(this.configuration)._123testSpecialTags(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -1817,7 +1817,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fooGet: async (options: AxiosRequestConfig = {}): Promise => { + fooGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/foo`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1856,7 +1856,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fooGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fooGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fooGet(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.fooGet']?.[index]?.url; @@ -1896,7 +1896,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public fooGet(options?: AxiosRequestConfig) { + public fooGet(options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).fooGet(options).then((request) => request(this.axios, this.basePath)); } } @@ -1915,7 +1915,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeHealthGet: async (options: AxiosRequestConfig = {}): Promise => { + fakeHealthGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/health`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1945,7 +1945,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterBooleanSerialize: async (body?: boolean, options: AxiosRequestConfig = {}): Promise => { + fakeOuterBooleanSerialize: async (body?: boolean, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/boolean`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1978,7 +1978,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: AxiosRequestConfig = {}): Promise => { + fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/composite`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2011,7 +2011,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterNumberSerialize: async (body?: number, options: AxiosRequestConfig = {}): Promise => { + fakeOuterNumberSerialize: async (body?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/number`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2044,7 +2044,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterStringSerialize: async (body?: string, options: AxiosRequestConfig = {}): Promise => { + fakeOuterStringSerialize: async (body?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2077,7 +2077,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArrayOfEnums: async (options: AxiosRequestConfig = {}): Promise => { + getArrayOfEnums: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/array-of-enums`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2107,7 +2107,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: AxiosRequestConfig = {}): Promise => { + testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fileSchemaTestClass' is not null or undefined assertParamExists('testBodyWithFileSchema', 'fileSchemaTestClass', fileSchemaTestClass) const localVarPath = `/fake/body-with-file-schema`; @@ -2143,7 +2143,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithQueryParams: async (query: string, user: User, options: AxiosRequestConfig = {}): Promise => { + testBodyWithQueryParams: async (query: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'query' is not null or undefined assertParamExists('testBodyWithQueryParams', 'query', query) // verify required parameter 'user' is not null or undefined @@ -2185,7 +2185,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClientModel: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + testClientModel: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClientModel', 'client', client) const localVarPath = `/fake`; @@ -2234,7 +2234,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options: AxiosRequestConfig = {}): Promise => { + testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'number' is not null or undefined assertParamExists('testEndpointParameters', 'number', number) // verify required parameter '_double' is not null or undefined @@ -2344,7 +2344,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEnumParameters: async (enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options: AxiosRequestConfig = {}): Promise => { + testEnumParameters: async (enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2417,7 +2417,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: AxiosRequestConfig = {}): Promise => { + testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'requiredStringGroup' is not null or undefined assertParamExists('testGroupParameters', 'requiredStringGroup', requiredStringGroup) // verify required parameter 'requiredBooleanGroup' is not null or undefined @@ -2486,7 +2486,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: AxiosRequestConfig = {}): Promise => { + testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'requestBody' is not null or undefined assertParamExists('testInlineAdditionalProperties', 'requestBody', requestBody) const localVarPath = `/fake/inline-additionalProperties`; @@ -2522,7 +2522,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineFreeformAdditionalProperties: async (testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options: AxiosRequestConfig = {}): Promise => { + testInlineFreeformAdditionalProperties: async (testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'testInlineFreeformAdditionalPropertiesRequest' is not null or undefined assertParamExists('testInlineFreeformAdditionalProperties', 'testInlineFreeformAdditionalPropertiesRequest', testInlineFreeformAdditionalPropertiesRequest) const localVarPath = `/fake/inline-freeform-additionalProperties`; @@ -2559,7 +2559,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testJsonFormData: async (param: string, param2: string, options: AxiosRequestConfig = {}): Promise => { + testJsonFormData: async (param: string, param2: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'param' is not null or undefined assertParamExists('testJsonFormData', 'param', param) // verify required parameter 'param2' is not null or undefined @@ -2609,7 +2609,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: AxiosRequestConfig = {}): Promise => { + testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pipe' is not null or undefined assertParamExists('testQueryParameterCollectionFormat', 'pipe', pipe) // verify required parameter 'ioutil' is not null or undefined @@ -2679,7 +2679,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeHealthGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeHealthGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeHealthGet(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeHealthGet']?.[index]?.url; @@ -2691,7 +2691,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterBooleanSerialize(body?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterBooleanSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterBooleanSerialize']?.[index]?.url; @@ -2703,7 +2703,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterCompositeSerialize(outerComposite, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterCompositeSerialize']?.[index]?.url; @@ -2715,7 +2715,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterNumberSerialize(body?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterNumberSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterNumberSerialize']?.[index]?.url; @@ -2727,7 +2727,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterStringSerialize(body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterStringSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterStringSerialize']?.[index]?.url; @@ -2739,7 +2739,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getArrayOfEnums(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async getArrayOfEnums(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getArrayOfEnums(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.getArrayOfEnums']?.[index]?.url; @@ -2751,7 +2751,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithFileSchema(fileSchemaTestClass, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testBodyWithFileSchema']?.[index]?.url; @@ -2764,7 +2764,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithQueryParams(query: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithQueryParams(query, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testBodyWithQueryParams']?.[index]?.url; @@ -2777,7 +2777,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClientModel(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClientModel(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClientModel(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testClientModel']?.[index]?.url; @@ -2803,7 +2803,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testEndpointParameters']?.[index]?.url; @@ -2823,7 +2823,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testEnumParameters']?.[index]?.url; @@ -2841,7 +2841,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testGroupParameters']?.[index]?.url; @@ -2854,7 +2854,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineAdditionalProperties(requestBody, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testInlineAdditionalProperties']?.[index]?.url; @@ -2867,7 +2867,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testInlineFreeformAdditionalProperties']?.[index]?.url; @@ -2881,7 +2881,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testJsonFormData(param: string, param2: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testJsonFormData(param, param2, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testJsonFormData']?.[index]?.url; @@ -2897,7 +2897,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testQueryParameterCollectionFormat']?.[index]?.url; @@ -3112,7 +3112,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeHealthGet(options?: AxiosRequestConfig) { + public fakeHealthGet(options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeHealthGet(options).then((request) => request(this.axios, this.basePath)); } @@ -3123,7 +3123,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig) { + public fakeOuterBooleanSerialize(body?: boolean, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterBooleanSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -3134,7 +3134,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig) { + public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterCompositeSerialize(outerComposite, options).then((request) => request(this.axios, this.basePath)); } @@ -3145,7 +3145,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig) { + public fakeOuterNumberSerialize(body?: number, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterNumberSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -3156,7 +3156,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig) { + public fakeOuterStringSerialize(body?: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterStringSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -3167,7 +3167,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public getArrayOfEnums(options?: AxiosRequestConfig) { + public getArrayOfEnums(options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).getArrayOfEnums(options).then((request) => request(this.axios, this.basePath)); } @@ -3178,7 +3178,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig) { + public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithFileSchema(fileSchemaTestClass, options).then((request) => request(this.axios, this.basePath)); } @@ -3190,7 +3190,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig) { + public testBodyWithQueryParams(query: string, user: User, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithQueryParams(query, user, options).then((request) => request(this.axios, this.basePath)); } @@ -3202,7 +3202,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testClientModel(client: Client, options?: AxiosRequestConfig) { + public testClientModel(client: Client, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testClientModel(client, options).then((request) => request(this.axios, this.basePath)); } @@ -3227,7 +3227,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig) { + public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options).then((request) => request(this.axios, this.basePath)); } @@ -3246,7 +3246,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: AxiosRequestConfig) { + public testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options).then((request) => request(this.axios, this.basePath)); } @@ -3263,7 +3263,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig) { + public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options).then((request) => request(this.axios, this.basePath)); } @@ -3275,7 +3275,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig) { + public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineAdditionalProperties(requestBody, options).then((request) => request(this.axios, this.basePath)); } @@ -3287,7 +3287,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: AxiosRequestConfig) { + public testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest, options).then((request) => request(this.axios, this.basePath)); } @@ -3300,7 +3300,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig) { + public testJsonFormData(param: string, param2: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testJsonFormData(param, param2, options).then((request) => request(this.axios, this.basePath)); } @@ -3315,7 +3315,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig) { + public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options).then((request) => request(this.axios, this.basePath)); } } @@ -3402,7 +3402,7 @@ export const FakeClassnameTags123ApiAxiosParamCreator = function (configuration? * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClassname: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + testClassname: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClassname', 'client', client) const localVarPath = `/fake_classname_test`; @@ -3451,7 +3451,7 @@ export const FakeClassnameTags123ApiFp = function(configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClassname(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClassname(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClassname(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeClassnameTags123Api.testClassname']?.[index]?.url; @@ -3495,7 +3495,7 @@ export class FakeClassnameTags123Api extends BaseAPI { * @throws {RequiredError} * @memberof FakeClassnameTags123Api */ - public testClassname(client: Client, options?: AxiosRequestConfig) { + public testClassname(client: Client, options?: RawAxiosRequestConfig) { return FakeClassnameTags123ApiFp(this.configuration).testClassname(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -3515,7 +3515,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('addPet', 'pet', pet) const localVarPath = `/pet`; @@ -3558,7 +3558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3600,7 +3600,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -3644,7 +3644,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -3687,7 +3687,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3724,7 +3724,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('updatePet', 'pet', pet) const localVarPath = `/pet`; @@ -3768,7 +3768,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3820,7 +3820,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -3872,7 +3872,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFileWithRequiredFile: async (petId: number, requiredFile: File, additionalMetadata?: string, options: AxiosRequestConfig = {}): Promise => { + uploadFileWithRequiredFile: async (petId: number, requiredFile: File, additionalMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFileWithRequiredFile', 'petId', petId) // verify required parameter 'requiredFile' is not null or undefined @@ -3934,7 +3934,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -3948,7 +3948,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -3961,7 +3961,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -3975,7 +3975,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -3988,7 +3988,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -4001,7 +4001,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -4016,7 +4016,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -4031,7 +4031,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -4046,7 +4046,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFileWithRequiredFile']?.[index]?.url; @@ -4178,7 +4178,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(pet: Pet, options?: AxiosRequestConfig) { + public addPet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -4191,7 +4191,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -4203,7 +4203,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -4216,7 +4216,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -4228,7 +4228,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -4240,7 +4240,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(pet: Pet, options?: AxiosRequestConfig) { + public updatePet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -4254,7 +4254,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -4268,7 +4268,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } @@ -4282,7 +4282,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: AxiosRequestConfig) { + public uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options).then((request) => request(this.axios, this.basePath)); } } @@ -4311,7 +4311,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -4344,7 +4344,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4378,7 +4378,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -4412,7 +4412,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (order: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'order' is not null or undefined assertParamExists('placeOrder', 'order', order) const localVarPath = `/store/order`; @@ -4458,7 +4458,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -4470,7 +4470,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -4483,7 +4483,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -4496,7 +4496,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(order: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -4569,7 +4569,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4580,7 +4580,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -4592,7 +4592,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4604,7 +4604,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(order: Order, options?: AxiosRequestConfig) { + public placeOrder(order: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } } @@ -4624,7 +4624,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUser', 'user', user) const localVarPath = `/user`; @@ -4660,7 +4660,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithArrayInput', 'user', user) const localVarPath = `/user/createWithArray`; @@ -4696,7 +4696,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithListInput', 'user', user) const localVarPath = `/user/createWithList`; @@ -4732,7 +4732,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -4766,7 +4766,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -4801,7 +4801,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -4843,7 +4843,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4875,7 +4875,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'user' is not null or undefined @@ -4924,7 +4924,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -4937,7 +4937,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -4950,7 +4950,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -4963,7 +4963,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -4976,7 +4976,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -4990,7 +4990,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -5002,7 +5002,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -5016,7 +5016,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -5131,7 +5131,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(user: User, options?: AxiosRequestConfig) { + public createUser(user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); } @@ -5143,7 +5143,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -5155,7 +5155,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -5167,7 +5167,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -5179,7 +5179,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -5192,7 +5192,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -5203,7 +5203,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -5216,7 +5216,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, user: User, options?: AxiosRequestConfig) { + public updateUser(username: string, user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts index a249a937e0f6..ba1854123f7c 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts index de050a37084b..53ff891d4199 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -276,7 +276,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options: AxiosRequestConfig = {}): Promise => { + addPet: async (pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('addPet', 'pet', pet) const localVarPath = `/pet`; @@ -334,7 +334,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -376,7 +376,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -418,7 +418,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -459,7 +459,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -496,7 +496,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('updatePet', 'pet', pet) const localVarPath = `/pet`; @@ -538,7 +538,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -590,7 +590,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, header1, header2, accept, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -667,7 +667,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -680,7 +680,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -694,7 +694,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -707,7 +707,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -720,7 +720,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -735,7 +735,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -750,7 +750,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -876,7 +876,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options?: AxiosRequestConfig) { + public addPet(pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(pet, header1, header2, accept, options).then((request) => request(this.axios, this.basePath)); } @@ -889,7 +889,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -901,7 +901,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -914,7 +914,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -926,7 +926,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -938,7 +938,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(pet: Pet, options?: AxiosRequestConfig) { + public updatePet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -952,7 +952,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -966,7 +966,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -995,7 +995,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1028,7 +1028,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1062,7 +1062,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1096,7 +1096,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (order: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'order' is not null or undefined assertParamExists('placeOrder', 'order', order) const localVarPath = `/store/order`; @@ -1142,7 +1142,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1154,7 +1154,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1167,7 +1167,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1180,7 +1180,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(order: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1253,7 +1253,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1264,7 +1264,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1276,7 +1276,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1288,7 +1288,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(order: Order, options?: AxiosRequestConfig) { + public placeOrder(order: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } } @@ -1308,7 +1308,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUser', 'user', user) const localVarPath = `/user`; @@ -1344,7 +1344,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithArrayInput', 'user', user) const localVarPath = `/user/createWithArray`; @@ -1380,7 +1380,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithListInput', 'user', user) const localVarPath = `/user/createWithList`; @@ -1416,7 +1416,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1450,7 +1450,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1485,7 +1485,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1527,7 +1527,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1559,7 +1559,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'user' is not null or undefined @@ -1608,7 +1608,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1621,7 +1621,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1634,7 +1634,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1647,7 +1647,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1660,7 +1660,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1674,7 +1674,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1686,7 +1686,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1700,7 +1700,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1815,7 +1815,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(user: User, options?: AxiosRequestConfig) { + public createUser(user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1827,7 +1827,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1839,7 +1839,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1851,7 +1851,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1863,7 +1863,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1876,7 +1876,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1887,7 +1887,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1900,7 +1900,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, user: User, options?: AxiosRequestConfig) { + public updateUser(username: string, user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index 5ca71ad7514a..2c8551e92540 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -1363,7 +1363,7 @@ export const AnotherFakeApiAxiosParamCreator = function (configuration?: Configu * @param {*} [options] Override http request option. * @throws {RequiredError} */ - _123testSpecialTags: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + _123testSpecialTags: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('_123testSpecialTags', 'client', client) const localVarPath = `/another-fake/dummy`; @@ -1409,7 +1409,7 @@ export const AnotherFakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async _123testSpecialTags(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async _123testSpecialTags(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator._123testSpecialTags(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['AnotherFakeApi._123testSpecialTags']?.[index]?.url; @@ -1453,7 +1453,7 @@ export class AnotherFakeApi extends BaseAPI { * @throws {RequiredError} * @memberof AnotherFakeApi */ - public _123testSpecialTags(client: Client, options?: AxiosRequestConfig) { + public _123testSpecialTags(client: Client, options?: RawAxiosRequestConfig) { return AnotherFakeApiFp(this.configuration)._123testSpecialTags(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -1471,7 +1471,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fooGet: async (options: AxiosRequestConfig = {}): Promise => { + fooGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/foo`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1510,7 +1510,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fooGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fooGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fooGet(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.fooGet']?.[index]?.url; @@ -1550,7 +1550,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public fooGet(options?: AxiosRequestConfig) { + public fooGet(options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).fooGet(options).then((request) => request(this.axios, this.basePath)); } } @@ -1569,7 +1569,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeHealthGet: async (options: AxiosRequestConfig = {}): Promise => { + fakeHealthGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/health`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1599,7 +1599,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterBooleanSerialize: async (body?: boolean, options: AxiosRequestConfig = {}): Promise => { + fakeOuterBooleanSerialize: async (body?: boolean, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/boolean`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1632,7 +1632,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: AxiosRequestConfig = {}): Promise => { + fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/composite`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1665,7 +1665,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterNumberSerialize: async (body?: number, options: AxiosRequestConfig = {}): Promise => { + fakeOuterNumberSerialize: async (body?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/number`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1698,7 +1698,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterStringSerialize: async (body?: string, options: AxiosRequestConfig = {}): Promise => { + fakeOuterStringSerialize: async (body?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1731,7 +1731,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: AxiosRequestConfig = {}): Promise => { + testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fileSchemaTestClass' is not null or undefined assertParamExists('testBodyWithFileSchema', 'fileSchemaTestClass', fileSchemaTestClass) const localVarPath = `/fake/body-with-file-schema`; @@ -1767,7 +1767,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithQueryParams: async (query: string, user: User, options: AxiosRequestConfig = {}): Promise => { + testBodyWithQueryParams: async (query: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'query' is not null or undefined assertParamExists('testBodyWithQueryParams', 'query', query) // verify required parameter 'user' is not null or undefined @@ -1809,7 +1809,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClientModel: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + testClientModel: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClientModel', 'client', client) const localVarPath = `/fake`; @@ -1858,7 +1858,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options: AxiosRequestConfig = {}): Promise => { + testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'number' is not null or undefined assertParamExists('testEndpointParameters', 'number', number) // verify required parameter '_double' is not null or undefined @@ -1968,7 +1968,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEnumParameters: async (enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options: AxiosRequestConfig = {}): Promise => { + testEnumParameters: async (enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2041,7 +2041,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: AxiosRequestConfig = {}): Promise => { + testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'requiredStringGroup' is not null or undefined assertParamExists('testGroupParameters', 'requiredStringGroup', requiredStringGroup) // verify required parameter 'requiredBooleanGroup' is not null or undefined @@ -2110,7 +2110,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: AxiosRequestConfig = {}): Promise => { + testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'requestBody' is not null or undefined assertParamExists('testInlineAdditionalProperties', 'requestBody', requestBody) const localVarPath = `/fake/inline-additionalProperties`; @@ -2146,7 +2146,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineFreeformAdditionalProperties: async (testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options: AxiosRequestConfig = {}): Promise => { + testInlineFreeformAdditionalProperties: async (testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'testInlineFreeformAdditionalPropertiesRequest' is not null or undefined assertParamExists('testInlineFreeformAdditionalProperties', 'testInlineFreeformAdditionalPropertiesRequest', testInlineFreeformAdditionalPropertiesRequest) const localVarPath = `/fake/inline-freeform-additionalProperties`; @@ -2183,7 +2183,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testJsonFormData: async (param: string, param2: string, options: AxiosRequestConfig = {}): Promise => { + testJsonFormData: async (param: string, param2: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'param' is not null or undefined assertParamExists('testJsonFormData', 'param', param) // verify required parameter 'param2' is not null or undefined @@ -2233,7 +2233,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: AxiosRequestConfig = {}): Promise => { + testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pipe' is not null or undefined assertParamExists('testQueryParameterCollectionFormat', 'pipe', pipe) // verify required parameter 'ioutil' is not null or undefined @@ -2294,7 +2294,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testUniqueItemsHeaderAndQueryParameterCollectionFormat: async (queryUnique: Set, headerUnique: Set, options: AxiosRequestConfig = {}): Promise => { + testUniqueItemsHeaderAndQueryParameterCollectionFormat: async (queryUnique: Set, headerUnique: Set, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'queryUnique' is not null or undefined assertParamExists('testUniqueItemsHeaderAndQueryParameterCollectionFormat', 'queryUnique', queryUnique) // verify required parameter 'headerUnique' is not null or undefined @@ -2347,7 +2347,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeHealthGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeHealthGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeHealthGet(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeHealthGet']?.[index]?.url; @@ -2359,7 +2359,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterBooleanSerialize(body?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterBooleanSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterBooleanSerialize']?.[index]?.url; @@ -2371,7 +2371,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterCompositeSerialize(outerComposite, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterCompositeSerialize']?.[index]?.url; @@ -2383,7 +2383,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterNumberSerialize(body?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterNumberSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterNumberSerialize']?.[index]?.url; @@ -2395,7 +2395,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterStringSerialize(body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterStringSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterStringSerialize']?.[index]?.url; @@ -2407,7 +2407,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithFileSchema(fileSchemaTestClass, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testBodyWithFileSchema']?.[index]?.url; @@ -2420,7 +2420,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithQueryParams(query: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithQueryParams(query, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testBodyWithQueryParams']?.[index]?.url; @@ -2433,7 +2433,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClientModel(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClientModel(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClientModel(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testClientModel']?.[index]?.url; @@ -2459,7 +2459,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testEndpointParameters']?.[index]?.url; @@ -2479,7 +2479,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testEnumParameters']?.[index]?.url; @@ -2497,7 +2497,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testGroupParameters']?.[index]?.url; @@ -2510,7 +2510,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineAdditionalProperties(requestBody, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testInlineAdditionalProperties']?.[index]?.url; @@ -2523,7 +2523,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testInlineFreeformAdditionalProperties']?.[index]?.url; @@ -2537,7 +2537,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testJsonFormData(param: string, param2: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testJsonFormData(param, param2, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testJsonFormData']?.[index]?.url; @@ -2553,7 +2553,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testQueryParameterCollectionFormat']?.[index]?.url; @@ -2566,7 +2566,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique, headerUnique, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testUniqueItemsHeaderAndQueryParameterCollectionFormat']?.[index]?.url; @@ -2782,7 +2782,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeHealthGet(options?: AxiosRequestConfig) { + public fakeHealthGet(options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeHealthGet(options).then((request) => request(this.axios, this.basePath)); } @@ -2793,7 +2793,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig) { + public fakeOuterBooleanSerialize(body?: boolean, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterBooleanSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2804,7 +2804,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig) { + public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterCompositeSerialize(outerComposite, options).then((request) => request(this.axios, this.basePath)); } @@ -2815,7 +2815,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig) { + public fakeOuterNumberSerialize(body?: number, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterNumberSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2826,7 +2826,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig) { + public fakeOuterStringSerialize(body?: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterStringSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2837,7 +2837,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig) { + public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithFileSchema(fileSchemaTestClass, options).then((request) => request(this.axios, this.basePath)); } @@ -2849,7 +2849,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig) { + public testBodyWithQueryParams(query: string, user: User, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithQueryParams(query, user, options).then((request) => request(this.axios, this.basePath)); } @@ -2861,7 +2861,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testClientModel(client: Client, options?: AxiosRequestConfig) { + public testClientModel(client: Client, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testClientModel(client, options).then((request) => request(this.axios, this.basePath)); } @@ -2886,7 +2886,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig) { + public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options).then((request) => request(this.axios, this.basePath)); } @@ -2905,7 +2905,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: AxiosRequestConfig) { + public testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options).then((request) => request(this.axios, this.basePath)); } @@ -2922,7 +2922,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig) { + public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options).then((request) => request(this.axios, this.basePath)); } @@ -2934,7 +2934,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig) { + public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineAdditionalProperties(requestBody, options).then((request) => request(this.axios, this.basePath)); } @@ -2946,7 +2946,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: AxiosRequestConfig) { + public testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest, options).then((request) => request(this.axios, this.basePath)); } @@ -2959,7 +2959,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig) { + public testJsonFormData(param: string, param2: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testJsonFormData(param, param2, options).then((request) => request(this.axios, this.basePath)); } @@ -2974,7 +2974,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig) { + public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options).then((request) => request(this.axios, this.basePath)); } @@ -2986,7 +2986,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: AxiosRequestConfig) { + public testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique, headerUnique, options).then((request) => request(this.axios, this.basePath)); } } @@ -3073,7 +3073,7 @@ export const FakeClassnameTags123ApiAxiosParamCreator = function (configuration? * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClassname: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + testClassname: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClassname', 'client', client) const localVarPath = `/fake_classname_test`; @@ -3122,7 +3122,7 @@ export const FakeClassnameTags123ApiFp = function(configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClassname(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClassname(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClassname(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeClassnameTags123Api.testClassname']?.[index]?.url; @@ -3166,7 +3166,7 @@ export class FakeClassnameTags123Api extends BaseAPI { * @throws {RequiredError} * @memberof FakeClassnameTags123Api */ - public testClassname(client: Client, options?: AxiosRequestConfig) { + public testClassname(client: Client, options?: RawAxiosRequestConfig) { return FakeClassnameTags123ApiFp(this.configuration).testClassname(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -3186,7 +3186,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('addPet', 'pet', pet) const localVarPath = `/pet`; @@ -3229,7 +3229,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3271,7 +3271,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -3315,7 +3315,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -3358,7 +3358,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3395,7 +3395,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('updatePet', 'pet', pet) const localVarPath = `/pet`; @@ -3439,7 +3439,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3491,7 +3491,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -3543,7 +3543,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFileWithRequiredFile: async (petId: number, requiredFile: File, additionalMetadata?: string, options: AxiosRequestConfig = {}): Promise => { + uploadFileWithRequiredFile: async (petId: number, requiredFile: File, additionalMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFileWithRequiredFile', 'petId', petId) // verify required parameter 'requiredFile' is not null or undefined @@ -3605,7 +3605,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -3619,7 +3619,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -3632,7 +3632,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -3646,7 +3646,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -3659,7 +3659,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -3672,7 +3672,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -3687,7 +3687,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -3702,7 +3702,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -3717,7 +3717,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFileWithRequiredFile']?.[index]?.url; @@ -3849,7 +3849,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(pet: Pet, options?: AxiosRequestConfig) { + public addPet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -3862,7 +3862,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -3874,7 +3874,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -3887,7 +3887,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -3899,7 +3899,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -3911,7 +3911,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(pet: Pet, options?: AxiosRequestConfig) { + public updatePet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -3925,7 +3925,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -3939,7 +3939,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } @@ -3953,7 +3953,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: AxiosRequestConfig) { + public uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options).then((request) => request(this.axios, this.basePath)); } } @@ -3982,7 +3982,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -4015,7 +4015,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4049,7 +4049,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -4083,7 +4083,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (order: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'order' is not null or undefined assertParamExists('placeOrder', 'order', order) const localVarPath = `/store/order`; @@ -4129,7 +4129,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -4141,7 +4141,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -4154,7 +4154,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -4167,7 +4167,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(order: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -4240,7 +4240,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4251,7 +4251,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -4263,7 +4263,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4275,7 +4275,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(order: Order, options?: AxiosRequestConfig) { + public placeOrder(order: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } } @@ -4295,7 +4295,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUser', 'user', user) const localVarPath = `/user`; @@ -4331,7 +4331,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithArrayInput', 'user', user) const localVarPath = `/user/createWithArray`; @@ -4367,7 +4367,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithListInput', 'user', user) const localVarPath = `/user/createWithList`; @@ -4403,7 +4403,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -4437,7 +4437,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -4472,7 +4472,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -4514,7 +4514,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4546,7 +4546,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'user' is not null or undefined @@ -4595,7 +4595,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -4608,7 +4608,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -4621,7 +4621,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -4634,7 +4634,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -4647,7 +4647,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -4661,7 +4661,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -4673,7 +4673,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -4687,7 +4687,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -4802,7 +4802,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(user: User, options?: AxiosRequestConfig) { + public createUser(user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4814,7 +4814,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4826,7 +4826,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4838,7 +4838,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -4850,7 +4850,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -4863,7 +4863,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -4874,7 +4874,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -4887,7 +4887,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, user: User, options?: AxiosRequestConfig) { + public updateUser(username: string, user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts index a249a937e0f6..ba1854123f7c 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index ad1bdfe075a7..aa2518ef893f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -832,7 +832,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - addPet(body: Pet, options?: AxiosRequestConfig): AxiosPromise; + addPet(body: Pet, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -843,7 +843,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): AxiosPromise; + deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Multiple status values can be provided with comma separated strings @@ -853,7 +853,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - findPetsByStatus(status: Array, options?: AxiosRequestConfig): AxiosPromise>; + findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): AxiosPromise>; /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -864,7 +864,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - findPetsByTags(tags: Array, options?: AxiosRequestConfig): AxiosPromise>; + findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): AxiosPromise>; /** * Returns a single pet @@ -874,7 +874,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - getPetById(petId: number, options?: AxiosRequestConfig): AxiosPromise; + getPetById(petId: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -884,7 +884,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - updatePet(body: Pet, options?: AxiosRequestConfig): AxiosPromise; + updatePet(body: Pet, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -896,7 +896,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): AxiosPromise; + updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -908,7 +908,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): AxiosPromise; + uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): AxiosPromise; } @@ -927,7 +927,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -940,7 +940,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -952,7 +952,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -965,7 +965,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -977,7 +977,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -989,7 +989,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1003,7 +1003,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -1017,7 +1017,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -1046,7 +1046,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1079,7 +1079,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1113,7 +1113,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1147,7 +1147,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1193,7 +1193,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1205,7 +1205,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1218,7 +1218,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1231,7 +1231,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1303,7 +1303,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - deleteOrder(orderId: string, options?: AxiosRequestConfig): AxiosPromise; + deleteOrder(orderId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns a map of status codes to quantities @@ -1312,7 +1312,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - getInventory(options?: AxiosRequestConfig): AxiosPromise<{ [key: string]: number; }>; + getInventory(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: number; }>; /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @@ -1322,7 +1322,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - getOrderById(orderId: number, options?: AxiosRequestConfig): AxiosPromise; + getOrderById(orderId: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1332,7 +1332,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - placeOrder(body: Order, options?: AxiosRequestConfig): AxiosPromise; + placeOrder(body: Order, options?: RawAxiosRequestConfig): AxiosPromise; } @@ -1351,7 +1351,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1362,7 +1362,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1374,7 +1374,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1386,7 +1386,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1406,7 +1406,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1478,7 +1478,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1514,7 +1514,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1548,7 +1548,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1583,7 +1583,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1625,7 +1625,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1657,7 +1657,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1706,7 +1706,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1719,7 +1719,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1732,7 +1732,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1745,7 +1745,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1758,7 +1758,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1772,7 +1772,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1784,7 +1784,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1798,7 +1798,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1912,7 +1912,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUser(body: User, options?: AxiosRequestConfig): AxiosPromise; + createUser(body: User, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1922,7 +1922,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): AxiosPromise; + createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1932,7 +1932,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUsersWithListInput(body: Array, options?: AxiosRequestConfig): AxiosPromise; + createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): AxiosPromise; /** * This can only be done by the logged in user. @@ -1942,7 +1942,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - deleteUser(username: string, options?: AxiosRequestConfig): AxiosPromise; + deleteUser(username: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1952,7 +1952,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - getUserByName(username: string, options?: AxiosRequestConfig): AxiosPromise; + getUserByName(username: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1963,7 +1963,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - loginUser(username: string, password: string, options?: AxiosRequestConfig): AxiosPromise; + loginUser(username: string, password: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1972,7 +1972,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - logoutUser(options?: AxiosRequestConfig): AxiosPromise; + logoutUser(options?: RawAxiosRequestConfig): AxiosPromise; /** * This can only be done by the logged in user. @@ -1983,7 +1983,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - updateUser(username: string, body: User, options?: AxiosRequestConfig): AxiosPromise; + updateUser(username: string, body: User, options?: RawAxiosRequestConfig): AxiosPromise; } @@ -2002,7 +2002,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2014,7 +2014,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2026,7 +2026,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2038,7 +2038,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -2050,7 +2050,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -2063,7 +2063,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -2074,7 +2074,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -2087,7 +2087,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts index e5172e43994f..bc170c05d884 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // URLSearchParams not necessarily used // @ts-ignore @@ -263,7 +263,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -304,7 +304,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -346,7 +346,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -388,7 +388,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -429,7 +429,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -466,7 +466,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -508,7 +508,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -560,7 +560,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -620,7 +620,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -634,7 +634,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -647,7 +647,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -661,7 +661,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -674,7 +674,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -687,7 +687,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -702,7 +702,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -717,7 +717,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -837,7 +837,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -850,7 +850,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -862,7 +862,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -875,7 +875,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -887,7 +887,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -899,7 +899,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -913,7 +913,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -927,7 +927,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -956,7 +956,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -989,7 +989,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1023,7 +1023,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1057,7 +1057,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body?: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body?: Order, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/order`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1101,7 +1101,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1113,7 +1113,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1126,7 +1126,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1139,7 +1139,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body?: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body?: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1212,7 +1212,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1223,7 +1223,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1235,7 +1235,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1247,7 +1247,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body?: Order, options?: AxiosRequestConfig) { + public placeOrder(body?: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1267,7 +1267,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1303,7 +1303,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1339,7 +1339,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1375,7 +1375,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1444,7 +1444,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1486,7 +1486,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1518,7 +1518,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1567,7 +1567,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1580,7 +1580,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1593,7 +1593,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1606,7 +1606,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1619,7 +1619,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1633,7 +1633,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1645,7 +1645,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1659,7 +1659,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1774,7 +1774,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1786,7 +1786,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1798,7 +1798,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1810,7 +1810,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1822,7 +1822,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1835,7 +1835,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1846,7 +1846,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1859,7 +1859,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts index 63f691b79e4f..ffdd77ed2e6e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts @@ -14,7 +14,7 @@ import type { Configuration } from '../../../configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -38,7 +38,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -79,7 +79,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -121,7 +121,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -163,7 +163,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -204,7 +204,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -241,7 +241,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -283,7 +283,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -335,7 +335,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -395,7 +395,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -409,7 +409,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -422,7 +422,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -436,7 +436,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -449,7 +449,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -462,7 +462,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -477,7 +477,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -492,7 +492,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -612,7 +612,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -625,7 +625,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -637,7 +637,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -650,7 +650,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -662,7 +662,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -674,7 +674,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -688,7 +688,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -702,7 +702,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts index c1bcc6be0fa2..e65822ad40eb 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts @@ -14,7 +14,7 @@ import type { Configuration } from '../../../configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -36,7 +36,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -69,7 +69,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -103,7 +103,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -137,7 +137,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -183,7 +183,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -195,7 +195,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -208,7 +208,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -221,7 +221,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -294,7 +294,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -305,7 +305,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -317,7 +317,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -329,7 +329,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts index a8d422b7a2cb..2840fefac7d4 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts @@ -14,7 +14,7 @@ import type { Configuration } from '../../../configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -36,7 +36,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -72,7 +72,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -108,7 +108,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -144,7 +144,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -178,7 +178,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -213,7 +213,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -255,7 +255,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -287,7 +287,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -336,7 +336,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -349,7 +349,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -362,7 +362,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -375,7 +375,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -388,7 +388,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -402,7 +402,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -414,7 +414,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -428,7 +428,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -543,7 +543,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -555,7 +555,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -567,7 +567,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -579,7 +579,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -591,7 +591,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -604,7 +604,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -615,7 +615,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -628,7 +628,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json index 25c34a0273ad..81cacb217244 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index b2d5f4574057..f74593fe5bb7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -833,7 +833,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -846,7 +846,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -858,7 +858,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -871,7 +871,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -883,7 +883,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -923,7 +923,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -952,7 +952,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1019,7 +1019,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1053,7 +1053,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1099,7 +1099,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1111,7 +1111,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1124,7 +1124,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1137,7 +1137,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1210,7 +1210,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1221,7 +1221,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1233,7 +1233,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1245,7 +1245,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1265,7 +1265,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1301,7 +1301,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1337,7 +1337,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1373,7 +1373,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1407,7 +1407,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1484,7 +1484,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1516,7 +1516,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1578,7 +1578,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1591,7 +1591,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1604,7 +1604,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1617,7 +1617,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1631,7 +1631,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1643,7 +1643,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1657,7 +1657,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1772,7 +1772,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1796,7 +1796,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1820,7 +1820,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1833,7 +1833,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1844,7 +1844,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1857,7 +1857,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json index 014e497001ad..1afa264fc3ca 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Unlicense", "dependencies": { - "axios": "^0.26.1" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", @@ -22,18 +22,44 @@ "integrity": "sha512-FW0q7NI8UnjbKrJK8NGr6QXY69ATw9IFe6ItIo5yozPwA9DU/xkhiPddctUVyrmFXvyFYerYgQak/qu200UBDw==", "dev": true }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dependencies": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" } }, "node_modules/follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "funding": [ { "type": "individual", @@ -49,6 +75,43 @@ } } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/typescript": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", @@ -70,18 +133,66 @@ "integrity": "sha512-FW0q7NI8UnjbKrJK8NGr6QXY69ATw9IFe6ItIo5yozPwA9DU/xkhiPddctUVyrmFXvyFYerYgQak/qu200UBDw==", "dev": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "requires": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "typescript": { "version": "4.6.3", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json index 25c34a0273ad..81cacb217244 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts index e3f256f0e68f..84cf6aa82227 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -975,7 +975,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(requestParameters: PetApiAddPetRequest, options?: AxiosRequestConfig) { + public addPet(requestParameters: PetApiAddPetRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -987,7 +987,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(requestParameters: PetApiDeletePetRequest, options?: AxiosRequestConfig) { + public deletePet(requestParameters: PetApiDeletePetRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(requestParameters.petId, requestParameters.apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -999,7 +999,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: AxiosRequestConfig) { + public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(requestParameters.status, options).then((request) => request(this.axios, this.basePath)); } @@ -1012,7 +1012,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: AxiosRequestConfig) { + public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(requestParameters.tags, options).then((request) => request(this.axios, this.basePath)); } @@ -1024,7 +1024,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: AxiosRequestConfig) { + public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(requestParameters.petId, options).then((request) => request(this.axios, this.basePath)); } @@ -1036,7 +1036,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(requestParameters: PetApiUpdatePetRequest, options?: AxiosRequestConfig) { + public updatePet(requestParameters: PetApiUpdatePetRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -1048,7 +1048,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: AxiosRequestConfig) { + public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(requestParameters.petId, requestParameters.name, requestParameters.status, options).then((request) => request(this.axios, this.basePath)); } @@ -1060,7 +1060,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(requestParameters: PetApiUploadFileRequest, options?: AxiosRequestConfig) { + public uploadFile(requestParameters: PetApiUploadFileRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(requestParameters.petId, requestParameters.additionalMetadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); } } @@ -1089,7 +1089,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1122,7 +1122,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1156,7 +1156,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1190,7 +1190,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body?: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body?: Order, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/order`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1234,7 +1234,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1246,7 +1246,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1259,7 +1259,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1272,7 +1272,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body?: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body?: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1387,7 +1387,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: AxiosRequestConfig) { + public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1398,7 +1398,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1410,7 +1410,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: AxiosRequestConfig) { + public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1422,7 +1422,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: AxiosRequestConfig) { + public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1478,7 +1478,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1514,7 +1514,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1550,7 +1550,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1584,7 +1584,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1619,7 +1619,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1661,7 +1661,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1693,7 +1693,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1742,7 +1742,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1755,7 +1755,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1768,7 +1768,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1781,7 +1781,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1794,7 +1794,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1808,7 +1808,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1820,7 +1820,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1834,7 +1834,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -2059,7 +2059,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(requestParameters: UserApiCreateUserRequest, options?: AxiosRequestConfig) { + public createUser(requestParameters: UserApiCreateUserRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2071,7 +2071,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2083,7 +2083,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: AxiosRequestConfig) { + public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2095,7 +2095,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: AxiosRequestConfig) { + public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); } @@ -2107,7 +2107,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: AxiosRequestConfig) { + public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); } @@ -2119,7 +2119,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(requestParameters: UserApiLoginUserRequest, options?: AxiosRequestConfig) { + public loginUser(requestParameters: UserApiLoginUserRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(requestParameters.username, requestParameters.password, options).then((request) => request(this.axios, this.basePath)); } @@ -2130,7 +2130,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -2142,7 +2142,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(requestParameters: UserApiUpdateUserRequest, options?: AxiosRequestConfig) { + public updateUser(requestParameters: UserApiUpdateUserRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(requestParameters.username, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts index 84ccb5088e6a..2742f3d7e273 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -263,7 +263,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -304,7 +304,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -346,7 +346,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -388,7 +388,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -429,7 +429,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -466,7 +466,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -508,7 +508,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -560,7 +560,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -620,7 +620,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -634,7 +634,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -647,7 +647,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -661,7 +661,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -674,7 +674,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -687,7 +687,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -702,7 +702,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -717,7 +717,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -837,7 +837,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -850,7 +850,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -862,7 +862,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -875,7 +875,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -887,7 +887,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -899,7 +899,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -913,7 +913,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -927,7 +927,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -956,7 +956,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -989,7 +989,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1023,7 +1023,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1057,7 +1057,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1103,7 +1103,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1115,7 +1115,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1128,7 +1128,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1141,7 +1141,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1214,7 +1214,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1225,7 +1225,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1237,7 +1237,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1249,7 +1249,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1269,7 +1269,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1305,7 +1305,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1341,7 +1341,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1377,7 +1377,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1411,7 +1411,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1446,7 +1446,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1488,7 +1488,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1520,7 +1520,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1569,7 +1569,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1582,7 +1582,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1595,7 +1595,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1608,7 +1608,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1621,7 +1621,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1635,7 +1635,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1647,7 +1647,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1661,7 +1661,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1776,7 +1776,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1788,7 +1788,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1800,7 +1800,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1812,7 +1812,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1824,7 +1824,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1837,7 +1837,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1848,7 +1848,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1861,7 +1861,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/tests/default/package-lock.json b/samples/client/petstore/typescript-axios/tests/default/package-lock.json index 24b2819d42bb..eb463a6465d4 100644 --- a/samples/client/petstore/typescript-axios/tests/default/package-lock.json +++ b/samples/client/petstore/typescript-axios/tests/default/package-lock.json @@ -10,16 +10,17 @@ "hasInstallScript": true, "license": "ISC", "dependencies": { - "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version", - "chai": "^4.2.0", - "ts-node": "^9.1.1" + "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version" }, "devDependencies": { "@types/chai": "^4.2.14", "@types/mocha": "^8.2.0", "@types/node": "^14.14.14", + "axios": "*", "browserify": "^17.0.0", + "chai": "^4.2.0", "mocha": "^8.2.1", + "ts-node": "^9.1.1", "typescript": "^4.1.2" } }, @@ -28,7 +29,7 @@ "version": "1.0.0", "license": "Unlicense", "dependencies": { - "axios": "^0.26.1" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", @@ -154,6 +155,7 @@ }, "node_modules/arg": { "version": "4.1.3", + "dev": true, "license": "MIT" }, "node_modules/argparse": { @@ -209,11 +211,18 @@ }, "node_modules/assertion-error": { "version": "1.1.0", + "dev": true, "license": "MIT", "engines": { "node": "*" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "node_modules/available-typed-arrays": { "version": "1.0.2", "dev": true, @@ -228,6 +237,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axios": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.0", "dev": true, @@ -452,6 +472,7 @@ }, "node_modules/buffer-from": { "version": "1.1.1", + "dev": true, "license": "MIT" }, "node_modules/buffer-xor": { @@ -483,6 +504,7 @@ }, "node_modules/chai": { "version": "4.2.0", + "dev": true, "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", @@ -513,6 +535,7 @@ }, "node_modules/check-error": { "version": "1.0.2", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -562,6 +585,18 @@ "node": ">=0.10.0" } }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, @@ -641,6 +676,7 @@ }, "node_modules/create-require": { "version": "1.1.1", + "dev": true, "license": "MIT" }, "node_modules/crypto-browserify": { @@ -695,6 +731,7 @@ }, "node_modules/deep-eql": { "version": "3.0.1", + "dev": true, "license": "MIT", "dependencies": { "type-detect": "^4.0.0" @@ -719,6 +756,15 @@ "dev": true, "license": "MIT" }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/deps-sort": { "version": "2.0.1", "dev": true, @@ -760,6 +806,7 @@ }, "node_modules/diff": { "version": "4.0.2", + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -930,11 +977,45 @@ "flat": "cli.js" } }, + "node_modules/follow-redirects": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreach": { "version": "2.0.5", "dev": true, "license": "MIT" }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "dev": true, @@ -960,6 +1041,7 @@ }, "node_modules/get-func-name": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -1384,6 +1466,7 @@ }, "node_modules/make-error": { "version": "1.3.6", + "dev": true, "license": "ISC" }, "node_modules/md5.js": { @@ -1413,6 +1496,27 @@ "dev": true, "license": "MIT" }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "dev": true, @@ -1964,6 +2068,7 @@ }, "node_modules/pathval": { "version": "1.1.0", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -2008,6 +2113,12 @@ "dev": true, "license": "MIT" }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/public-encrypt": { "version": "4.0.3", "dev": true, @@ -2214,6 +2325,7 @@ }, "node_modules/source-map": { "version": "0.6.1", + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -2221,6 +2333,7 @@ }, "node_modules/source-map-support": { "version": "0.5.19", + "dev": true, "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", @@ -2423,6 +2536,7 @@ }, "node_modules/ts-node": { "version": "9.1.1", + "dev": true, "license": "MIT", "dependencies": { "arg": "^4.1.0", @@ -2452,6 +2566,7 @@ }, "node_modules/type-detect": { "version": "4.0.8", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -2464,6 +2579,7 @@ }, "node_modules/typescript": { "version": "4.1.3", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -2721,6 +2837,7 @@ }, "node_modules/yn": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2743,7 +2860,7 @@ "version": "file:../../builds/with-npm-version", "requires": { "@types/node": "^12.11.5", - "axios": "^0.26.1", + "axios": "^1.6.1", "typescript": "^4.0" }, "dependencies": { @@ -2811,7 +2928,8 @@ } }, "arg": { - "version": "4.1.3" + "version": "4.1.3", + "dev": true }, "argparse": { "version": "1.0.10", @@ -2862,7 +2980,14 @@ } }, "assertion-error": { - "version": "1.1.0" + "version": "1.1.0", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, "available-typed-arrays": { "version": "1.0.2", @@ -2871,6 +2996,17 @@ "array-filter": "^1.0.0" } }, + "axios": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "dev": true, + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "balanced-match": { "version": "1.0.0", "dev": true @@ -3053,7 +3189,8 @@ } }, "buffer-from": { - "version": "1.1.1" + "version": "1.1.1", + "dev": true }, "buffer-xor": { "version": "1.0.3", @@ -3077,6 +3214,7 @@ }, "chai": { "version": "4.2.0", + "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", @@ -3095,7 +3233,8 @@ } }, "check-error": { - "version": "1.0.2" + "version": "1.0.2", + "dev": true }, "cipher-base": { "version": "1.0.4", @@ -3132,6 +3271,15 @@ } } }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, "concat-map": { "version": "0.0.1", "dev": true @@ -3200,7 +3348,8 @@ } }, "create-require": { - "version": "1.1.1" + "version": "1.1.1", + "dev": true }, "crypto-browserify": { "version": "3.12.0", @@ -3236,6 +3385,7 @@ }, "deep-eql": { "version": "3.0.1", + "dev": true, "requires": { "type-detect": "^4.0.0" } @@ -3251,6 +3401,12 @@ "version": "1.0.0", "dev": true }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, "deps-sort": { "version": "2.0.1", "dev": true, @@ -3279,7 +3435,8 @@ } }, "diff": { - "version": "4.0.2" + "version": "4.0.2", + "dev": true }, "diffie-hellman": { "version": "5.0.3", @@ -3393,10 +3550,27 @@ "version": "5.0.2", "dev": true }, + "follow-redirects": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "dev": true + }, "foreach": { "version": "2.0.5", "dev": true }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fs.realpath": { "version": "1.0.0", "dev": true @@ -3414,7 +3588,8 @@ "dev": true }, "get-func-name": { - "version": "2.0.0" + "version": "2.0.0", + "dev": true }, "get-intrinsic": { "version": "1.0.1", @@ -3668,7 +3843,8 @@ } }, "make-error": { - "version": "1.3.6" + "version": "1.3.6", + "dev": true }, "md5.js": { "version": "1.3.5", @@ -3693,6 +3869,21 @@ } } }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, "minimalistic-assert": { "version": "1.0.1", "dev": true @@ -4051,7 +4242,8 @@ "dev": true }, "pathval": { - "version": "1.1.0" + "version": "1.1.0", + "dev": true }, "pbkdf2": { "version": "3.1.1", @@ -4076,6 +4268,12 @@ "version": "2.0.1", "dev": true }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "public-encrypt": { "version": "4.0.3", "dev": true, @@ -4221,10 +4419,12 @@ "dev": true }, "source-map": { - "version": "0.6.1" + "version": "0.6.1", + "dev": true }, "source-map-support": { "version": "0.5.19", + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -4380,6 +4580,7 @@ }, "ts-node": { "version": "9.1.1", + "dev": true, "requires": { "arg": "^4.1.0", "create-require": "^1.1.0", @@ -4394,14 +4595,16 @@ "dev": true }, "type-detect": { - "version": "4.0.8" + "version": "4.0.8", + "dev": true }, "typedarray": { "version": "0.0.6", "dev": true }, "typescript": { - "version": "4.1.3" + "version": "4.1.3", + "dev": true }, "umd": { "version": "3.0.3", @@ -4580,7 +4783,8 @@ } }, "yn": { - "version": "3.1.1" + "version": "3.1.1", + "dev": true }, "yocto-queue": { "version": "0.1.0", diff --git a/samples/client/petstore/typescript-axios/tests/default/package.json b/samples/client/petstore/typescript-axios/tests/default/package.json index c723eabd6f38..88bc110e0270 100644 --- a/samples/client/petstore/typescript-axios/tests/default/package.json +++ b/samples/client/petstore/typescript-axios/tests/default/package.json @@ -1,12 +1,10 @@ { "private": true, "dependencies": { - "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version", - "chai": "^4.2.0", - "ts-node": "^9.1.1" + "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version" }, "scripts": { - "preinstall": "npm install ../../builds/with-npm-version && npm run build", + "preinstall": "npm --prefix ../../builds/with-npm-version install && npm run build", "test": "mocha test/*.ts --require ts-node/register --timeout 10000", "build": "tsc", "browserify": "browserify test -p [ tsify ] > ./dist/test.browserify-bundle.js" @@ -15,8 +13,11 @@ "@types/chai": "^4.2.14", "@types/mocha": "^8.2.0", "@types/node": "^14.14.14", + "axios": "*", "browserify": "^17.0.0", + "chai": "^4.2.0", "mocha": "^8.2.1", + "ts-node": "^9.1.1", "typescript": "^4.1.2" }, "name": "typescript-axios-test", diff --git a/samples/client/petstore/typescript-axios/tests/default/test/PetApi.ts b/samples/client/petstore/typescript-axios/tests/default/test/PetApi.ts index f052c4c47fb7..dabb4d9a4f4f 100644 --- a/samples/client/petstore/typescript-axios/tests/default/test/PetApi.ts +++ b/samples/client/petstore/typescript-axios/tests/default/test/PetApi.ts @@ -1,6 +1,6 @@ import { expect } from "chai"; import { PetApi, Pet, PetStatusEnum, Category } from "@openapitools/typescript-axios-petstore"; -import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios"; +import axios, {AxiosInstance, AxiosResponse} from "axios"; describe("PetApi", () => { function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void { diff --git a/samples/client/petstore/typescript-axios/tests/default/test/PetApiFactory.ts b/samples/client/petstore/typescript-axios/tests/default/test/PetApiFactory.ts index e51c3270e4c4..b4d602e28ce4 100644 --- a/samples/client/petstore/typescript-axios/tests/default/test/PetApiFactory.ts +++ b/samples/client/petstore/typescript-axios/tests/default/test/PetApiFactory.ts @@ -6,7 +6,7 @@ import { Category } from "@openapitools/typescript-axios-petstore"; import { Configuration } from "@openapitools/typescript-axios-petstore"; -import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios"; +import axios, {AxiosInstance, AxiosResponse} from "axios"; let config: Configuration; diff --git a/samples/client/petstore/typescript-axios/tests/default/test/StoreApi.ts b/samples/client/petstore/typescript-axios/tests/default/test/StoreApi.ts index 1aa120ca6e85..35137340fcab 100644 --- a/samples/client/petstore/typescript-axios/tests/default/test/StoreApi.ts +++ b/samples/client/petstore/typescript-axios/tests/default/test/StoreApi.ts @@ -1,6 +1,6 @@ import { expect } from "chai"; import { StoreApi } from "@openapitools/typescript-axios-petstore"; -import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios"; +import axios, {AxiosInstance, AxiosResponse} from "axios"; describe("StoreApi", function() { function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void { diff --git a/samples/client/petstore/typescript-axios/tests/default/test/StoreApiFactory.ts b/samples/client/petstore/typescript-axios/tests/default/test/StoreApiFactory.ts index da87526f4e29..17e8f6766c9c 100644 --- a/samples/client/petstore/typescript-axios/tests/default/test/StoreApiFactory.ts +++ b/samples/client/petstore/typescript-axios/tests/default/test/StoreApiFactory.ts @@ -1,7 +1,7 @@ import { expect } from "chai"; import { StoreApiFactory } from "@openapitools/typescript-axios-petstore"; import { Configuration } from "@openapitools/typescript-axios-petstore"; -import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios"; +import axios, {AxiosInstance, AxiosResponse} from "axios"; let config: Configuration; diff --git a/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES index 00dc818606f1..1ef5f596fa14 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES @@ -84,6 +84,8 @@ docs/SpecialModelName.md docs/SpecialName.md docs/StoreApi.md docs/Tag.md +docs/TestErrorResponsesWithModel400Response.md +docs/TestErrorResponsesWithModel404Response.md docs/TestInlineFreeformAdditionalPropertiesRequest.md docs/Tiger.md docs/UnnamedDictWithAdditionalModelListProperties.md @@ -181,6 +183,8 @@ petstore_api/models/special_character_enum.py petstore_api/models/special_model_name.py petstore_api/models/special_name.py petstore_api/models/tag.py +petstore_api/models/test_error_responses_with_model400_response.py +petstore_api/models/test_error_responses_with_model404_response.py petstore_api/models/test_inline_freeform_additional_properties_request.py petstore_api/models/tiger.py petstore_api/models/unnamed_dict_with_additional_model_list_properties.py diff --git a/samples/openapi3/client/petstore/python-aiohttp/README.md b/samples/openapi3/client/petstore/python-aiohttp/README.md index 88ea04ad16ef..6784ec797ec2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/README.md +++ b/samples/openapi3/client/petstore/python-aiohttp/README.md @@ -103,7 +103,9 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_date_time_query_parameter**](docs/FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params | +*FakeApi* | [**test_empty_and_non_empty_responses**](docs/FakeApi.md#test_empty_and_non_empty_responses) | **POST** /fake/empty_and_non_empty_responses | test empty and non-empty responses *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_error_responses_with_model**](docs/FakeApi.md#test_error_responses_with_model) | **POST** /fake/error_responses_with_model | test error responses with model *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**test_inline_freeform_additional_properties**](docs/FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties @@ -210,6 +212,8 @@ Class | Method | HTTP request | Description - [SpecialModelName](docs/SpecialModelName.md) - [SpecialName](docs/SpecialName.md) - [Tag](docs/Tag.md) + - [TestErrorResponsesWithModel400Response](docs/TestErrorResponsesWithModel400Response.md) + - [TestErrorResponsesWithModel404Response](docs/TestErrorResponsesWithModel404Response.md) - [TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md) - [Tiger](docs/Tiger.md) - [UnnamedDictWithAdditionalModelListProperties](docs/UnnamedDictWithAdditionalModelListProperties.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md b/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md index 5ffe9b3f068d..fccd1bb90b6b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/FakeApi.md @@ -20,7 +20,9 @@ Method | HTTP request | Description [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_date_time_query_parameter**](FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params | +[**test_empty_and_non_empty_responses**](FakeApi.md#test_empty_and_non_empty_responses) | **POST** /fake/empty_and_non_empty_responses | test empty and non-empty responses [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_error_responses_with_model**](FakeApi.md#test_error_responses_with_model) | **POST** /fake/error_responses_with_model | test error responses with model [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_inline_freeform_additional_properties**](FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties @@ -1119,6 +1121,67 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_empty_and_non_empty_responses** +> test_empty_and_non_empty_responses() + +test empty and non-empty responses + + + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# Enter a context with an instance of the API client +async with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test empty and non-empty responses + await api_instance.test_empty_and_non_empty_responses() + except Exception as e: + print("Exception when calling FakeApi->test_empty_and_non_empty_responses: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success, but no response content | - | +**206** | Partial response content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_endpoint_parameters** > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, var_float=var_float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback) @@ -1223,6 +1286,66 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_error_responses_with_model** +> test_error_responses_with_model() + +test error responses with model + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# Enter a context with an instance of the API client +async with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test error responses with model + await api_instance.test_error_responses_with_model() + except Exception as e: + print("Exception when calling FakeApi->test_error_responses_with_model: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success, but no response content | - | +**400** | | - | +**404** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_group_parameters** > test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel400Response.md b/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel400Response.md new file mode 100644 index 000000000000..1ef43ce4cadc --- /dev/null +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel400Response.md @@ -0,0 +1,28 @@ +# TestErrorResponsesWithModel400Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason400** | **str** | | [optional] + +## Example + +```python +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TestErrorResponsesWithModel400Response from a JSON string +test_error_responses_with_model400_response_instance = TestErrorResponsesWithModel400Response.from_json(json) +# print the JSON string representation of the object +print TestErrorResponsesWithModel400Response.to_json() + +# convert the object into a dict +test_error_responses_with_model400_response_dict = test_error_responses_with_model400_response_instance.to_dict() +# create an instance of TestErrorResponsesWithModel400Response from a dict +test_error_responses_with_model400_response_form_dict = test_error_responses_with_model400_response.from_dict(test_error_responses_with_model400_response_dict) +``` +[[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/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel404Response.md b/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel404Response.md new file mode 100644 index 000000000000..9fda95537846 --- /dev/null +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/TestErrorResponsesWithModel404Response.md @@ -0,0 +1,28 @@ +# TestErrorResponsesWithModel404Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason404** | **str** | | [optional] + +## Example + +```python +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TestErrorResponsesWithModel404Response from a JSON string +test_error_responses_with_model404_response_instance = TestErrorResponsesWithModel404Response.from_json(json) +# print the JSON string representation of the object +print TestErrorResponsesWithModel404Response.to_json() + +# convert the object into a dict +test_error_responses_with_model404_response_dict = test_error_responses_with_model404_response_instance.to_dict() +# create an instance of TestErrorResponsesWithModel404Response from a dict +test_error_responses_with_model404_response_form_dict = test_error_responses_with_model404_response.from_dict(test_error_responses_with_model404_response_dict) +``` +[[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/openapi3/client/petstore/python-aiohttp/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/__init__.py index c1c56eb81159..72d39b9c55e6 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/__init__.py @@ -113,6 +113,8 @@ from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.special_name import SpecialName from petstore_api.models.tag import Tag +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest from petstore_api.models.tiger import Tiger from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py index ceb2d82b167a..249d397b9d2a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py @@ -99,8 +99,7 @@ async def call_123_test_special_tags( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, @@ -167,8 +166,7 @@ async def call_123_test_special_tags_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, @@ -235,8 +233,7 @@ async def call_123_test_special_tags_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py index e205376f0194..401f2118d92c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py @@ -92,8 +92,6 @@ async def foo_get( ) _response_types_map: Dict[str, Optional[str]] = { - - } response_data = await self.api_client.call_api( *_param, @@ -155,8 +153,6 @@ async def foo_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - - } response_data = await self.api_client.call_api( *_param, @@ -218,8 +214,6 @@ async def foo_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - - } response_data = await self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py index eb4df7fca8d2..22172e4627f7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py @@ -113,7 +113,7 @@ async def fake_any_type_request_body( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -179,7 +179,7 @@ async def fake_any_type_request_body_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -245,7 +245,7 @@ async def fake_any_type_request_body_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -375,7 +375,7 @@ async def fake_enum_ref_query_parameter( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -441,7 +441,7 @@ async def fake_enum_ref_query_parameter_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -507,7 +507,7 @@ async def fake_enum_ref_query_parameter_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -622,8 +622,7 @@ async def fake_health_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheckResult" - + '200': "HealthCheckResult", } response_data = await self.api_client.call_api( *_param, @@ -685,8 +684,7 @@ async def fake_health_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheckResult" - + '200': "HealthCheckResult", } response_data = await self.api_client.call_api( *_param, @@ -748,8 +746,7 @@ async def fake_health_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheckResult" - + '200': "HealthCheckResult", } response_data = await self.api_client.call_api( *_param, @@ -877,7 +874,7 @@ async def fake_http_signature_test( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -951,7 +948,7 @@ async def fake_http_signature_test_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -1025,7 +1022,7 @@ async def fake_http_signature_test_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -1166,8 +1163,7 @@ async def fake_outer_boolean_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bool" - + '200': "bool", } response_data = await self.api_client.call_api( *_param, @@ -1234,8 +1230,7 @@ async def fake_outer_boolean_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bool" - + '200': "bool", } response_data = await self.api_client.call_api( *_param, @@ -1302,8 +1297,7 @@ async def fake_outer_boolean_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bool" - + '200': "bool", } response_data = await self.api_client.call_api( *_param, @@ -1440,8 +1434,7 @@ async def fake_outer_composite_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterComposite" - + '200': "OuterComposite", } response_data = await self.api_client.call_api( *_param, @@ -1508,8 +1501,7 @@ async def fake_outer_composite_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterComposite" - + '200': "OuterComposite", } response_data = await self.api_client.call_api( *_param, @@ -1576,8 +1568,7 @@ async def fake_outer_composite_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterComposite" - + '200': "OuterComposite", } response_data = await self.api_client.call_api( *_param, @@ -1714,8 +1705,7 @@ async def fake_outer_number_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "float" - + '200': "float", } response_data = await self.api_client.call_api( *_param, @@ -1782,8 +1772,7 @@ async def fake_outer_number_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "float" - + '200': "float", } response_data = await self.api_client.call_api( *_param, @@ -1850,8 +1839,7 @@ async def fake_outer_number_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "float" - + '200': "float", } response_data = await self.api_client.call_api( *_param, @@ -1988,8 +1976,7 @@ async def fake_outer_string_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = await self.api_client.call_api( *_param, @@ -2056,8 +2043,7 @@ async def fake_outer_string_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = await self.api_client.call_api( *_param, @@ -2124,8 +2110,7 @@ async def fake_outer_string_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = await self.api_client.call_api( *_param, @@ -2262,8 +2247,7 @@ async def fake_property_enum_integer_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterObjectWithEnumProperty" - + '200': "OuterObjectWithEnumProperty", } response_data = await self.api_client.call_api( *_param, @@ -2330,8 +2314,7 @@ async def fake_property_enum_integer_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterObjectWithEnumProperty" - + '200': "OuterObjectWithEnumProperty", } response_data = await self.api_client.call_api( *_param, @@ -2398,8 +2381,7 @@ async def fake_property_enum_integer_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterObjectWithEnumProperty" - + '200': "OuterObjectWithEnumProperty", } response_data = await self.api_client.call_api( *_param, @@ -2531,8 +2513,7 @@ async def fake_return_list_of_objects( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[List[Tag]]" - + '200': "List[List[Tag]]", } response_data = await self.api_client.call_api( *_param, @@ -2594,8 +2575,7 @@ async def fake_return_list_of_objects_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[List[Tag]]" - + '200': "List[List[Tag]]", } response_data = await self.api_client.call_api( *_param, @@ -2657,8 +2637,7 @@ async def fake_return_list_of_objects_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[List[Tag]]" - + '200': "List[List[Tag]]", } response_data = await self.api_client.call_api( *_param, @@ -2778,7 +2757,7 @@ async def fake_uuid_example( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -2844,7 +2823,7 @@ async def fake_uuid_example_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -2910,7 +2889,7 @@ async def fake_uuid_example_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3030,7 +3009,7 @@ async def test_body_with_binary( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3097,7 +3076,7 @@ async def test_body_with_binary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3164,7 +3143,7 @@ async def test_body_with_binary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3300,7 +3279,7 @@ async def test_body_with_file_schema( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3367,7 +3346,7 @@ async def test_body_with_file_schema_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3434,7 +3413,7 @@ async def test_body_with_file_schema_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3568,7 +3547,7 @@ async def test_body_with_query_params( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3638,7 +3617,7 @@ async def test_body_with_query_params_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3708,7 +3687,7 @@ async def test_body_with_query_params_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -3844,8 +3823,7 @@ async def test_client_model( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, @@ -3912,8 +3890,7 @@ async def test_client_model_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, @@ -3980,8 +3957,7 @@ async def test_client_model_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, @@ -4121,7 +4097,7 @@ async def test_date_time_query_parameter( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -4191,7 +4167,7 @@ async def test_date_time_query_parameter_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -4261,7 +4237,7 @@ async def test_date_time_query_parameter_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -4342,23 +4318,8 @@ def _test_date_time_query_parameter_serialize( @validate_call - async def test_endpoint_parameters( + async def test_empty_and_non_empty_responses( self, - number: Annotated[float, Field(le=543.2, ge=32.1, description="None")], - double: Annotated[float, Field(le=123.4, ge=67.8, description="None")], - pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], - byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], - integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, - int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, - int64: Annotated[Optional[StrictInt], Field(description="None")] = None, - var_float: Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, - string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, - binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, - byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, - var_date: Annotated[Optional[date], Field(description="None")] = None, - date_time: Annotated[Optional[datetime], Field(description="None")] = None, - password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, - param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4372,40 +4333,10 @@ async def test_endpoint_parameters( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + """test empty and non-empty responses - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - :param number: None (required) - :type number: float - :param double: None (required) - :type double: float - :param pattern_without_delimiter: None (required) - :type pattern_without_delimiter: str - :param byte: None (required) - :type byte: bytearray - :param integer: None - :type integer: int - :param int32: None - :type int32: int - :param int64: None - :type int64: int - :param var_float: None - :type var_float: float - :param string: None - :type string: str - :param binary: None - :type binary: bytearray - :param byte_with_max_length: None - :type byte_with_max_length: bytearray - :param var_date: None - :type var_date: date - :param date_time: None - :type date_time: datetime - :param password: None - :type password: str - :param param_callback: None - :type param_callback: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4428,22 +4359,7 @@ async def test_endpoint_parameters( :return: Returns the result object. """ # noqa: E501 - _param = self._test_endpoint_parameters_serialize( - number=number, - double=double, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, - integer=integer, - int32=int32, - int64=int64, - var_float=var_float, - string=string, - binary=binary, - byte_with_max_length=byte_with_max_length, - var_date=var_date, - date_time=date_time, - password=password, - param_callback=param_callback, + _param = self._test_empty_and_non_empty_responses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4451,7 +4367,8 @@ async def test_endpoint_parameters( ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '206': "str", } response_data = await self.api_client.call_api( *_param, @@ -4465,23 +4382,8 @@ async def test_endpoint_parameters( @validate_call - async def test_endpoint_parameters_with_http_info( + async def test_empty_and_non_empty_responses_with_http_info( self, - number: Annotated[float, Field(le=543.2, ge=32.1, description="None")], - double: Annotated[float, Field(le=123.4, ge=67.8, description="None")], - pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], - byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], - integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, - int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, - int64: Annotated[Optional[StrictInt], Field(description="None")] = None, - var_float: Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, - string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, - binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, - byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, - var_date: Annotated[Optional[date], Field(description="None")] = None, - date_time: Annotated[Optional[datetime], Field(description="None")] = None, - password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, - param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4495,40 +4397,10 @@ async def test_endpoint_parameters_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + """test empty and non-empty responses - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - :param number: None (required) - :type number: float - :param double: None (required) - :type double: float - :param pattern_without_delimiter: None (required) - :type pattern_without_delimiter: str - :param byte: None (required) - :type byte: bytearray - :param integer: None - :type integer: int - :param int32: None - :type int32: int - :param int64: None - :type int64: int - :param var_float: None - :type var_float: float - :param string: None - :type string: str - :param binary: None - :type binary: bytearray - :param byte_with_max_length: None - :type byte_with_max_length: bytearray - :param var_date: None - :type var_date: date - :param date_time: None - :type date_time: datetime - :param password: None - :type password: str - :param param_callback: None - :type param_callback: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4551,22 +4423,7 @@ async def test_endpoint_parameters_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._test_endpoint_parameters_serialize( - number=number, - double=double, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, - integer=integer, - int32=int32, - int64=int64, - var_float=var_float, - string=string, - binary=binary, - byte_with_max_length=byte_with_max_length, - var_date=var_date, - date_time=date_time, - password=password, - param_callback=param_callback, + _param = self._test_empty_and_non_empty_responses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4574,7 +4431,8 @@ async def test_endpoint_parameters_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '206': "str", } response_data = await self.api_client.call_api( *_param, @@ -4588,23 +4446,8 @@ async def test_endpoint_parameters_with_http_info( @validate_call - async def test_endpoint_parameters_without_preload_content( + async def test_empty_and_non_empty_responses_without_preload_content( self, - number: Annotated[float, Field(le=543.2, ge=32.1, description="None")], - double: Annotated[float, Field(le=123.4, ge=67.8, description="None")], - pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], - byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], - integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, - int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, - int64: Annotated[Optional[StrictInt], Field(description="None")] = None, - var_float: Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, - string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, - binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, - byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, - var_date: Annotated[Optional[date], Field(description="None")] = None, - date_time: Annotated[Optional[datetime], Field(description="None")] = None, - password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, - param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4618,40 +4461,10 @@ async def test_endpoint_parameters_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + """test empty and non-empty responses - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - :param number: None (required) - :type number: float - :param double: None (required) - :type double: float - :param pattern_without_delimiter: None (required) - :type pattern_without_delimiter: str - :param byte: None (required) - :type byte: bytearray - :param integer: None - :type integer: int - :param int32: None - :type int32: int - :param int64: None - :type int64: int - :param var_float: None - :type var_float: float - :param string: None - :type string: str - :param binary: None - :type binary: bytearray - :param byte_with_max_length: None - :type byte_with_max_length: bytearray - :param var_date: None - :type var_date: date - :param date_time: None - :type date_time: datetime - :param password: None - :type password: str - :param param_callback: None - :type param_callback: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4674,22 +4487,7 @@ async def test_endpoint_parameters_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._test_endpoint_parameters_serialize( - number=number, - double=double, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, - integer=integer, - int32=int32, - int64=int64, - var_float=var_float, - string=string, - binary=binary, - byte_with_max_length=byte_with_max_length, - var_date=var_date, - date_time=date_time, - password=password, - param_callback=param_callback, + _param = self._test_empty_and_non_empty_responses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4697,7 +4495,8 @@ async def test_endpoint_parameters_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '206': "str", } response_data = await self.api_client.call_api( *_param, @@ -4706,17 +4505,443 @@ async def test_endpoint_parameters_without_preload_content( return response_data.response - def _test_endpoint_parameters_serialize( + def _test_empty_and_non_empty_responses_serialize( self, - number, - double, - pattern_without_delimiter, - byte, - integer, - int32, - int64, - var_float, - string, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/fake/empty_and_non_empty_responses', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def test_endpoint_parameters( + self, + number: Annotated[float, Field(le=543.2, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + :param number: None (required) + :type number: float + :param double: None (required) + :type double: float + :param pattern_without_delimiter: None (required) + :type pattern_without_delimiter: str + :param byte: None (required) + :type byte: bytearray + :param integer: None + :type integer: int + :param int32: None + :type int32: int + :param int64: None + :type int64: int + :param var_float: None + :type var_float: float + :param string: None + :type string: str + :param binary: None + :type binary: bytearray + :param byte_with_max_length: None + :type byte_with_max_length: bytearray + :param var_date: None + :type var_date: date + :param date_time: None + :type date_time: datetime + :param password: None + :type password: str + :param param_callback: None + :type param_callback: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_endpoint_parameters_serialize( + number=number, + double=double, + pattern_without_delimiter=pattern_without_delimiter, + byte=byte, + integer=integer, + int32=int32, + int64=int64, + var_float=var_float, + string=string, + binary=binary, + byte_with_max_length=byte_with_max_length, + var_date=var_date, + date_time=date_time, + password=password, + param_callback=param_callback, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': None, + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def test_endpoint_parameters_with_http_info( + self, + number: Annotated[float, Field(le=543.2, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + :param number: None (required) + :type number: float + :param double: None (required) + :type double: float + :param pattern_without_delimiter: None (required) + :type pattern_without_delimiter: str + :param byte: None (required) + :type byte: bytearray + :param integer: None + :type integer: int + :param int32: None + :type int32: int + :param int64: None + :type int64: int + :param var_float: None + :type var_float: float + :param string: None + :type string: str + :param binary: None + :type binary: bytearray + :param byte_with_max_length: None + :type byte_with_max_length: bytearray + :param var_date: None + :type var_date: date + :param date_time: None + :type date_time: datetime + :param password: None + :type password: str + :param param_callback: None + :type param_callback: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_endpoint_parameters_serialize( + number=number, + double=double, + pattern_without_delimiter=pattern_without_delimiter, + byte=byte, + integer=integer, + int32=int32, + int64=int64, + var_float=var_float, + string=string, + binary=binary, + byte_with_max_length=byte_with_max_length, + var_date=var_date, + date_time=date_time, + password=password, + param_callback=param_callback, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': None, + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def test_endpoint_parameters_without_preload_content( + self, + number: Annotated[float, Field(le=543.2, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + :param number: None (required) + :type number: float + :param double: None (required) + :type double: float + :param pattern_without_delimiter: None (required) + :type pattern_without_delimiter: str + :param byte: None (required) + :type byte: bytearray + :param integer: None + :type integer: int + :param int32: None + :type int32: int + :param int64: None + :type int64: int + :param var_float: None + :type var_float: float + :param string: None + :type string: str + :param binary: None + :type binary: bytearray + :param byte_with_max_length: None + :type byte_with_max_length: bytearray + :param var_date: None + :type var_date: date + :param date_time: None + :type date_time: datetime + :param password: None + :type password: str + :param param_callback: None + :type param_callback: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_endpoint_parameters_serialize( + number=number, + double=double, + pattern_without_delimiter=pattern_without_delimiter, + byte=byte, + integer=integer, + int32=int32, + int64=int64, + var_float=var_float, + string=string, + binary=binary, + byte_with_max_length=byte_with_max_length, + var_date=var_date, + date_time=date_time, + password=password, + param_callback=param_callback, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': None, + '404': None, + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_endpoint_parameters_serialize( + self, + number, + double, + pattern_without_delimiter, + byte, + integer, + int32, + int64, + var_float, + string, binary, byte_with_max_length, var_date, @@ -4817,6 +5042,252 @@ def _test_endpoint_parameters_serialize( + @validate_call + async def test_error_responses_with_model( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """test error responses with model + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_error_responses_with_model_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "TestErrorResponsesWithModel400Response", + '404': "TestErrorResponsesWithModel404Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def test_error_responses_with_model_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """test error responses with model + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_error_responses_with_model_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "TestErrorResponsesWithModel400Response", + '404': "TestErrorResponsesWithModel404Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def test_error_responses_with_model_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """test error responses with model + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_error_responses_with_model_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "TestErrorResponsesWithModel400Response", + '404': "TestErrorResponsesWithModel404Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_error_responses_with_model_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/fake/error_responses_with_model', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call async def test_group_parameters( self, @@ -4891,7 +5362,7 @@ async def test_group_parameters( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -4978,7 +5449,7 @@ async def test_group_parameters_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -5065,7 +5536,7 @@ async def test_group_parameters_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -5207,7 +5678,7 @@ async def test_inline_additional_properties( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -5274,7 +5745,7 @@ async def test_inline_additional_properties_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -5341,7 +5812,7 @@ async def test_inline_additional_properties_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -5472,7 +5943,7 @@ async def test_inline_freeform_additional_properties( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -5539,7 +6010,7 @@ async def test_inline_freeform_additional_properties_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -5606,7 +6077,7 @@ async def test_inline_freeform_additional_properties_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -5741,7 +6212,7 @@ async def test_json_form_data( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -5812,7 +6283,7 @@ async def test_json_form_data_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -5883,7 +6354,7 @@ async def test_json_form_data_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -6041,7 +6512,7 @@ async def test_query_parameter_collection_format( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -6132,7 +6603,7 @@ async def test_query_parameter_collection_format_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, @@ -6223,7 +6694,7 @@ async def test_query_parameter_collection_format_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = await self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py index a2554d13803c..eb627e7defbc 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py @@ -99,8 +99,7 @@ async def test_classname( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, @@ -167,8 +166,7 @@ async def test_classname_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, @@ -235,8 +233,7 @@ async def test_classname_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = await self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py index 59a23ece328b..e6130a864c12 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py @@ -104,7 +104,8 @@ async def add_pet( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -171,7 +172,8 @@ async def add_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -238,7 +240,8 @@ async def add_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -376,7 +379,8 @@ async def delete_pet( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -447,7 +451,8 @@ async def delete_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -518,7 +523,8 @@ async def delete_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -641,8 +647,7 @@ async def find_pets_by_status( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -710,8 +715,7 @@ async def find_pets_by_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -779,8 +783,7 @@ async def find_pets_by_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -912,8 +915,7 @@ async def find_pets_by_tags( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -982,8 +984,7 @@ async def find_pets_by_tags_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -1052,8 +1053,7 @@ async def find_pets_by_tags_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -1185,8 +1185,7 @@ async def get_pet_by_id( _response_types_map: Dict[str, Optional[str]] = { '200': "Pet", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -1255,8 +1254,7 @@ async def get_pet_by_id_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Pet", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -1325,8 +1323,7 @@ async def get_pet_by_id_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Pet", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -1452,7 +1449,10 @@ async def update_pet( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, + '404': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -1519,7 +1519,10 @@ async def update_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, + '404': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -1586,7 +1589,10 @@ async def update_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, + '404': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -1728,7 +1734,8 @@ async def update_pet_with_form( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -1803,7 +1810,8 @@ async def update_pet_with_form_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -1878,7 +1886,8 @@ async def update_pet_with_form_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = await self.api_client.call_api( *_param, @@ -2024,8 +2033,7 @@ async def upload_file( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = await self.api_client.call_api( *_param, @@ -2100,8 +2108,7 @@ async def upload_file_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = await self.api_client.call_api( *_param, @@ -2176,8 +2183,7 @@ async def upload_file_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = await self.api_client.call_api( *_param, @@ -2329,8 +2335,7 @@ async def upload_file_with_required_file( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = await self.api_client.call_api( *_param, @@ -2405,8 +2410,7 @@ async def upload_file_with_required_file_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = await self.api_client.call_api( *_param, @@ -2481,8 +2485,7 @@ async def upload_file_with_required_file_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = await self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py index fd878851fe4a..a06aa360e482 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py @@ -103,7 +103,8 @@ async def delete_order( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -170,7 +171,8 @@ async def delete_order_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -237,7 +239,8 @@ async def delete_order_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -351,8 +354,7 @@ async def get_inventory( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, int]" - + '200': "Dict[str, int]", } response_data = await self.api_client.call_api( *_param, @@ -415,8 +417,7 @@ async def get_inventory_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, int]" - + '200': "Dict[str, int]", } response_data = await self.api_client.call_api( *_param, @@ -479,8 +480,7 @@ async def get_inventory_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, int]" - + '200': "Dict[str, int]", } response_data = await self.api_client.call_api( *_param, @@ -604,8 +604,7 @@ async def get_order_by_id( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -674,8 +673,7 @@ async def get_order_by_id_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -744,8 +742,7 @@ async def get_order_by_id_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -871,8 +868,7 @@ async def place_order( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -940,8 +936,7 @@ async def place_order_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -1009,8 +1004,7 @@ async def place_order_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py index f8728def22ba..679a1a9a9b95 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py @@ -103,7 +103,6 @@ async def create_user( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -170,7 +169,6 @@ async def create_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -237,7 +235,6 @@ async def create_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -373,7 +370,6 @@ async def create_users_with_array_input( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -440,7 +436,6 @@ async def create_users_with_array_input_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -507,7 +502,6 @@ async def create_users_with_array_input_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -639,7 +633,6 @@ async def create_users_with_list_input( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -706,7 +699,6 @@ async def create_users_with_list_input_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -773,7 +765,6 @@ async def create_users_with_list_input_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -905,7 +896,8 @@ async def delete_user( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -972,7 +964,8 @@ async def delete_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -1039,7 +1032,8 @@ async def delete_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -1159,8 +1153,7 @@ async def get_user_by_name( _response_types_map: Dict[str, Optional[str]] = { '200': "User", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -1229,8 +1222,7 @@ async def get_user_by_name_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "User", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -1299,8 +1291,7 @@ async def get_user_by_name_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "User", '400': None, - '404': None - + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -1430,8 +1421,7 @@ async def login_user( _response_types_map: Dict[str, Optional[str]] = { '200': "str", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -1503,8 +1493,7 @@ async def login_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "str", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -1576,8 +1565,7 @@ async def login_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "str", - '400': None - + '400': None, } response_data = await self.api_client.call_api( *_param, @@ -1705,7 +1693,6 @@ async def logout_user( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -1768,7 +1755,6 @@ async def logout_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -1831,7 +1817,6 @@ async def logout_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = await self.api_client.call_api( *_param, @@ -1950,7 +1935,8 @@ async def update_user( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -2021,7 +2007,8 @@ async def update_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, @@ -2092,7 +2079,8 @@ async def update_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = await self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py index fa4caabb835c..fe0b6e141bfb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py @@ -284,7 +284,7 @@ async def call_api( def response_deserialize( self, - response_data=None, + response_data: rest.RESTResponse = None, response_types_map=None ) -> ApiResponse: """Deserializes response into an object. @@ -299,39 +299,29 @@ def response_deserialize( # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) return ApiResponse( status_code = response_data.status, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/exceptions.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/exceptions.py index ab74ce953c72..363d0d9f8744 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/exceptions.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/exceptions.py @@ -11,6 +11,9 @@ Do not edit the class manually. """ # noqa: E501 +from typing import Any, Optional + +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -101,17 +104,56 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" @@ -121,38 +163,30 @@ def __str__(self): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message + class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/__init__.py index dd9388d355da..c106409daa97 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/__init__.py @@ -89,6 +89,8 @@ from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.special_name import SpecialName from petstore_api.models.tag import Tag +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest from petstore_api.models.tiger import Tiger from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_any_type.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_any_type.py index 734a02cf2320..2ce4d17e9577 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_any_type.py @@ -35,7 +35,8 @@ class AdditionalPropertiesAnyType(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_class.py index 1eb1782ef73a..89990769e8bb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_class.py @@ -35,7 +35,8 @@ class AdditionalPropertiesClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_object.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_object.py index a201dfca2333..6d6fd8daf5f1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_object.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_object.py @@ -35,7 +35,8 @@ class AdditionalPropertiesObject(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_with_description_only.py index d9275b941610..9a41a8257f1b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_with_description_only.py @@ -35,7 +35,8 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/all_of_with_single_ref.py index 917d79c32cfc..5113e44ff6b6 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/all_of_with_single_ref.py @@ -37,7 +37,8 @@ class AllOfWithSingleRef(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/animal.py index fe213c1e1a26..7fbe4d9e3784 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/animal.py @@ -36,7 +36,8 @@ class Animal(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py index 15b9eefd670e..7e8e6976ebc8 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py @@ -50,7 +50,8 @@ class AnyOfColor(BaseModel): any_of_schemas: List[str] = Literal[ANYOFCOLOR_ANY_OF_SCHEMAS] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } def __init__(self, *args, **kwargs) -> None: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py index be2f65a242ec..4abe31fc06fc 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py @@ -48,7 +48,8 @@ class AnyOfPig(BaseModel): any_of_schemas: List[str] = Literal[ANYOFPIG_ANY_OF_SCHEMAS] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } def __init__(self, *args, **kwargs) -> None: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/api_response.py index 9a8cee04ef71..e358f2a5fdb2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/api_response.py @@ -36,7 +36,8 @@ class ApiResponse(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_model.py index f28e28434f05..de1c55eb1ac5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_model.py @@ -35,7 +35,8 @@ class ArrayOfArrayOfModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_number_only.py index 9107d863c8da..c1817cdf4f16 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_number_only.py @@ -35,7 +35,8 @@ class ArrayOfArrayOfNumberOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_number_only.py index d95e38a48c58..653279be0ad3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_number_only.py @@ -35,7 +35,8 @@ class ArrayOfNumberOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py index cad7b9bb8c46..51ea20fca905 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py @@ -39,7 +39,8 @@ class ArrayTest(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/basque_pig.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/basque_pig.py index d4686b03907c..9f53a04d9f15 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/basque_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/basque_pig.py @@ -36,7 +36,8 @@ class BasquePig(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/capitalization.py index 0fa1b87152ec..d5499384d475 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/capitalization.py @@ -40,7 +40,8 @@ class Capitalization(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat.py index 6b94a1c51dd9..01dcacf9ca4e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat.py @@ -35,7 +35,8 @@ class Cat(Animal): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/category.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/category.py index 547c9bfed8a4..5d7c648d5fb1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/category.py @@ -35,7 +35,8 @@ class Category(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/circular_reference_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/circular_reference_model.py index 8176d68569fd..6ce8fec888c6 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/circular_reference_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/circular_reference_model.py @@ -35,7 +35,8 @@ class CircularReferenceModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/class_model.py index 5441a2bf38c2..633147cd5bdb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/class_model.py @@ -35,7 +35,8 @@ class ClassModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/client.py index 7102fe6b20e7..5f516b120ec4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/client.py @@ -34,7 +34,8 @@ class Client(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py index 287542b1f82a..638d942a34e7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py @@ -46,7 +46,8 @@ class Color(BaseModel): one_of_schemas: List[str] = Literal["List[int]", "str"] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature.py index 192544a69803..4c868095a25b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature.py @@ -36,7 +36,8 @@ class Creature(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature_info.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature_info.py index 2cd50790070d..3b80ab51ae8b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature_info.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature_info.py @@ -34,7 +34,8 @@ class CreatureInfo(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/danish_pig.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/danish_pig.py index 200ddb79009d..0dd8bfb9b0a6 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/danish_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/danish_pig.py @@ -36,7 +36,8 @@ class DanishPig(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/deprecated_object.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/deprecated_object.py index de0839d71d64..6d0e0f1a892d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/deprecated_object.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/deprecated_object.py @@ -34,7 +34,8 @@ class DeprecatedObject(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog.py index 586d25419bea..9c491abfe3c2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog.py @@ -35,7 +35,8 @@ class Dog(Animal): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dummy_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dummy_model.py index 288287f975f9..ed7b3c13f9d9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dummy_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dummy_model.py @@ -35,7 +35,8 @@ class DummyModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_arrays.py index 173657390145..b6e22b939326 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_arrays.py @@ -56,7 +56,8 @@ def array_enum_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py index 8c67ff17e316..d60899377444 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py @@ -94,7 +94,8 @@ def enum_number_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file.py index 812b50d4c112..418a72f7cb3e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file.py @@ -35,7 +35,8 @@ class File(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file_schema_test_class.py index 06c0a24d0793..63ff3bcd8c8b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file_schema_test_class.py @@ -36,7 +36,8 @@ class FileSchemaTestClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/first_ref.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/first_ref.py index cc442eca85bb..ca94567dafc0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/first_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/first_ref.py @@ -35,7 +35,8 @@ class FirstRef(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo.py index c20ace8c588a..134af2ba41b0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo.py @@ -34,7 +34,8 @@ class Foo(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo_get_default_response.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo_get_default_response.py index eb391b06b494..caa929d4ea81 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo_get_default_response.py @@ -35,7 +35,8 @@ class FooGetDefaultResponse(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/format_test.py index 6bfbff97c0b9..cf0d05f9e618 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/format_test.py @@ -93,7 +93,8 @@ def pattern_with_digits_and_delimiter_validate_regular_expression(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/has_only_read_only.py index 788edd24b3da..567237d61a81 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/has_only_read_only.py @@ -35,7 +35,8 @@ class HasOnlyReadOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/health_check_result.py index 51b236771f3e..9b9ccf00c936 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/health_check_result.py @@ -35,7 +35,8 @@ class HealthCheckResult(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/inner_dict_with_property.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/inner_dict_with_property.py index cccc1d81082a..106fbbbb9889 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/inner_dict_with_property.py @@ -35,7 +35,8 @@ class InnerDictWithProperty(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py index 2a0998a5b544..a7203af4ac52 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py @@ -44,7 +44,8 @@ class IntOrString(BaseModel): one_of_schemas: List[str] = Literal["int", "str"] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/list_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/list_class.py index 2ced6b85f0ff..bc8c47906e57 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/list_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/list_class.py @@ -35,7 +35,8 @@ class ListClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_of_array_of_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_of_array_of_model.py index 9509f0c843fd..627602599750 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_of_array_of_model.py @@ -36,7 +36,8 @@ class MapOfArrayOfModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_test.py index a87ce1a8b41f..c8f5ab914683 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_test.py @@ -47,7 +47,8 @@ def map_of_enum_string_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py index 5aacfc451afa..f920ef230f74 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -38,7 +38,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model200_response.py index 4efc84f75b5f..1603076483e3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model200_response.py @@ -36,7 +36,8 @@ class Model200Response(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model_return.py index 0e4f1e80cdc0..87f9968d6a12 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model_return.py @@ -35,7 +35,8 @@ class ModelReturn(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/name.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/name.py index 32c7b66ee8fa..23e0d049281c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/name.py @@ -38,7 +38,8 @@ class Name(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py index 9c90db25b873..67d7f00f9e6b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py @@ -47,7 +47,8 @@ class NullableClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_property.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_property.py index 3d7d9663beac..14b8d8540239 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_property.py @@ -47,7 +47,8 @@ def name_validate_regular_expression(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/number_only.py index 226982f7c8c4..cf9be7a51a6d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/number_only.py @@ -35,7 +35,8 @@ class NumberOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_to_test_additional_properties.py index 219ea7d843c2..e036dbf5a2e4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_to_test_additional_properties.py @@ -35,7 +35,8 @@ class ObjectToTestAdditionalProperties(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_with_deprecated_fields.py index e78f1ef987f3..9acbb113b6c2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_with_deprecated_fields.py @@ -39,7 +39,8 @@ class ObjectWithDeprecatedFields(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/one_of_enum_string.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/one_of_enum_string.py index 614e0fd658f5..b099c7bab578 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/one_of_enum_string.py @@ -44,7 +44,8 @@ class OneOfEnumString(BaseModel): one_of_schemas: List[str] = Literal["EnumString1", "EnumString2"] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/order.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/order.py index 75ab6d95ff36..a28b93ab9ae1 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/order.py @@ -50,7 +50,8 @@ def status_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_composite.py index 6fe7ec9fb0a4..1fae7664463c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_composite.py @@ -36,7 +36,8 @@ class OuterComposite(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_object_with_enum_property.py index 844ac85a2944..a9771c1d8a1f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_object_with_enum_property.py @@ -37,7 +37,8 @@ class OuterObjectWithEnumProperty(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent.py index 136f109490b9..a7ea11a992b5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent.py @@ -36,7 +36,8 @@ class Parent(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent_with_optional_dict.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent_with_optional_dict.py index 7240ec6613ed..a8753b9dc07c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent_with_optional_dict.py @@ -36,7 +36,8 @@ class ParentWithOptionalDict(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pet.py index c2b5887dbce6..92b9f77bc620 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pet.py @@ -53,7 +53,8 @@ def status_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py index 09e131e10ea6..f63458cd46e5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py @@ -44,7 +44,8 @@ class Pig(BaseModel): one_of_schemas: List[str] = Literal["BasquePig", "DanishPig"] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/property_name_collision.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/property_name_collision.py index 4e7cb09c41b1..0db7bfbc3105 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/property_name_collision.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/property_name_collision.py @@ -37,7 +37,8 @@ class PropertyNameCollision(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/read_only_first.py index d5e03d8bcea8..3e19a45c3d27 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/read_only_first.py @@ -35,7 +35,8 @@ class ReadOnlyFirst(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/second_ref.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/second_ref.py index 412be9274557..b62a2b70f8a7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/second_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/second_ref.py @@ -35,7 +35,8 @@ class SecondRef(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/self_reference_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/self_reference_model.py index 1fb606fba4a3..eb6f112f5725 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/self_reference_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/self_reference_model.py @@ -35,7 +35,8 @@ class SelfReferenceModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_model_name.py index 776914a6880b..582effc78e16 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_model_name.py @@ -35,7 +35,8 @@ class SpecialModelName(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_name.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_name.py index 95fded41621f..ac035dded90a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_name.py @@ -48,7 +48,8 @@ def var_schema_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tag.py index 8e82ccbee38b..cbbc6c635d50 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tag.py @@ -35,7 +35,8 @@ class Tag(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_error_responses_with_model400_response.py new file mode 100644 index 000000000000..bc6b9ea992fd --- /dev/null +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_error_responses_with_model400_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self + +class TestErrorResponsesWithModel400Response(BaseModel): + """ + TestErrorResponsesWithModel400Response + """ # noqa: E501 + reason400: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["reason400"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestErrorResponsesWithModel400Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + _dict = self.model_dump( + by_alias=True, + exclude={ + }, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of TestErrorResponsesWithModel400Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reason400": obj.get("reason400") + }) + return _obj + + diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_error_responses_with_model404_response.py new file mode 100644 index 000000000000..14afd3b169ff --- /dev/null +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_error_responses_with_model404_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self + +class TestErrorResponsesWithModel404Response(BaseModel): + """ + TestErrorResponsesWithModel404Response + """ # noqa: E501 + reason404: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["reason404"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestErrorResponsesWithModel404Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + _dict = self.model_dump( + by_alias=True, + exclude={ + }, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of TestErrorResponsesWithModel404Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reason404": obj.get("reason404") + }) + return _obj + + diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_inline_freeform_additional_properties_request.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_inline_freeform_additional_properties_request.py index a9424649743c..c8d66e9d6389 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_inline_freeform_additional_properties_request.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/test_inline_freeform_additional_properties_request.py @@ -36,7 +36,8 @@ class TestInlineFreeformAdditionalPropertiesRequest(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tiger.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tiger.py index f660a9b10a58..a84c01011291 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tiger.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tiger.py @@ -34,7 +34,8 @@ class Tiger(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py index 347e62ff0178..af26ad30973d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py @@ -36,7 +36,8 @@ class UnnamedDictWithAdditionalModelListProperties(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py index 549e33bf6dbd..aee8e999daf2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py @@ -35,7 +35,8 @@ class UnnamedDictWithAdditionalStringListProperties(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/user.py index 45deeb8b1019..e2f5bb9c4893 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/user.py @@ -42,7 +42,8 @@ class User(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/with_nested_one_of.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/with_nested_one_of.py index 8597c58e07b3..ccafcd94afaa 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/with_nested_one_of.py @@ -38,7 +38,8 @@ class WithNestedOneOf(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model400_response.py new file mode 100644 index 000000000000..35db7ba74fb7 --- /dev/null +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model400_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response + +class TestTestErrorResponsesWithModel400Response(unittest.TestCase): + """TestErrorResponsesWithModel400Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestErrorResponsesWithModel400Response: + """Test TestErrorResponsesWithModel400Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestErrorResponsesWithModel400Response` + """ + model = TestErrorResponsesWithModel400Response() + if include_optional: + return TestErrorResponsesWithModel400Response( + reason400 = '' + ) + else: + return TestErrorResponsesWithModel400Response( + ) + """ + + def testTestErrorResponsesWithModel400Response(self): + """Test TestErrorResponsesWithModel400Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model404_response.py new file mode 100644 index 000000000000..e9c97c0f484b --- /dev/null +++ b/samples/openapi3/client/petstore/python-aiohttp/test/test_test_error_responses_with_model404_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response + +class TestTestErrorResponsesWithModel404Response(unittest.TestCase): + """TestErrorResponsesWithModel404Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestErrorResponsesWithModel404Response: + """Test TestErrorResponsesWithModel404Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestErrorResponsesWithModel404Response` + """ + model = TestErrorResponsesWithModel404Response() + if include_optional: + return TestErrorResponsesWithModel404Response( + reason404 = '' + ) + else: + return TestErrorResponsesWithModel404Response( + ) + """ + + def testTestErrorResponsesWithModel404Response(self): + """Test TestErrorResponsesWithModel404Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.openapi-generator/FILES index 00dc818606f1..1ef5f596fa14 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.openapi-generator/FILES @@ -84,6 +84,8 @@ docs/SpecialModelName.md docs/SpecialName.md docs/StoreApi.md docs/Tag.md +docs/TestErrorResponsesWithModel400Response.md +docs/TestErrorResponsesWithModel404Response.md docs/TestInlineFreeformAdditionalPropertiesRequest.md docs/Tiger.md docs/UnnamedDictWithAdditionalModelListProperties.md @@ -181,6 +183,8 @@ petstore_api/models/special_character_enum.py petstore_api/models/special_model_name.py petstore_api/models/special_name.py petstore_api/models/tag.py +petstore_api/models/test_error_responses_with_model400_response.py +petstore_api/models/test_error_responses_with_model404_response.py petstore_api/models/test_inline_freeform_additional_properties_request.py petstore_api/models/tiger.py petstore_api/models/unnamed_dict_with_additional_model_list_properties.py diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/README.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/README.md index 9aa800b4f2bf..bb23b64132e4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/README.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/README.md @@ -103,7 +103,9 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_date_time_query_parameter**](docs/FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params | +*FakeApi* | [**test_empty_and_non_empty_responses**](docs/FakeApi.md#test_empty_and_non_empty_responses) | **POST** /fake/empty_and_non_empty_responses | test empty and non-empty responses *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_error_responses_with_model**](docs/FakeApi.md#test_error_responses_with_model) | **POST** /fake/error_responses_with_model | test error responses with model *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**test_inline_freeform_additional_properties**](docs/FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties @@ -210,6 +212,8 @@ Class | Method | HTTP request | Description - [SpecialModelName](docs/SpecialModelName.md) - [SpecialName](docs/SpecialName.md) - [Tag](docs/Tag.md) + - [TestErrorResponsesWithModel400Response](docs/TestErrorResponsesWithModel400Response.md) + - [TestErrorResponsesWithModel404Response](docs/TestErrorResponsesWithModel404Response.md) - [TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md) - [Tiger](docs/Tiger.md) - [UnnamedDictWithAdditionalModelListProperties](docs/UnnamedDictWithAdditionalModelListProperties.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md index be5d5e850c79..ffff4acfb3e5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/FakeApi.md @@ -20,7 +20,9 @@ Method | HTTP request | Description [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_date_time_query_parameter**](FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params | +[**test_empty_and_non_empty_responses**](FakeApi.md#test_empty_and_non_empty_responses) | **POST** /fake/empty_and_non_empty_responses | test empty and non-empty responses [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_error_responses_with_model**](FakeApi.md#test_error_responses_with_model) | **POST** /fake/error_responses_with_model | test error responses with model [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_inline_freeform_additional_properties**](FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties @@ -1119,6 +1121,67 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_empty_and_non_empty_responses** +> test_empty_and_non_empty_responses() + +test empty and non-empty responses + + + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# Enter a context with an instance of the API client +async with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test empty and non-empty responses + await api_instance.test_empty_and_non_empty_responses() + except Exception as e: + print("Exception when calling FakeApi->test_empty_and_non_empty_responses: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success, but no response content | - | +**206** | Partial response content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_endpoint_parameters** > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback) @@ -1223,6 +1286,66 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_error_responses_with_model** +> test_error_responses_with_model() + +test error responses with model + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# Enter a context with an instance of the API client +async with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test error responses with model + await api_instance.test_error_responses_with_model() + except Exception as e: + print("Exception when calling FakeApi->test_error_responses_with_model: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success, but no response content | - | +**400** | | - | +**404** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_group_parameters** > test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel400Response.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel400Response.md new file mode 100644 index 000000000000..1ef43ce4cadc --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel400Response.md @@ -0,0 +1,28 @@ +# TestErrorResponsesWithModel400Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason400** | **str** | | [optional] + +## Example + +```python +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TestErrorResponsesWithModel400Response from a JSON string +test_error_responses_with_model400_response_instance = TestErrorResponsesWithModel400Response.from_json(json) +# print the JSON string representation of the object +print TestErrorResponsesWithModel400Response.to_json() + +# convert the object into a dict +test_error_responses_with_model400_response_dict = test_error_responses_with_model400_response_instance.to_dict() +# create an instance of TestErrorResponsesWithModel400Response from a dict +test_error_responses_with_model400_response_form_dict = test_error_responses_with_model400_response.from_dict(test_error_responses_with_model400_response_dict) +``` +[[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/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel404Response.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel404Response.md new file mode 100644 index 000000000000..9fda95537846 --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/TestErrorResponsesWithModel404Response.md @@ -0,0 +1,28 @@ +# TestErrorResponsesWithModel404Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason404** | **str** | | [optional] + +## Example + +```python +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TestErrorResponsesWithModel404Response from a JSON string +test_error_responses_with_model404_response_instance = TestErrorResponsesWithModel404Response.from_json(json) +# print the JSON string representation of the object +print TestErrorResponsesWithModel404Response.to_json() + +# convert the object into a dict +test_error_responses_with_model404_response_dict = test_error_responses_with_model404_response_instance.to_dict() +# create an instance of TestErrorResponsesWithModel404Response from a dict +test_error_responses_with_model404_response_form_dict = test_error_responses_with_model404_response.from_dict(test_error_responses_with_model404_response_dict) +``` +[[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/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/__init__.py index c1c56eb81159..72d39b9c55e6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/__init__.py @@ -113,6 +113,8 @@ from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.special_name import SpecialName from petstore_api.models.tag import Tag +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest from petstore_api.models.tiger import Tiger from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py index 975e70cad808..526cd7113bd7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api/fake_api.py @@ -2078,6 +2078,120 @@ async def test_date_time_query_parameter_with_http_info(self, date_time_query : collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + async def test_empty_and_non_empty_responses(self, **kwargs) -> None: # noqa: E501 + """test empty and non-empty responses # noqa: E501 + + # noqa: E501 + + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the test_empty_and_non_empty_responses_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return await self.test_empty_and_non_empty_responses_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + async def test_empty_and_non_empty_responses_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """test empty and non-empty responses # noqa: E501 + + # noqa: E501 + + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_empty_and_non_empty_responses" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return await self.api_client.call_api( + '/fake/empty_and_non_empty_responses', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments async def test_endpoint_parameters(self, number : Annotated[confloat(le=543.2, ge=32.1), Field(..., description="None")], double : Annotated[confloat(le=123.4, ge=67.8), Field(..., description="None")], pattern_without_delimiter : Annotated[constr(strict=True), Field(..., description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(..., description="None")], integer : Annotated[Optional[conint(strict=True, le=100, ge=10)], Field(description="None")] = None, int32 : Annotated[Optional[conint(strict=True, le=200, ge=20)], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[confloat(le=987.6)], Field(description="None")] = None, string : Annotated[Optional[constr(strict=True)], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[conbytes(strict=True, max_length=64), constr(strict=True, max_length=64)]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[constr(strict=True, max_length=64, min_length=10)], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501 """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -2315,6 +2429,118 @@ async def test_endpoint_parameters_with_http_info(self, number : Annotated[confl collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + async def test_error_responses_with_model(self, **kwargs) -> None: # noqa: E501 + """test error responses with model # noqa: E501 + + + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the test_error_responses_with_model_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return await self.test_error_responses_with_model_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + async def test_error_responses_with_model_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """test error responses with model # noqa: E501 + + + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_error_responses_with_model" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return await self.api_client.call_api( + '/fake/error_responses_with_model', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments async def test_group_parameters(self, required_string_group : Annotated[StrictInt, Field(..., description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(..., description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(..., description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> None: # noqa: E501 """Fake endpoint to test group parameters (optional) # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/__init__.py index dd9388d355da..c106409daa97 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/__init__.py @@ -89,6 +89,8 @@ from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.special_name import SpecialName from petstore_api.models.tag import Tag +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest from petstore_api.models.tiger import Tiger from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_error_responses_with_model400_response.py new file mode 100644 index 000000000000..c4904af2905c --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_error_responses_with_model400_response.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Optional +from pydantic import BaseModel, StrictStr + +class TestErrorResponsesWithModel400Response(BaseModel): + """ + TestErrorResponsesWithModel400Response + """ + reason400: Optional[StrictStr] = None + __properties = ["reason400"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TestErrorResponsesWithModel400Response: + """Create an instance of TestErrorResponsesWithModel400Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TestErrorResponsesWithModel400Response: + """Create an instance of TestErrorResponsesWithModel400Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TestErrorResponsesWithModel400Response.parse_obj(obj) + + _obj = TestErrorResponsesWithModel400Response.parse_obj({ + "reason400": obj.get("reason400") + }) + return _obj + + diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_error_responses_with_model404_response.py new file mode 100644 index 000000000000..96b5f6c58715 --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/test_error_responses_with_model404_response.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Optional +from pydantic import BaseModel, StrictStr + +class TestErrorResponsesWithModel404Response(BaseModel): + """ + TestErrorResponsesWithModel404Response + """ + reason404: Optional[StrictStr] = None + __properties = ["reason404"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TestErrorResponsesWithModel404Response: + """Create an instance of TestErrorResponsesWithModel404Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TestErrorResponsesWithModel404Response: + """Create an instance of TestErrorResponsesWithModel404Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TestErrorResponsesWithModel404Response.parse_obj(obj) + + _obj = TestErrorResponsesWithModel404Response.parse_obj({ + "reason404": obj.get("reason404") + }) + return _obj + + diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_test_error_responses_with_model400_response.py new file mode 100644 index 000000000000..b4e2d50dc6fe --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_test_error_responses_with_model400_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response # noqa: E501 + +class TestTestErrorResponsesWithModel400Response(unittest.TestCase): + """TestErrorResponsesWithModel400Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestErrorResponsesWithModel400Response: + """Test TestErrorResponsesWithModel400Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestErrorResponsesWithModel400Response` + """ + model = TestErrorResponsesWithModel400Response() # noqa: E501 + if include_optional: + return TestErrorResponsesWithModel400Response( + reason400 = '' + ) + else: + return TestErrorResponsesWithModel400Response( + ) + """ + + def testTestErrorResponsesWithModel400Response(self): + """Test TestErrorResponsesWithModel400Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_test_error_responses_with_model404_response.py new file mode 100644 index 000000000000..caf587ddb033 --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/test/test_test_error_responses_with_model404_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response # noqa: E501 + +class TestTestErrorResponsesWithModel404Response(unittest.TestCase): + """TestErrorResponsesWithModel404Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestErrorResponsesWithModel404Response: + """Test TestErrorResponsesWithModel404Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestErrorResponsesWithModel404Response` + """ + model = TestErrorResponsesWithModel404Response() # noqa: E501 + if include_optional: + return TestErrorResponsesWithModel404Response( + reason404 = '' + ) + else: + return TestErrorResponsesWithModel404Response( + ) + """ + + def testTestErrorResponsesWithModel404Response(self): + """Test TestErrorResponsesWithModel404Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-pydantic-v1/.openapi-generator/FILES index 00dc818606f1..1ef5f596fa14 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-pydantic-v1/.openapi-generator/FILES @@ -84,6 +84,8 @@ docs/SpecialModelName.md docs/SpecialName.md docs/StoreApi.md docs/Tag.md +docs/TestErrorResponsesWithModel400Response.md +docs/TestErrorResponsesWithModel404Response.md docs/TestInlineFreeformAdditionalPropertiesRequest.md docs/Tiger.md docs/UnnamedDictWithAdditionalModelListProperties.md @@ -181,6 +183,8 @@ petstore_api/models/special_character_enum.py petstore_api/models/special_model_name.py petstore_api/models/special_name.py petstore_api/models/tag.py +petstore_api/models/test_error_responses_with_model400_response.py +petstore_api/models/test_error_responses_with_model404_response.py petstore_api/models/test_inline_freeform_additional_properties_request.py petstore_api/models/tiger.py petstore_api/models/unnamed_dict_with_additional_model_list_properties.py diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/README.md b/samples/openapi3/client/petstore/python-pydantic-v1/README.md index 3628ec73d276..71954df3745c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/README.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/README.md @@ -103,7 +103,9 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_date_time_query_parameter**](docs/FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params | +*FakeApi* | [**test_empty_and_non_empty_responses**](docs/FakeApi.md#test_empty_and_non_empty_responses) | **POST** /fake/empty_and_non_empty_responses | test empty and non-empty responses *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_error_responses_with_model**](docs/FakeApi.md#test_error_responses_with_model) | **POST** /fake/error_responses_with_model | test error responses with model *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**test_inline_freeform_additional_properties**](docs/FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties @@ -210,6 +212,8 @@ Class | Method | HTTP request | Description - [SpecialModelName](docs/SpecialModelName.md) - [SpecialName](docs/SpecialName.md) - [Tag](docs/Tag.md) + - [TestErrorResponsesWithModel400Response](docs/TestErrorResponsesWithModel400Response.md) + - [TestErrorResponsesWithModel404Response](docs/TestErrorResponsesWithModel404Response.md) - [TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md) - [Tiger](docs/Tiger.md) - [UnnamedDictWithAdditionalModelListProperties](docs/UnnamedDictWithAdditionalModelListProperties.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md index 5bd0489ae550..dc894179ff0d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/FakeApi.md @@ -20,7 +20,9 @@ Method | HTTP request | Description [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_date_time_query_parameter**](FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params | +[**test_empty_and_non_empty_responses**](FakeApi.md#test_empty_and_non_empty_responses) | **POST** /fake/empty_and_non_empty_responses | test empty and non-empty responses [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_error_responses_with_model**](FakeApi.md#test_error_responses_with_model) | **POST** /fake/error_responses_with_model | test error responses with model [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_inline_freeform_additional_properties**](FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties @@ -1119,6 +1121,67 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_empty_and_non_empty_responses** +> test_empty_and_non_empty_responses() + +test empty and non-empty responses + + + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test empty and non-empty responses + api_instance.test_empty_and_non_empty_responses() + except Exception as e: + print("Exception when calling FakeApi->test_empty_and_non_empty_responses: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success, but no response content | - | +**206** | Partial response content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_endpoint_parameters** > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback) @@ -1223,6 +1286,66 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_error_responses_with_model** +> test_error_responses_with_model() + +test error responses with model + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test error responses with model + api_instance.test_error_responses_with_model() + except Exception as e: + print("Exception when calling FakeApi->test_error_responses_with_model: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success, but no response content | - | +**400** | | - | +**404** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_group_parameters** > test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel400Response.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel400Response.md new file mode 100644 index 000000000000..1ef43ce4cadc --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel400Response.md @@ -0,0 +1,28 @@ +# TestErrorResponsesWithModel400Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason400** | **str** | | [optional] + +## Example + +```python +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TestErrorResponsesWithModel400Response from a JSON string +test_error_responses_with_model400_response_instance = TestErrorResponsesWithModel400Response.from_json(json) +# print the JSON string representation of the object +print TestErrorResponsesWithModel400Response.to_json() + +# convert the object into a dict +test_error_responses_with_model400_response_dict = test_error_responses_with_model400_response_instance.to_dict() +# create an instance of TestErrorResponsesWithModel400Response from a dict +test_error_responses_with_model400_response_form_dict = test_error_responses_with_model400_response.from_dict(test_error_responses_with_model400_response_dict) +``` +[[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/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel404Response.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel404Response.md new file mode 100644 index 000000000000..9fda95537846 --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/TestErrorResponsesWithModel404Response.md @@ -0,0 +1,28 @@ +# TestErrorResponsesWithModel404Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason404** | **str** | | [optional] + +## Example + +```python +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TestErrorResponsesWithModel404Response from a JSON string +test_error_responses_with_model404_response_instance = TestErrorResponsesWithModel404Response.from_json(json) +# print the JSON string representation of the object +print TestErrorResponsesWithModel404Response.to_json() + +# convert the object into a dict +test_error_responses_with_model404_response_dict = test_error_responses_with_model404_response_instance.to_dict() +# create an instance of TestErrorResponsesWithModel404Response from a dict +test_error_responses_with_model404_response_form_dict = test_error_responses_with_model404_response.from_dict(test_error_responses_with_model404_response_dict) +``` +[[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/openapi3/client/petstore/python-pydantic-v1/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/__init__.py index c1c56eb81159..72d39b9c55e6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/__init__.py @@ -113,6 +113,8 @@ from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.special_name import SpecialName from petstore_api.models.tag import Tag +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest from petstore_api.models.tiger import Tiger from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py index a5c02f94ab71..35f06ac5b91c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/api/fake_api.py @@ -2333,6 +2333,136 @@ def test_date_time_query_parameter_with_http_info(self, date_time_query : dateti collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def test_empty_and_non_empty_responses(self, **kwargs) -> None: # noqa: E501 + """test empty and non-empty responses # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_empty_and_non_empty_responses(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the test_empty_and_non_empty_responses_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.test_empty_and_non_empty_responses_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def test_empty_and_non_empty_responses_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """test empty and non-empty responses # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_empty_and_non_empty_responses_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_empty_and_non_empty_responses" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/fake/empty_and_non_empty_responses', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def test_endpoint_parameters(self, number : Annotated[confloat(le=543.2, ge=32.1, strict=True), Field(..., description="None")], double : Annotated[confloat(le=123.4, ge=67.8, strict=True), Field(..., description="None")], pattern_without_delimiter : Annotated[constr(strict=True), Field(..., description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(..., description="None")], integer : Annotated[Optional[conint(strict=True, le=100, ge=10)], Field(description="None")] = None, int32 : Annotated[Optional[conint(strict=True, le=200, ge=20)], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[confloat(le=987.6, strict=True)], Field(description="None")] = None, string : Annotated[Optional[constr(strict=True)], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[conbytes(strict=True, max_length=64), constr(strict=True, max_length=64)]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[constr(strict=True, max_length=64, min_length=10)], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501 """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -2586,6 +2716,134 @@ def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def test_error_responses_with_model(self, **kwargs) -> None: # noqa: E501 + """test error responses with model # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_error_responses_with_model(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the test_error_responses_with_model_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.test_error_responses_with_model_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def test_error_responses_with_model_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """test error responses with model # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_error_responses_with_model_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_error_responses_with_model" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/fake/error_responses_with_model', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def test_group_parameters(self, required_string_group : Annotated[StrictInt, Field(..., description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(..., description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(..., description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> None: # noqa: E501 """Fake endpoint to test group parameters (optional) # noqa: E501 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/__init__.py index dd9388d355da..c106409daa97 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/__init__.py @@ -89,6 +89,8 @@ from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.special_name import SpecialName from petstore_api.models.tag import Tag +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest from petstore_api.models.tiger import Tiger from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_error_responses_with_model400_response.py new file mode 100644 index 000000000000..40855d008cce --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_error_responses_with_model400_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Any, Dict, Optional +from pydantic import BaseModel, StrictStr + +class TestErrorResponsesWithModel400Response(BaseModel): + """ + TestErrorResponsesWithModel400Response + """ + reason400: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties = ["reason400"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TestErrorResponsesWithModel400Response: + """Create an instance of TestErrorResponsesWithModel400Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + "additional_properties" + }, + exclude_none=True) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TestErrorResponsesWithModel400Response: + """Create an instance of TestErrorResponsesWithModel400Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TestErrorResponsesWithModel400Response.parse_obj(obj) + + _obj = TestErrorResponsesWithModel400Response.parse_obj({ + "reason400": obj.get("reason400") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_error_responses_with_model404_response.py new file mode 100644 index 000000000000..77c77d903f53 --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/test_error_responses_with_model404_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Any, Dict, Optional +from pydantic import BaseModel, StrictStr + +class TestErrorResponsesWithModel404Response(BaseModel): + """ + TestErrorResponsesWithModel404Response + """ + reason404: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties = ["reason404"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TestErrorResponsesWithModel404Response: + """Create an instance of TestErrorResponsesWithModel404Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + "additional_properties" + }, + exclude_none=True) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TestErrorResponsesWithModel404Response: + """Create an instance of TestErrorResponsesWithModel404Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TestErrorResponsesWithModel404Response.parse_obj(obj) + + _obj = TestErrorResponsesWithModel404Response.parse_obj({ + "reason404": obj.get("reason404") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/rest.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/rest.py index df9aca008048..fcbbdab49ab9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/rest.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/rest.py @@ -26,6 +26,18 @@ logger = logging.getLogger(__name__) +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + class RESTResponse(io.IOBase): @@ -81,17 +93,29 @@ def __init__(self, configuration, pools_size=4, maxsize=None) -> None: # https pool manager if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + self.pool_manager = SOCKSProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: self.pool_manager = urllib3.PoolManager( num_pools=pools_size, diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_test_error_responses_with_model400_response.py new file mode 100644 index 000000000000..b4e2d50dc6fe --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_test_error_responses_with_model400_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response # noqa: E501 + +class TestTestErrorResponsesWithModel400Response(unittest.TestCase): + """TestErrorResponsesWithModel400Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestErrorResponsesWithModel400Response: + """Test TestErrorResponsesWithModel400Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestErrorResponsesWithModel400Response` + """ + model = TestErrorResponsesWithModel400Response() # noqa: E501 + if include_optional: + return TestErrorResponsesWithModel400Response( + reason400 = '' + ) + else: + return TestErrorResponsesWithModel400Response( + ) + """ + + def testTestErrorResponsesWithModel400Response(self): + """Test TestErrorResponsesWithModel400Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/test/test_test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_test_error_responses_with_model404_response.py new file mode 100644 index 000000000000..caf587ddb033 --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v1/test/test_test_error_responses_with_model404_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response # noqa: E501 + +class TestTestErrorResponsesWithModel404Response(unittest.TestCase): + """TestErrorResponsesWithModel404Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestErrorResponsesWithModel404Response: + """Test TestErrorResponsesWithModel404Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestErrorResponsesWithModel404Response` + """ + model = TestErrorResponsesWithModel404Response() # noqa: E501 + if include_optional: + return TestErrorResponsesWithModel404Response( + reason404 = '' + ) + else: + return TestErrorResponsesWithModel404Response( + ) + """ + + def testTestErrorResponsesWithModel404Response(self): + """Test TestErrorResponsesWithModel404Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/FILES b/samples/openapi3/client/petstore/python/.openapi-generator/FILES index ff22e2855124..06be01a3bab9 100755 --- a/samples/openapi3/client/petstore/python/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python/.openapi-generator/FILES @@ -84,6 +84,8 @@ docs/SpecialModelName.md docs/SpecialName.md docs/StoreApi.md docs/Tag.md +docs/TestErrorResponsesWithModel400Response.md +docs/TestErrorResponsesWithModel404Response.md docs/TestInlineFreeformAdditionalPropertiesRequest.md docs/Tiger.md docs/UnnamedDictWithAdditionalModelListProperties.md @@ -181,6 +183,8 @@ petstore_api/models/special_character_enum.py petstore_api/models/special_model_name.py petstore_api/models/special_name.py petstore_api/models/tag.py +petstore_api/models/test_error_responses_with_model400_response.py +petstore_api/models/test_error_responses_with_model404_response.py petstore_api/models/test_inline_freeform_additional_properties_request.py petstore_api/models/tiger.py petstore_api/models/unnamed_dict_with_additional_model_list_properties.py diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index cf91d3ad0ce9..5555cd3d60b6 100755 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -103,7 +103,9 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_date_time_query_parameter**](docs/FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params | +*FakeApi* | [**test_empty_and_non_empty_responses**](docs/FakeApi.md#test_empty_and_non_empty_responses) | **POST** /fake/empty_and_non_empty_responses | test empty and non-empty responses *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_error_responses_with_model**](docs/FakeApi.md#test_error_responses_with_model) | **POST** /fake/error_responses_with_model | test error responses with model *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**test_inline_freeform_additional_properties**](docs/FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties @@ -210,6 +212,8 @@ Class | Method | HTTP request | Description - [SpecialModelName](docs/SpecialModelName.md) - [SpecialName](docs/SpecialName.md) - [Tag](docs/Tag.md) + - [TestErrorResponsesWithModel400Response](docs/TestErrorResponsesWithModel400Response.md) + - [TestErrorResponsesWithModel404Response](docs/TestErrorResponsesWithModel404Response.md) - [TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md) - [Tiger](docs/Tiger.md) - [UnnamedDictWithAdditionalModelListProperties](docs/UnnamedDictWithAdditionalModelListProperties.md) diff --git a/samples/openapi3/client/petstore/python/docs/FakeApi.md b/samples/openapi3/client/petstore/python/docs/FakeApi.md index 4a998d2c0626..1038655b1939 100644 --- a/samples/openapi3/client/petstore/python/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/FakeApi.md @@ -20,7 +20,9 @@ Method | HTTP request | Description [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_date_time_query_parameter**](FakeApi.md#test_date_time_query_parameter) | **PUT** /fake/date-time-query-params | +[**test_empty_and_non_empty_responses**](FakeApi.md#test_empty_and_non_empty_responses) | **POST** /fake/empty_and_non_empty_responses | test empty and non-empty responses [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_error_responses_with_model**](FakeApi.md#test_error_responses_with_model) | **POST** /fake/error_responses_with_model | test error responses with model [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_inline_freeform_additional_properties**](FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties @@ -1119,6 +1121,67 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_empty_and_non_empty_responses** +> test_empty_and_non_empty_responses() + +test empty and non-empty responses + + + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test empty and non-empty responses + api_instance.test_empty_and_non_empty_responses() + except Exception as e: + print("Exception when calling FakeApi->test_empty_and_non_empty_responses: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success, but no response content | - | +**206** | Partial response content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_endpoint_parameters** > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, var_float=var_float, string=string, binary=binary, byte_with_max_length=byte_with_max_length, var_date=var_date, date_time=date_time, password=password, param_callback=param_callback) @@ -1223,6 +1286,66 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_error_responses_with_model** +> test_error_responses_with_model() + +test error responses with model + +### Example + +```python +import time +import os +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 +# See configuration.py for a list of all supported configuration parameters. +configuration = petstore_api.Configuration( + host = "http://petstore.swagger.io:80/v2" +) + + +# Enter a context with an instance of the API client +with petstore_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = petstore_api.FakeApi(api_client) + + try: + # test error responses with model + api_instance.test_error_responses_with_model() + except Exception as e: + print("Exception when calling FakeApi->test_error_responses_with_model: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success, but no response content | - | +**400** | | - | +**404** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_group_parameters** > test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) diff --git a/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel400Response.md b/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel400Response.md new file mode 100644 index 000000000000..1ef43ce4cadc --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel400Response.md @@ -0,0 +1,28 @@ +# TestErrorResponsesWithModel400Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason400** | **str** | | [optional] + +## Example + +```python +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TestErrorResponsesWithModel400Response from a JSON string +test_error_responses_with_model400_response_instance = TestErrorResponsesWithModel400Response.from_json(json) +# print the JSON string representation of the object +print TestErrorResponsesWithModel400Response.to_json() + +# convert the object into a dict +test_error_responses_with_model400_response_dict = test_error_responses_with_model400_response_instance.to_dict() +# create an instance of TestErrorResponsesWithModel400Response from a dict +test_error_responses_with_model400_response_form_dict = test_error_responses_with_model400_response.from_dict(test_error_responses_with_model400_response_dict) +``` +[[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/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel404Response.md b/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel404Response.md new file mode 100644 index 000000000000..9fda95537846 --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/TestErrorResponsesWithModel404Response.md @@ -0,0 +1,28 @@ +# TestErrorResponsesWithModel404Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason404** | **str** | | [optional] + +## Example + +```python +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TestErrorResponsesWithModel404Response from a JSON string +test_error_responses_with_model404_response_instance = TestErrorResponsesWithModel404Response.from_json(json) +# print the JSON string representation of the object +print TestErrorResponsesWithModel404Response.to_json() + +# convert the object into a dict +test_error_responses_with_model404_response_dict = test_error_responses_with_model404_response_instance.to_dict() +# create an instance of TestErrorResponsesWithModel404Response from a dict +test_error_responses_with_model404_response_form_dict = test_error_responses_with_model404_response.from_dict(test_error_responses_with_model404_response_dict) +``` +[[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/openapi3/client/petstore/python/petstore_api/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/__init__.py index c1c56eb81159..72d39b9c55e6 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/__init__.py @@ -113,6 +113,8 @@ from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.special_name import SpecialName from petstore_api.models.tag import Tag +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest from petstore_api.models.tiger import Tiger from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py index 9e399b998f9b..2ea2e1862c25 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py @@ -99,8 +99,7 @@ def call_123_test_special_tags( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, @@ -167,8 +166,7 @@ def call_123_test_special_tags_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, @@ -235,8 +233,7 @@ def call_123_test_special_tags_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py index d18bd3f1235e..2c54019d9ead 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py @@ -92,8 +92,6 @@ def foo_get( ) _response_types_map: Dict[str, Optional[str]] = { - - } response_data = self.api_client.call_api( *_param, @@ -155,8 +153,6 @@ def foo_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - - } response_data = self.api_client.call_api( *_param, @@ -218,8 +214,6 @@ def foo_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - - } response_data = self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index 324351cf68e7..687cd8287d9b 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -113,7 +113,7 @@ def fake_any_type_request_body( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -179,7 +179,7 @@ def fake_any_type_request_body_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -245,7 +245,7 @@ def fake_any_type_request_body_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -375,7 +375,7 @@ def fake_enum_ref_query_parameter( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -441,7 +441,7 @@ def fake_enum_ref_query_parameter_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -507,7 +507,7 @@ def fake_enum_ref_query_parameter_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -622,8 +622,7 @@ def fake_health_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheckResult" - + '200': "HealthCheckResult", } response_data = self.api_client.call_api( *_param, @@ -685,8 +684,7 @@ def fake_health_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheckResult" - + '200': "HealthCheckResult", } response_data = self.api_client.call_api( *_param, @@ -748,8 +746,7 @@ def fake_health_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthCheckResult" - + '200': "HealthCheckResult", } response_data = self.api_client.call_api( *_param, @@ -877,7 +874,7 @@ def fake_http_signature_test( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -951,7 +948,7 @@ def fake_http_signature_test_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -1025,7 +1022,7 @@ def fake_http_signature_test_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -1166,8 +1163,7 @@ def fake_outer_boolean_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bool" - + '200': "bool", } response_data = self.api_client.call_api( *_param, @@ -1234,8 +1230,7 @@ def fake_outer_boolean_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bool" - + '200': "bool", } response_data = self.api_client.call_api( *_param, @@ -1302,8 +1297,7 @@ def fake_outer_boolean_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "bool" - + '200': "bool", } response_data = self.api_client.call_api( *_param, @@ -1440,8 +1434,7 @@ def fake_outer_composite_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterComposite" - + '200': "OuterComposite", } response_data = self.api_client.call_api( *_param, @@ -1508,8 +1501,7 @@ def fake_outer_composite_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterComposite" - + '200': "OuterComposite", } response_data = self.api_client.call_api( *_param, @@ -1576,8 +1568,7 @@ def fake_outer_composite_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterComposite" - + '200': "OuterComposite", } response_data = self.api_client.call_api( *_param, @@ -1714,8 +1705,7 @@ def fake_outer_number_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "float" - + '200': "float", } response_data = self.api_client.call_api( *_param, @@ -1782,8 +1772,7 @@ def fake_outer_number_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "float" - + '200': "float", } response_data = self.api_client.call_api( *_param, @@ -1850,8 +1839,7 @@ def fake_outer_number_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "float" - + '200': "float", } response_data = self.api_client.call_api( *_param, @@ -1988,8 +1976,7 @@ def fake_outer_string_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2056,8 +2043,7 @@ def fake_outer_string_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2124,8 +2110,7 @@ def fake_outer_string_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "str" - + '200': "str", } response_data = self.api_client.call_api( *_param, @@ -2262,8 +2247,7 @@ def fake_property_enum_integer_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterObjectWithEnumProperty" - + '200': "OuterObjectWithEnumProperty", } response_data = self.api_client.call_api( *_param, @@ -2330,8 +2314,7 @@ def fake_property_enum_integer_serialize_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterObjectWithEnumProperty" - + '200': "OuterObjectWithEnumProperty", } response_data = self.api_client.call_api( *_param, @@ -2398,8 +2381,7 @@ def fake_property_enum_integer_serialize_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OuterObjectWithEnumProperty" - + '200': "OuterObjectWithEnumProperty", } response_data = self.api_client.call_api( *_param, @@ -2531,8 +2513,7 @@ def fake_return_list_of_objects( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[List[Tag]]" - + '200': "List[List[Tag]]", } response_data = self.api_client.call_api( *_param, @@ -2594,8 +2575,7 @@ def fake_return_list_of_objects_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[List[Tag]]" - + '200': "List[List[Tag]]", } response_data = self.api_client.call_api( *_param, @@ -2657,8 +2637,7 @@ def fake_return_list_of_objects_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[List[Tag]]" - + '200': "List[List[Tag]]", } response_data = self.api_client.call_api( *_param, @@ -2778,7 +2757,7 @@ def fake_uuid_example( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -2844,7 +2823,7 @@ def fake_uuid_example_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -2910,7 +2889,7 @@ def fake_uuid_example_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3030,7 +3009,7 @@ def test_body_with_binary( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3097,7 +3076,7 @@ def test_body_with_binary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3164,7 +3143,7 @@ def test_body_with_binary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3300,7 +3279,7 @@ def test_body_with_file_schema( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3367,7 +3346,7 @@ def test_body_with_file_schema_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3434,7 +3413,7 @@ def test_body_with_file_schema_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3568,7 +3547,7 @@ def test_body_with_query_params( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3638,7 +3617,7 @@ def test_body_with_query_params_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3708,7 +3687,7 @@ def test_body_with_query_params_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -3844,8 +3823,7 @@ def test_client_model( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, @@ -3912,8 +3890,7 @@ def test_client_model_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, @@ -3980,8 +3957,7 @@ def test_client_model_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, @@ -4121,7 +4097,7 @@ def test_date_time_query_parameter( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -4191,7 +4167,7 @@ def test_date_time_query_parameter_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -4261,7 +4237,7 @@ def test_date_time_query_parameter_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -4342,23 +4318,8 @@ def _test_date_time_query_parameter_serialize( @validate_call - def test_endpoint_parameters( + def test_empty_and_non_empty_responses( self, - number: Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], - double: Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], - pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], - byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], - integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, - int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, - int64: Annotated[Optional[StrictInt], Field(description="None")] = None, - var_float: Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, - string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, - binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, - byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, - var_date: Annotated[Optional[date], Field(description="None")] = None, - date_time: Annotated[Optional[datetime], Field(description="None")] = None, - password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, - param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4372,40 +4333,10 @@ def test_endpoint_parameters( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + """test empty and non-empty responses - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - :param number: None (required) - :type number: float - :param double: None (required) - :type double: float - :param pattern_without_delimiter: None (required) - :type pattern_without_delimiter: str - :param byte: None (required) - :type byte: bytearray - :param integer: None - :type integer: int - :param int32: None - :type int32: int - :param int64: None - :type int64: int - :param var_float: None - :type var_float: float - :param string: None - :type string: str - :param binary: None - :type binary: bytearray - :param byte_with_max_length: None - :type byte_with_max_length: bytearray - :param var_date: None - :type var_date: date - :param date_time: None - :type date_time: datetime - :param password: None - :type password: str - :param param_callback: None - :type param_callback: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4428,22 +4359,7 @@ def test_endpoint_parameters( :return: Returns the result object. """ # noqa: E501 - _param = self._test_endpoint_parameters_serialize( - number=number, - double=double, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, - integer=integer, - int32=int32, - int64=int64, - var_float=var_float, - string=string, - binary=binary, - byte_with_max_length=byte_with_max_length, - var_date=var_date, - date_time=date_time, - password=password, - param_callback=param_callback, + _param = self._test_empty_and_non_empty_responses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4451,7 +4367,8 @@ def test_endpoint_parameters( ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '206': "str", } response_data = self.api_client.call_api( *_param, @@ -4465,23 +4382,8 @@ def test_endpoint_parameters( @validate_call - def test_endpoint_parameters_with_http_info( + def test_empty_and_non_empty_responses_with_http_info( self, - number: Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], - double: Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], - pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], - byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], - integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, - int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, - int64: Annotated[Optional[StrictInt], Field(description="None")] = None, - var_float: Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, - string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, - binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, - byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, - var_date: Annotated[Optional[date], Field(description="None")] = None, - date_time: Annotated[Optional[datetime], Field(description="None")] = None, - password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, - param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4495,40 +4397,10 @@ def test_endpoint_parameters_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + """test empty and non-empty responses - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - :param number: None (required) - :type number: float - :param double: None (required) - :type double: float - :param pattern_without_delimiter: None (required) - :type pattern_without_delimiter: str - :param byte: None (required) - :type byte: bytearray - :param integer: None - :type integer: int - :param int32: None - :type int32: int - :param int64: None - :type int64: int - :param var_float: None - :type var_float: float - :param string: None - :type string: str - :param binary: None - :type binary: bytearray - :param byte_with_max_length: None - :type byte_with_max_length: bytearray - :param var_date: None - :type var_date: date - :param date_time: None - :type date_time: datetime - :param password: None - :type password: str - :param param_callback: None - :type param_callback: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4551,22 +4423,7 @@ def test_endpoint_parameters_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._test_endpoint_parameters_serialize( - number=number, - double=double, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, - integer=integer, - int32=int32, - int64=int64, - var_float=var_float, - string=string, - binary=binary, - byte_with_max_length=byte_with_max_length, - var_date=var_date, - date_time=date_time, - password=password, - param_callback=param_callback, + _param = self._test_empty_and_non_empty_responses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4574,7 +4431,8 @@ def test_endpoint_parameters_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '206': "str", } response_data = self.api_client.call_api( *_param, @@ -4588,23 +4446,8 @@ def test_endpoint_parameters_with_http_info( @validate_call - def test_endpoint_parameters_without_preload_content( + def test_empty_and_non_empty_responses_without_preload_content( self, - number: Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], - double: Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], - pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], - byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], - integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, - int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, - int64: Annotated[Optional[StrictInt], Field(description="None")] = None, - var_float: Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, - string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, - binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, - byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, - var_date: Annotated[Optional[date], Field(description="None")] = None, - date_time: Annotated[Optional[datetime], Field(description="None")] = None, - password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, - param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4618,40 +4461,10 @@ def test_endpoint_parameters_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + """test empty and non-empty responses - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - :param number: None (required) - :type number: float - :param double: None (required) - :type double: float - :param pattern_without_delimiter: None (required) - :type pattern_without_delimiter: str - :param byte: None (required) - :type byte: bytearray - :param integer: None - :type integer: int - :param int32: None - :type int32: int - :param int64: None - :type int64: int - :param var_float: None - :type var_float: float - :param string: None - :type string: str - :param binary: None - :type binary: bytearray - :param byte_with_max_length: None - :type byte_with_max_length: bytearray - :param var_date: None - :type var_date: date - :param date_time: None - :type date_time: datetime - :param password: None - :type password: str - :param param_callback: None - :type param_callback: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4674,22 +4487,7 @@ def test_endpoint_parameters_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._test_endpoint_parameters_serialize( - number=number, - double=double, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, - integer=integer, - int32=int32, - int64=int64, - var_float=var_float, - string=string, - binary=binary, - byte_with_max_length=byte_with_max_length, - var_date=var_date, - date_time=date_time, - password=password, - param_callback=param_callback, + _param = self._test_empty_and_non_empty_responses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4697,7 +4495,8 @@ def test_endpoint_parameters_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '206': "str", } response_data = self.api_client.call_api( *_param, @@ -4706,17 +4505,443 @@ def test_endpoint_parameters_without_preload_content( return response_data.response - def _test_endpoint_parameters_serialize( + def _test_empty_and_non_empty_responses_serialize( self, - number, - double, - pattern_without_delimiter, - byte, - integer, - int32, - int64, - var_float, - string, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/fake/empty_and_non_empty_responses', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def test_endpoint_parameters( + self, + number: Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + :param number: None (required) + :type number: float + :param double: None (required) + :type double: float + :param pattern_without_delimiter: None (required) + :type pattern_without_delimiter: str + :param byte: None (required) + :type byte: bytearray + :param integer: None + :type integer: int + :param int32: None + :type int32: int + :param int64: None + :type int64: int + :param var_float: None + :type var_float: float + :param string: None + :type string: str + :param binary: None + :type binary: bytearray + :param byte_with_max_length: None + :type byte_with_max_length: bytearray + :param var_date: None + :type var_date: date + :param date_time: None + :type date_time: datetime + :param password: None + :type password: str + :param param_callback: None + :type param_callback: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_endpoint_parameters_serialize( + number=number, + double=double, + pattern_without_delimiter=pattern_without_delimiter, + byte=byte, + integer=integer, + int32=int32, + int64=int64, + var_float=var_float, + string=string, + binary=binary, + byte_with_max_length=byte_with_max_length, + var_date=var_date, + date_time=date_time, + password=password, + param_callback=param_callback, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def test_endpoint_parameters_with_http_info( + self, + number: Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + :param number: None (required) + :type number: float + :param double: None (required) + :type double: float + :param pattern_without_delimiter: None (required) + :type pattern_without_delimiter: str + :param byte: None (required) + :type byte: bytearray + :param integer: None + :type integer: int + :param int32: None + :type int32: int + :param int64: None + :type int64: int + :param var_float: None + :type var_float: float + :param string: None + :type string: str + :param binary: None + :type binary: bytearray + :param byte_with_max_length: None + :type byte_with_max_length: bytearray + :param var_date: None + :type var_date: date + :param date_time: None + :type date_time: datetime + :param password: None + :type password: str + :param param_callback: None + :type param_callback: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_endpoint_parameters_serialize( + number=number, + double=double, + pattern_without_delimiter=pattern_without_delimiter, + byte=byte, + integer=integer, + int32=int32, + int64=int64, + var_float=var_float, + string=string, + binary=binary, + byte_with_max_length=byte_with_max_length, + var_date=var_date, + date_time=date_time, + password=password, + param_callback=param_callback, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def test_endpoint_parameters_without_preload_content( + self, + number: Annotated[float, Field(le=543.2, strict=True, ge=32.1, description="None")], + double: Annotated[float, Field(le=123.4, strict=True, ge=67.8, description="None")], + pattern_without_delimiter: Annotated[str, Field(strict=True, description="None")], + byte: Annotated[Union[StrictBytes, StrictStr], Field(description="None")], + integer: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=10)]], Field(description="None")] = None, + int32: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=20)]], Field(description="None")] = None, + int64: Annotated[Optional[StrictInt], Field(description="None")] = None, + var_float: Annotated[Optional[Annotated[float, Field(le=987.6, strict=True)]], Field(description="None")] = None, + string: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="None")] = None, + binary: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, + byte_with_max_length: Annotated[Optional[Union[Annotated[bytes, Field(strict=True, max_length=64)], Annotated[str, Field(strict=True, max_length=64)]]], Field(description="None")] = None, + var_date: Annotated[Optional[date], Field(description="None")] = None, + date_time: Annotated[Optional[datetime], Field(description="None")] = None, + password: Annotated[Optional[Annotated[str, Field(min_length=10, strict=True, max_length=64)]], Field(description="None")] = None, + param_callback: Annotated[Optional[StrictStr], Field(description="None")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + :param number: None (required) + :type number: float + :param double: None (required) + :type double: float + :param pattern_without_delimiter: None (required) + :type pattern_without_delimiter: str + :param byte: None (required) + :type byte: bytearray + :param integer: None + :type integer: int + :param int32: None + :type int32: int + :param int64: None + :type int64: int + :param var_float: None + :type var_float: float + :param string: None + :type string: str + :param binary: None + :type binary: bytearray + :param byte_with_max_length: None + :type byte_with_max_length: bytearray + :param var_date: None + :type var_date: date + :param date_time: None + :type date_time: datetime + :param password: None + :type password: str + :param param_callback: None + :type param_callback: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_endpoint_parameters_serialize( + number=number, + double=double, + pattern_without_delimiter=pattern_without_delimiter, + byte=byte, + integer=integer, + int32=int32, + int64=int64, + var_float=var_float, + string=string, + binary=binary, + byte_with_max_length=byte_with_max_length, + var_date=var_date, + date_time=date_time, + password=password, + param_callback=param_callback, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_endpoint_parameters_serialize( + self, + number, + double, + pattern_without_delimiter, + byte, + integer, + int32, + int64, + var_float, + string, binary, byte_with_max_length, var_date, @@ -4817,6 +5042,252 @@ def _test_endpoint_parameters_serialize( + @validate_call + def test_error_responses_with_model( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """test error responses with model + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_error_responses_with_model_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "TestErrorResponsesWithModel400Response", + '404': "TestErrorResponsesWithModel404Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def test_error_responses_with_model_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """test error responses with model + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_error_responses_with_model_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "TestErrorResponsesWithModel400Response", + '404': "TestErrorResponsesWithModel404Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def test_error_responses_with_model_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """test error responses with model + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_error_responses_with_model_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "TestErrorResponsesWithModel400Response", + '404': "TestErrorResponsesWithModel404Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_error_responses_with_model_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/fake/error_responses_with_model', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def test_group_parameters( self, @@ -4891,7 +5362,7 @@ def test_group_parameters( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -4978,7 +5449,7 @@ def test_group_parameters_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -5065,7 +5536,7 @@ def test_group_parameters_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -5207,7 +5678,7 @@ def test_inline_additional_properties( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -5274,7 +5745,7 @@ def test_inline_additional_properties_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -5341,7 +5812,7 @@ def test_inline_additional_properties_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -5472,7 +5943,7 @@ def test_inline_freeform_additional_properties( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -5539,7 +6010,7 @@ def test_inline_freeform_additional_properties_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -5606,7 +6077,7 @@ def test_inline_freeform_additional_properties_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -5741,7 +6212,7 @@ def test_json_form_data( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -5812,7 +6283,7 @@ def test_json_form_data_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -5883,7 +6354,7 @@ def test_json_form_data_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -6041,7 +6512,7 @@ def test_query_parameter_collection_format( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -6132,7 +6603,7 @@ def test_query_parameter_collection_format_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, @@ -6223,7 +6694,7 @@ def test_query_parameter_collection_format_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, } response_data = self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py index 6c6f6fc30274..9ce463db91a3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags123_api.py @@ -99,8 +99,7 @@ def test_classname( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, @@ -167,8 +166,7 @@ def test_classname_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, @@ -235,8 +233,7 @@ def test_classname_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Client" - + '200': "Client", } response_data = self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index 548c57cf28fb..caa3fb84b072 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -104,7 +104,8 @@ def add_pet( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -171,7 +172,8 @@ def add_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -238,7 +240,8 @@ def add_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -376,7 +379,8 @@ def delete_pet( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, } response_data = self.api_client.call_api( *_param, @@ -447,7 +451,8 @@ def delete_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, } response_data = self.api_client.call_api( *_param, @@ -518,7 +523,8 @@ def delete_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, } response_data = self.api_client.call_api( *_param, @@ -641,8 +647,7 @@ def find_pets_by_status( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -710,8 +715,7 @@ def find_pets_by_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -779,8 +783,7 @@ def find_pets_by_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -912,8 +915,7 @@ def find_pets_by_tags( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -982,8 +984,7 @@ def find_pets_by_tags_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -1052,8 +1053,7 @@ def find_pets_by_tags_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "List[Pet]", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -1185,8 +1185,7 @@ def get_pet_by_id( _response_types_map: Dict[str, Optional[str]] = { '200': "Pet", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1255,8 +1254,7 @@ def get_pet_by_id_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Pet", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1325,8 +1323,7 @@ def get_pet_by_id_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Pet", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1452,7 +1449,10 @@ def update_pet( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, + '404': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -1519,7 +1519,10 @@ def update_pet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, + '404': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -1586,7 +1589,10 @@ def update_pet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '400': None, + '404': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -1728,7 +1734,8 @@ def update_pet_with_form( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -1803,7 +1810,8 @@ def update_pet_with_form_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -1878,7 +1886,8 @@ def update_pet_with_form_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '405': None, } response_data = self.api_client.call_api( *_param, @@ -2024,8 +2033,7 @@ def upload_file( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = self.api_client.call_api( *_param, @@ -2100,8 +2108,7 @@ def upload_file_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = self.api_client.call_api( *_param, @@ -2176,8 +2183,7 @@ def upload_file_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = self.api_client.call_api( *_param, @@ -2329,8 +2335,7 @@ def upload_file_with_required_file( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = self.api_client.call_api( *_param, @@ -2405,8 +2410,7 @@ def upload_file_with_required_file_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = self.api_client.call_api( *_param, @@ -2481,8 +2485,7 @@ def upload_file_with_required_file_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiResponse" - + '200': "ApiResponse", } response_data = self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py index 42ede9524e5a..fd77a92f117c 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py @@ -103,7 +103,8 @@ def delete_order( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -170,7 +171,8 @@ def delete_order_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -237,7 +239,8 @@ def delete_order_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -351,8 +354,7 @@ def get_inventory( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, int]" - + '200': "Dict[str, int]", } response_data = self.api_client.call_api( *_param, @@ -415,8 +417,7 @@ def get_inventory_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, int]" - + '200': "Dict[str, int]", } response_data = self.api_client.call_api( *_param, @@ -479,8 +480,7 @@ def get_inventory_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, int]" - + '200': "Dict[str, int]", } response_data = self.api_client.call_api( *_param, @@ -604,8 +604,7 @@ def get_order_by_id( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -674,8 +673,7 @@ def get_order_by_id_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -744,8 +742,7 @@ def get_order_by_id_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -871,8 +868,7 @@ def place_order( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -940,8 +936,7 @@ def place_order_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -1009,8 +1004,7 @@ def place_order_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Order", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index bc93910a5471..2811f29911c2 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -103,7 +103,6 @@ def create_user( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -170,7 +169,6 @@ def create_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -237,7 +235,6 @@ def create_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -373,7 +370,6 @@ def create_users_with_array_input( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -440,7 +436,6 @@ def create_users_with_array_input_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -507,7 +502,6 @@ def create_users_with_array_input_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -639,7 +633,6 @@ def create_users_with_list_input( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -706,7 +699,6 @@ def create_users_with_list_input_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -773,7 +765,6 @@ def create_users_with_list_input_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -905,7 +896,8 @@ def delete_user( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -972,7 +964,8 @@ def delete_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1039,7 +1032,8 @@ def delete_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1159,8 +1153,7 @@ def get_user_by_name( _response_types_map: Dict[str, Optional[str]] = { '200': "User", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1229,8 +1222,7 @@ def get_user_by_name_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "User", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1299,8 +1291,7 @@ def get_user_by_name_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "User", '400': None, - '404': None - + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1430,8 +1421,7 @@ def login_user( _response_types_map: Dict[str, Optional[str]] = { '200': "str", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -1503,8 +1493,7 @@ def login_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "str", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -1576,8 +1565,7 @@ def login_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "str", - '400': None - + '400': None, } response_data = self.api_client.call_api( *_param, @@ -1705,7 +1693,6 @@ def logout_user( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -1768,7 +1755,6 @@ def logout_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -1831,7 +1817,6 @@ def logout_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - } response_data = self.api_client.call_api( *_param, @@ -1950,7 +1935,8 @@ def update_user( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -2021,7 +2007,8 @@ def update_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -2092,7 +2079,8 @@ def update_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index bdf72703ea23..f0b4714a03c0 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -281,7 +281,7 @@ def call_api( def response_deserialize( self, - response_data=None, + response_data: rest.RESTResponse = None, response_types_map=None ) -> ApiResponse: """Deserializes response into an object. @@ -296,39 +296,29 @@ def response_deserialize( # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) return ApiResponse( status_code = response_data.status, diff --git a/samples/openapi3/client/petstore/python/petstore_api/exceptions.py b/samples/openapi3/client/petstore/python/petstore_api/exceptions.py index ab74ce953c72..363d0d9f8744 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/exceptions.py +++ b/samples/openapi3/client/petstore/python/petstore_api/exceptions.py @@ -11,6 +11,9 @@ Do not edit the class manually. """ # noqa: E501 +from typing import Any, Optional + +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -101,17 +104,56 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" @@ -121,38 +163,30 @@ def __str__(self): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message + class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py index dd9388d355da..c106409daa97 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py @@ -89,6 +89,8 @@ from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.special_name import SpecialName from petstore_api.models.tag import Tag +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response from petstore_api.models.test_inline_freeform_additional_properties_request import TestInlineFreeformAdditionalPropertiesRequest from petstore_api.models.tiger import Tiger from petstore_api.models.unnamed_dict_with_additional_model_list_properties import UnnamedDictWithAdditionalModelListProperties diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_any_type.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_any_type.py index 734a02cf2320..2ce4d17e9577 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_any_type.py @@ -35,7 +35,8 @@ class AdditionalPropertiesAnyType(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py index 0cd3c421b3f5..4704d56b5d13 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py @@ -36,7 +36,8 @@ class AdditionalPropertiesClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_object.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_object.py index a201dfca2333..6d6fd8daf5f1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_object.py @@ -35,7 +35,8 @@ class AdditionalPropertiesObject(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_with_description_only.py index d9275b941610..9a41a8257f1b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_with_description_only.py @@ -35,7 +35,8 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/all_of_with_single_ref.py b/samples/openapi3/client/petstore/python/petstore_api/models/all_of_with_single_ref.py index 0b9428d10ad2..7a7e76b88df4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/all_of_with_single_ref.py @@ -38,7 +38,8 @@ class AllOfWithSingleRef(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py index 72b86942d9c1..0851ecd14239 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py @@ -37,7 +37,8 @@ class Animal(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/any_of_color.py b/samples/openapi3/client/petstore/python/petstore_api/models/any_of_color.py index 15b9eefd670e..7e8e6976ebc8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/any_of_color.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/any_of_color.py @@ -50,7 +50,8 @@ class AnyOfColor(BaseModel): any_of_schemas: List[str] = Literal[ANYOFCOLOR_ANY_OF_SCHEMAS] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } def __init__(self, *args, **kwargs) -> None: diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/any_of_pig.py b/samples/openapi3/client/petstore/python/petstore_api/models/any_of_pig.py index be2f65a242ec..4abe31fc06fc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/any_of_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/any_of_pig.py @@ -48,7 +48,8 @@ class AnyOfPig(BaseModel): any_of_schemas: List[str] = Literal[ANYOFPIG_ANY_OF_SCHEMAS] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } def __init__(self, *args, **kwargs) -> None: diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py index 1eb43cfdc9e0..eac66acfb573 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py @@ -37,7 +37,8 @@ class ApiResponse(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_model.py index 854c11a98fe7..772e428b2829 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_model.py @@ -36,7 +36,8 @@ class ArrayOfArrayOfModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py index cfe36e3c276a..d801b0cda6b5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py @@ -36,7 +36,8 @@ class ArrayOfArrayOfNumberOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py index 9ceaa87a87f6..96ce0f69f2fd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py @@ -36,7 +36,8 @@ class ArrayOfNumberOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py index 6d93cb5df852..cbb543e5cfe4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py @@ -40,7 +40,8 @@ class ArrayTest(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/basque_pig.py b/samples/openapi3/client/petstore/python/petstore_api/models/basque_pig.py index e5c39c3772a2..6d03a549ec00 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/basque_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/basque_pig.py @@ -37,7 +37,8 @@ class BasquePig(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py index 5783fd27be18..9f0eaab95acc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py @@ -41,7 +41,8 @@ class Capitalization(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py index b88c53316f0b..931554c725ad 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py @@ -36,7 +36,8 @@ class Cat(Animal): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/category.py b/samples/openapi3/client/petstore/python/petstore_api/models/category.py index 0d274dc21d8a..38daeb84aa38 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/category.py @@ -36,7 +36,8 @@ class Category(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/circular_reference_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/circular_reference_model.py index 5d753c240374..d4171cbe4d2c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/circular_reference_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/circular_reference_model.py @@ -36,7 +36,8 @@ class CircularReferenceModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py index ca6eb2eb7186..601e5353de6f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py @@ -36,7 +36,8 @@ class ClassModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/client.py b/samples/openapi3/client/petstore/python/petstore_api/models/client.py index 338f1449071b..7dd00901d946 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/client.py @@ -35,7 +35,8 @@ class Client(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/color.py b/samples/openapi3/client/petstore/python/petstore_api/models/color.py index 287542b1f82a..638d942a34e7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/color.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/color.py @@ -46,7 +46,8 @@ class Color(BaseModel): one_of_schemas: List[str] = Literal["List[int]", "str"] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/creature.py b/samples/openapi3/client/petstore/python/petstore_api/models/creature.py index bd8a30cf11d8..60421bb1ae6b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/creature.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/creature.py @@ -37,7 +37,8 @@ class Creature(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/creature_info.py b/samples/openapi3/client/petstore/python/petstore_api/models/creature_info.py index 3bf72fb6efbd..33841c6305e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/creature_info.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/creature_info.py @@ -35,7 +35,8 @@ class CreatureInfo(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/danish_pig.py b/samples/openapi3/client/petstore/python/petstore_api/models/danish_pig.py index 9fb423786005..a89183607b36 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/danish_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/danish_pig.py @@ -37,7 +37,8 @@ class DanishPig(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/deprecated_object.py b/samples/openapi3/client/petstore/python/petstore_api/models/deprecated_object.py index 46a203850a32..f75a9da44907 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/deprecated_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/deprecated_object.py @@ -35,7 +35,8 @@ class DeprecatedObject(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py index 6e62219ba06b..1b7b61dd1783 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py @@ -36,7 +36,8 @@ class Dog(Animal): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dummy_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/dummy_model.py index c54d487cadc0..321eef90ce64 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dummy_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/dummy_model.py @@ -36,7 +36,8 @@ class DummyModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py index 5f6cf2a88a91..5ed06a50d00d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py @@ -57,7 +57,8 @@ def array_enum_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py index 45b1c732feca..71bf3c4413e4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py @@ -95,7 +95,8 @@ def enum_number_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file.py b/samples/openapi3/client/petstore/python/petstore_api/models/file.py index 89997f70dfba..7d84e5190069 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/file.py @@ -36,7 +36,8 @@ class File(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py index 2027ddd571b8..d52e09861a67 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py @@ -37,7 +37,8 @@ class FileSchemaTestClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/first_ref.py b/samples/openapi3/client/petstore/python/petstore_api/models/first_ref.py index 3711a163b052..5542541c95fb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/first_ref.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/first_ref.py @@ -36,7 +36,8 @@ class FirstRef(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py index 91cd993847cc..9d8160318a06 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py @@ -35,7 +35,8 @@ class Foo(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/foo_get_default_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/foo_get_default_response.py index 4100c4d4273e..b242b602212c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/foo_get_default_response.py @@ -36,7 +36,8 @@ class FooGetDefaultResponse(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py index b904825ab0a1..12f3f5885d42 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py @@ -94,7 +94,8 @@ def pattern_with_digits_and_delimiter_validate_regular_expression(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py index ebf6e7f3c764..d422c8a17338 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py @@ -36,7 +36,8 @@ class HasOnlyReadOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py index 8805d93f7502..4b5c69f5f8a3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py @@ -36,7 +36,8 @@ class HealthCheckResult(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inner_dict_with_property.py b/samples/openapi3/client/petstore/python/petstore_api/models/inner_dict_with_property.py index 636878e55cf1..08fceba1ad30 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inner_dict_with_property.py @@ -36,7 +36,8 @@ class InnerDictWithProperty(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/int_or_string.py b/samples/openapi3/client/petstore/python/petstore_api/models/int_or_string.py index 2a0998a5b544..a7203af4ac52 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/int_or_string.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/int_or_string.py @@ -44,7 +44,8 @@ class IntOrString(BaseModel): one_of_schemas: List[str] = Literal["int", "str"] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/list_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/list_class.py index 17757c4ce9ce..cb9f9cbd54d1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/list_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/list_class.py @@ -36,7 +36,8 @@ class ListClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/map_of_array_of_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/map_of_array_of_model.py index 0297d0840055..4d5d5a875c2b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/map_of_array_of_model.py @@ -37,7 +37,8 @@ class MapOfArrayOfModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py index 086394a40861..562647339a30 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py @@ -48,7 +48,8 @@ def map_of_enum_string_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py index c9f27d28d154..138501aef5fd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -39,7 +39,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py index 60b2775cc5ec..db0d6c82d6eb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py @@ -37,7 +37,8 @@ class Model200Response(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py index 7cdb0c86f25b..e5dda1933348 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py @@ -36,7 +36,8 @@ class ModelReturn(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/name.py b/samples/openapi3/client/petstore/python/petstore_api/models/name.py index e5e627228de2..84340c8acd4f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/name.py @@ -39,7 +39,8 @@ class Name(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py index 8cec60ec7368..fc38db22ac01 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py @@ -47,7 +47,8 @@ class NullableClass(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_property.py b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_property.py index 9d8a77f9d9fe..f44ae9253bb9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_property.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_property.py @@ -48,7 +48,8 @@ def name_validate_regular_expression(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py index fe310c72963d..bf460b8efc5f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py @@ -36,7 +36,8 @@ class NumberOnly(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python/petstore_api/models/object_to_test_additional_properties.py index d9aa1d1dfe82..69efac6a9d63 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/object_to_test_additional_properties.py @@ -36,7 +36,8 @@ class ObjectToTestAdditionalProperties(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python/petstore_api/models/object_with_deprecated_fields.py index 49c329ecea5d..6200d54f77f3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/object_with_deprecated_fields.py @@ -40,7 +40,8 @@ class ObjectWithDeprecatedFields(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/one_of_enum_string.py b/samples/openapi3/client/petstore/python/petstore_api/models/one_of_enum_string.py index 614e0fd658f5..b099c7bab578 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/one_of_enum_string.py @@ -44,7 +44,8 @@ class OneOfEnumString(BaseModel): one_of_schemas: List[str] = Literal["EnumString1", "EnumString2"] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/order.py b/samples/openapi3/client/petstore/python/petstore_api/models/order.py index c65dc396d4d0..2543b6c79e75 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/order.py @@ -51,7 +51,8 @@ def status_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py index cf24c951e286..452462bc9ca9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py @@ -37,7 +37,8 @@ class OuterComposite(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_object_with_enum_property.py index f68b80d86428..f3aeef5e06c7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_object_with_enum_property.py @@ -38,7 +38,8 @@ class OuterObjectWithEnumProperty(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/parent.py b/samples/openapi3/client/petstore/python/petstore_api/models/parent.py index 0b6631cafdac..8409e17062df 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/parent.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/parent.py @@ -37,7 +37,8 @@ class Parent(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/parent_with_optional_dict.py b/samples/openapi3/client/petstore/python/petstore_api/models/parent_with_optional_dict.py index ac73b1bba6d2..f02d65b50444 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/parent_with_optional_dict.py @@ -37,7 +37,8 @@ class ParentWithOptionalDict(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py index e4c2a576b7fa..a8da57a35278 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py @@ -54,7 +54,8 @@ def status_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/pig.py b/samples/openapi3/client/petstore/python/petstore_api/models/pig.py index 8fef73ebb809..31a6571cbeb2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/pig.py @@ -44,7 +44,8 @@ class Pig(BaseModel): one_of_schemas: List[str] = Literal["BasquePig", "DanishPig"] model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/property_name_collision.py b/samples/openapi3/client/petstore/python/petstore_api/models/property_name_collision.py index 22127e478c81..f3869d330ab3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/property_name_collision.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/property_name_collision.py @@ -38,7 +38,8 @@ class PropertyNameCollision(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py index c8dd658647e0..76329755f6d3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py @@ -36,7 +36,8 @@ class ReadOnlyFirst(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/second_ref.py b/samples/openapi3/client/petstore/python/petstore_api/models/second_ref.py index 6dc55f9a6233..e16421deca5d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/second_ref.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/second_ref.py @@ -36,7 +36,8 @@ class SecondRef(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/self_reference_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/self_reference_model.py index fda9fb712fb7..9508408b5d35 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/self_reference_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/self_reference_model.py @@ -36,7 +36,8 @@ class SelfReferenceModel(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py index 276a5a972914..ac2256a25435 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py @@ -36,7 +36,8 @@ class SpecialModelName(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/special_name.py b/samples/openapi3/client/petstore/python/petstore_api/models/special_name.py index 5b4d2dca00c7..540f75c8059a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/special_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/special_name.py @@ -49,7 +49,8 @@ def var_schema_validate_enum(cls, value): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py index a70d80306a06..d53d642ef7fd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py @@ -36,7 +36,8 @@ class Tag(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/test_error_responses_with_model400_response.py new file mode 100644 index 000000000000..cf0098df56c3 --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/models/test_error_responses_with_model400_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self + +class TestErrorResponsesWithModel400Response(BaseModel): + """ + TestErrorResponsesWithModel400Response + """ # noqa: E501 + reason400: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reason400"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestErrorResponsesWithModel400Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + _dict = self.model_dump( + by_alias=True, + exclude={ + "additional_properties", + }, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of TestErrorResponsesWithModel400Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reason400": obj.get("reason400") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/test_error_responses_with_model404_response.py new file mode 100644 index 000000000000..aa8d6232defd --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/models/test_error_responses_with_model404_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self + +class TestErrorResponsesWithModel404Response(BaseModel): + """ + TestErrorResponsesWithModel404Response + """ # noqa: E501 + reason404: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reason404"] + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestErrorResponsesWithModel404Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + _dict = self.model_dump( + by_alias=True, + exclude={ + "additional_properties", + }, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of TestErrorResponsesWithModel404Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reason404": obj.get("reason404") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/test_inline_freeform_additional_properties_request.py b/samples/openapi3/client/petstore/python/petstore_api/models/test_inline_freeform_additional_properties_request.py index a9424649743c..c8d66e9d6389 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/test_inline_freeform_additional_properties_request.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/test_inline_freeform_additional_properties_request.py @@ -36,7 +36,8 @@ class TestInlineFreeformAdditionalPropertiesRequest(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/tiger.py b/samples/openapi3/client/petstore/python/petstore_api/models/tiger.py index 212019224c4e..1bd884664e0d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/tiger.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/tiger.py @@ -35,7 +35,8 @@ class Tiger(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py b/samples/openapi3/client/petstore/python/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py index 556d88383895..9c840503bca9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/unnamed_dict_with_additional_model_list_properties.py @@ -37,7 +37,8 @@ class UnnamedDictWithAdditionalModelListProperties(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py b/samples/openapi3/client/petstore/python/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py index a36b3e9c5894..469f2e4b2ce0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/unnamed_dict_with_additional_string_list_properties.py @@ -36,7 +36,8 @@ class UnnamedDictWithAdditionalStringListProperties(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/user.py b/samples/openapi3/client/petstore/python/petstore_api/models/user.py index e88fd7eaadc6..f5ad26584e9e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/user.py @@ -43,7 +43,8 @@ class User(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/with_nested_one_of.py b/samples/openapi3/client/petstore/python/petstore_api/models/with_nested_one_of.py index 574f8b64dc85..a1401068f566 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/with_nested_one_of.py @@ -39,7 +39,8 @@ class WithNestedOneOf(BaseModel): model_config = { "populate_by_name": True, - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } diff --git a/samples/openapi3/client/petstore/python/petstore_api/rest.py b/samples/openapi3/client/petstore/python/petstore_api/rest.py index da531ca1461b..a7ba897c3ed7 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/rest.py +++ b/samples/openapi3/client/petstore/python/petstore_api/rest.py @@ -21,8 +21,20 @@ from petstore_api.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + class RESTResponse(io.IOBase): def __init__(self, resp) -> None: @@ -77,15 +89,27 @@ def __init__(self, configuration) -> None: # https pool manager if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + self.pool_manager = SOCKSProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.ProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: self.pool_manager = urllib3.PoolManager( cert_reqs=cert_reqs, @@ -208,6 +232,15 @@ def request( headers=headers, preload_content=False ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided diff --git a/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model400_response.py b/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model400_response.py new file mode 100644 index 000000000000..35db7ba74fb7 --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model400_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.test_error_responses_with_model400_response import TestErrorResponsesWithModel400Response + +class TestTestErrorResponsesWithModel400Response(unittest.TestCase): + """TestErrorResponsesWithModel400Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestErrorResponsesWithModel400Response: + """Test TestErrorResponsesWithModel400Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestErrorResponsesWithModel400Response` + """ + model = TestErrorResponsesWithModel400Response() + if include_optional: + return TestErrorResponsesWithModel400Response( + reason400 = '' + ) + else: + return TestErrorResponsesWithModel400Response( + ) + """ + + def testTestErrorResponsesWithModel400Response(self): + """Test TestErrorResponsesWithModel400Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model404_response.py b/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model404_response.py new file mode 100644 index 000000000000..e9c97c0f484b --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_test_error_responses_with_model404_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.test_error_responses_with_model404_response import TestErrorResponsesWithModel404Response + +class TestTestErrorResponsesWithModel404Response(unittest.TestCase): + """TestErrorResponsesWithModel404Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestErrorResponsesWithModel404Response: + """Test TestErrorResponsesWithModel404Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestErrorResponsesWithModel404Response` + """ + model = TestErrorResponsesWithModel404Response() + if include_optional: + return TestErrorResponsesWithModel404Response( + reason404 = '' + ) + else: + return TestErrorResponsesWithModel404Response( + ) + """ + + def testTestErrorResponsesWithModel404Response(self): + """Test TestErrorResponsesWithModel404Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests/test_api.py b/samples/openapi3/client/petstore/python/tests/test_api.py new file mode 100644 index 000000000000..8237969c4943 --- /dev/null +++ b/samples/openapi3/client/petstore/python/tests/test_api.py @@ -0,0 +1,84 @@ +import json +import unittest +from unittest.mock import patch, Mock + +import pytest + +import petstore_api + + +class TestMultipleResponseTypes(unittest.TestCase): + def setUp(self): + self.api_client = petstore_api.ApiClient() + self.fake_api = petstore_api.FakeApi(self.api_client) + + def test_204(self): + mock_resp = Mock() + mock_resp.status = 204 + mock_resp.data = b"" + mock_resp.getheaders.return_value = {} + + with patch( + "petstore_api.api_client.ApiClient.call_api", return_value=mock_resp + ): + returned = self.fake_api.test_empty_and_non_empty_responses() + + assert returned is None + + def test_206(self): + mock_resp = Mock() + mock_resp.status = 206 + mock_resp.data = b"some text" + mock_resp.getheaders.return_value = {} + mock_resp.getheader = ( + lambda name: "text/plain" if name == "content-type" else Mock() + ) + + with patch( + "petstore_api.api_client.ApiClient.call_api", return_value=mock_resp + ): + returned = self.fake_api.test_empty_and_non_empty_responses() + + assert returned == "some text" + + +class TestErrorResponsesWithModels(unittest.TestCase): + def setUp(self): + self.api_client = petstore_api.ApiClient() + self.fake_api = petstore_api.FakeApi(self.api_client) + + def test_400(self): + mock_resp = Mock() + mock_resp.status = 400 + mock_resp.data = json.dumps({"reason400": "400 reason"}).encode("utf-8") + mock_resp.getheaders.return_value = {} + mock_resp.getheader.return_value = "" + + with patch( + "petstore_api.api_client.ApiClient.call_api", return_value=mock_resp + ): + with pytest.raises(petstore_api.exceptions.BadRequestException) as exc_info: + self.fake_api.test_error_responses_with_model() + + expected_resp = petstore_api.TestErrorResponsesWithModel400Response( + reason400="400 reason" + ) + assert exc_info.value.data == expected_resp + + def test_404(self): + mock_resp = Mock() + mock_resp.status = 404 + mock_resp.data = json.dumps({"reason404": "404 reason"}).encode("utf-8") + mock_resp.getheaders.return_value = {} + mock_resp.getheader.return_value = "" + + with patch( + "petstore_api.api_client.ApiClient.call_api", return_value=mock_resp + ): + with pytest.raises(petstore_api.exceptions.NotFoundException) as exc_info: + self.fake_api.test_error_responses_with_model() + + expected_resp = petstore_api.TestErrorResponsesWithModel404Response( + reason404="404 reason" + ) + assert exc_info.value.data == expected_resp diff --git a/samples/openapi3/server/petstore/go/go-petstore/go/api_pet.go b/samples/openapi3/server/petstore/go/go-petstore/go/api_pet.go index d00438d9bfd5..6b7c61f9ca42 100644 --- a/samples/openapi3/server/petstore/go/go-petstore/go/api_pet.go +++ b/samples/openapi3/server/petstore/go/go-petstore/go/api_pet.go @@ -13,6 +13,7 @@ import ( "encoding/json" "net/http" "strings" + "os" "github.com/go-chi/chi/v5" ) @@ -270,10 +271,15 @@ func (c *PetAPIController) UploadFile(w http.ResponseWriter, r *http.Request) { additionalMetadataParam := r.FormValue("additionalMetadata") - fileParam, err := ReadFormFileToTempFile(r, "file") - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var fileParam *os.File + { + param, err := ReadFormFileToTempFile(r, "file") + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + fileParam = param } diff --git a/samples/openapi3/server/petstore/go/go-petstore/go/api_user.go b/samples/openapi3/server/petstore/go/go-petstore/go/api_user.go index 405b26523d70..998327702a27 100644 --- a/samples/openapi3/server/petstore/go/go-petstore/go/api_user.go +++ b/samples/openapi3/server/petstore/go/go-petstore/go/api_user.go @@ -178,13 +178,19 @@ func (c *UserAPIController) DeleteUser(w http.ResponseWriter, r *http.Request) { c.errorHandler(w, r, &RequiredError{"username"}, nil) return } - booleanTestParam, err := parseBoolParameter( - query.Get("boolean_test"), - WithParse[bool](parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var booleanTestParam bool + if query.Has("boolean_test") { + param, err := parseBoolParameter( + query.Get("boolean_test"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + booleanTestParam = param + } else { } result, err := c.service.DeleteUser(r.Context(), usernameParam, booleanTestParam) // If an error occurred, encode the error with the status code @@ -216,47 +222,93 @@ func (c *UserAPIController) GetUserByName(w http.ResponseWriter, r *http.Request // LoginUser - Logs user into the system func (c *UserAPIController) LoginUser(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() - usernameParam := query.Get("username") - passwordParam := query.Get("password") - int32TestParam, err := parseNumericParameter[int32]( - query.Get("int32_test"), - WithParse[int32](parseInt32), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) + var usernameParam string + if query.Has("username") { + param := query.Get("username") + + usernameParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "username"}, nil) return } - int64TestParam, err := parseNumericParameter[int64]( - query.Get("int64_test"), - WithParse[int64](parseInt64), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) + var passwordParam string + if query.Has("password") { + param := query.Get("password") + + passwordParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "password"}, nil) return } - float32TestParam, err := parseNumericParameter[float32]( - query.Get("float32_test"), - WithParse[float32](parseFloat32), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var int32TestParam int32 + if query.Has("int32_test") { + param, err := parseNumericParameter[int32]( + query.Get("int32_test"), + WithParse[int32](parseInt32), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + int32TestParam = param + } else { } - float64TestParam, err := parseNumericParameter[float64]( - query.Get("float64_test"), - WithParse[float64](parseFloat64), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var int64TestParam int64 + if query.Has("int64_test") { + param, err := parseNumericParameter[int64]( + query.Get("int64_test"), + WithParse[int64](parseInt64), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + int64TestParam = param + } else { } - booleanTestParam, err := parseBoolParameter( - query.Get("boolean_test"), - WithParse[bool](parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var float32TestParam float32 + if query.Has("float32_test") { + param, err := parseNumericParameter[float32]( + query.Get("float32_test"), + WithParse[float32](parseFloat32), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + float32TestParam = param + } else { + } + var float64TestParam float64 + if query.Has("float64_test") { + param, err := parseNumericParameter[float64]( + query.Get("float64_test"), + WithParse[float64](parseFloat64), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + float64TestParam = param + } else { + } + var booleanTestParam bool + if query.Has("boolean_test") { + param, err := parseBoolParameter( + query.Get("boolean_test"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + booleanTestParam = param + } else { } result, err := c.service.LoginUser(r.Context(), usernameParam, passwordParam, int32TestParam, int64TestParam, float32TestParam, float64TestParam, booleanTestParam) // If an error occurred, encode the error with the status code diff --git a/samples/server/petstore/go-api-server/.openapi-generator/FILES b/samples/server/petstore/go-api-server/.openapi-generator/FILES index 2e3c628098c4..a02f1779f262 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/FILES +++ b/samples/server/petstore/go-api-server/.openapi-generator/FILES @@ -16,6 +16,7 @@ go/logger.go go/model_an_object.go go/model_api_response.go go/model_category.go +go/model_colour.go go/model_gender.go go/model_order.go go/model_order_info.go diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index 3afede1048dc..f1b01ec3e136 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -119,6 +119,61 @@ paths: summary: Finds Pets by status tags: - pet + /pet/searchPetWithManyFilters: + get: + description: Search endpoint + operationId: searchPet + parameters: + - description: age of the pet + explode: true + in: query + name: age + required: false + schema: + format: int64 + nullable: true + type: integer + style: form + - description: Price of the pet + explode: true + in: query + name: price + required: false + schema: + nullable: true + type: number + style: form + - description: Find pets born after this date + explode: false + in: query + name: bornAfter + required: false + schema: + format: date-time + nullable: true + type: string + style: form + - description: Is the pet classified as old + explode: true + in: query + name: old + required: false + schema: + nullable: true + type: boolean + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + summary: Search Pets by filters + tags: + - pet /pet/findByTags: get: deprecated: true @@ -154,6 +209,13 @@ paths: format: date-time type: string style: form + - explode: true + in: query + name: colour + required: false + schema: + $ref: '#/components/schemas/Colour' + style: form responses: "200": content: @@ -1186,6 +1248,12 @@ components: - male - female type: string + Colour: + enum: + - Blue + - White + nullable: true + type: string ApiResponse: description: Describes the result of uploading an image resource example: diff --git a/samples/server/petstore/go-api-server/go/api.go b/samples/server/petstore/go-api-server/go/api.go index 2dab3b169782..e1c73dc0d204 100644 --- a/samples/server/petstore/go-api-server/go/api.go +++ b/samples/server/petstore/go-api-server/go/api.go @@ -32,6 +32,7 @@ type PetAPIRouter interface { GetPetImageById(http.ResponseWriter, *http.Request) GetPetsByTime(http.ResponseWriter, *http.Request) GetPetsUsingBooleanQueryParameters(http.ResponseWriter, *http.Request) + SearchPet(http.ResponseWriter, *http.Request) UpdatePet(http.ResponseWriter, *http.Request) UpdatePetWithForm(http.ResponseWriter, *http.Request) UploadFile(http.ResponseWriter, *http.Request) @@ -71,11 +72,12 @@ type PetAPIServicer interface { FilterPetsByCategory(context.Context, Gender, Species, []Species) (ImplResponse, error) FindPetsByStatus(context.Context, []string) (ImplResponse, error) // Deprecated - FindPetsByTags(context.Context, []string, time.Time, time.Time) (ImplResponse, error) + FindPetsByTags(context.Context, []string, time.Time, time.Time, Colour) (ImplResponse, error) GetPetById(context.Context, int64) (ImplResponse, error) GetPetImageById(context.Context, int64) (ImplResponse, error) GetPetsByTime(context.Context, time.Time) (ImplResponse, error) GetPetsUsingBooleanQueryParameters(context.Context, bool, bool, bool) (ImplResponse, error) + SearchPet(context.Context, *int64, *float32, *time.Time, *bool) (ImplResponse, error) UpdatePet(context.Context, Pet) (ImplResponse, error) UpdatePetWithForm(context.Context, int64, string, string) (ImplResponse, error) UploadFile(context.Context, int64, string, []string, *os.File) (ImplResponse, error) diff --git a/samples/server/petstore/go-api-server/go/api_pet.go b/samples/server/petstore/go-api-server/go/api_pet.go index 68780fcff4bc..7442744c2497 100644 --- a/samples/server/petstore/go-api-server/go/api_pet.go +++ b/samples/server/petstore/go-api-server/go/api_pet.go @@ -13,6 +13,8 @@ import ( "encoding/json" "net/http" "strings" + "time" + "os" "github.com/gorilla/mux" ) @@ -95,6 +97,11 @@ func (c *PetAPIController) Routes() Routes { "/v2/pets/boolean/parsing", c.GetPetsUsingBooleanQueryParameters, }, + "SearchPet": Route{ + strings.ToUpper("Get"), + "/v2/pet/searchPetWithManyFilters", + c.SearchPet, + }, "UpdatePet": Route{ strings.ToUpper("Put"), "/v2/pet", @@ -176,13 +183,13 @@ func (c *PetAPIController) FilterPetsByCategory(w http.ResponseWriter, r *http.R c.errorHandler(w, r, &ParsingError{Err: err}, nil) return } - if !query.Has("species"){ - c.errorHandler(w, r, &RequiredError{"species"}, nil) - return - } - speciesParam, err := NewSpeciesFromValue(query.Get("species")) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) + var speciesParam Species + if query.Has("species") { + param := Species(query.Get("species")) + + speciesParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "species"}, nil) return } var notSpeciesParam []Species @@ -233,21 +240,38 @@ func (c *PetAPIController) FindPetsByTags(w http.ResponseWriter, r *http.Request if query.Has("tags") { tagsParam = strings.Split(query.Get("tags"), ",") } - if !query.Has("bornAfter"){ + var bornAfterParam time.Time + if query.Has("bornAfter"){ + param, err := parseTime(query.Get("bornAfter")) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + bornAfterParam = param + } else { c.errorHandler(w, r, &RequiredError{"bornAfter"}, nil) return } - bornAfterParam, err := parseTime(query.Get("bornAfter")) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return - } - bornBeforeParam, err := parseTime(query.Get("bornBefore")) - if err != nil { + var bornBeforeParam time.Time + if query.Has("bornBefore"){ + param, err := parseTime(query.Get("bornBefore")) + if err != nil { c.errorHandler(w, r, &ParsingError{Err: err}, nil) return + } + + bornBeforeParam = param + } else { } - result, err := c.service.FindPetsByTags(r.Context(), tagsParam, bornAfterParam, bornBeforeParam) + var colourParam Colour + if query.Has("colour") { + param := Colour(query.Get("colour")) + + colourParam = param + } else { + } + result, err := c.service.FindPetsByTags(r.Context(), tagsParam, bornAfterParam, bornBeforeParam, colourParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -320,31 +344,119 @@ func (c *PetAPIController) GetPetsByTime(w http.ResponseWriter, r *http.Request) // GetPetsUsingBooleanQueryParameters - Get the pets by only using boolean query parameters func (c *PetAPIController) GetPetsUsingBooleanQueryParameters(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() - exprParam, err := parseBoolParameter( - query.Get("expr"), - WithRequire[bool](parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var exprParam bool + if query.Has("expr") { + param, err := parseBoolParameter( + query.Get("expr"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + exprParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "expr"}, nil) + return + } + var groupingParam bool + if query.Has("grouping") { + param, err := parseBoolParameter( + query.Get("grouping"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + groupingParam = param + } else { + } + var inactiveParam bool + if query.Has("inactive") { + param, err := parseBoolParameter( + query.Get("inactive"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + inactiveParam = param + } else { + var param bool = false + inactiveParam = param } - groupingParam, err := parseBoolParameter( - query.Get("grouping"), - WithParse[bool](parseBool), - ) + result, err := c.service.GetPetsUsingBooleanQueryParameters(r.Context(), exprParam, groupingParam, inactiveParam) + // If an error occurred, encode the error with the status code if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) + c.errorHandler(w, r, err, &result) return } - inactiveParam, err := parseBoolParameter( - query.Get("inactive"), - WithDefaultOrParse[bool](false, parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + // If no error, encode the body and the result code + EncodeJSONResponse(result.Body, &result.Code, result.Headers, w) +} + +// SearchPet - Search Pets by filters +func (c *PetAPIController) SearchPet(w http.ResponseWriter, r *http.Request) { + query := r.URL.Query() + var ageParam *int64 + if query.Has("age") { + param, err := parseNumericParameter[int64]( + query.Get("age"), + WithParse[int64](parseInt64), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + ageParam = ¶m + } else { + } + var priceParam *float32 + if query.Has("price") { + param, err := parseNumericParameter[float32]( + query.Get("price"), + WithParse[float32](parseFloat32), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + priceParam = ¶m + } else { } - result, err := c.service.GetPetsUsingBooleanQueryParameters(r.Context(), exprParam, groupingParam, inactiveParam) + var bornAfterParam *time.Time + if query.Has("bornAfter"){ + param, err := parseTime(query.Get("bornAfter")) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + bornAfterParam = ¶m + } else { + } + var oldParam *bool + if query.Has("old") { + param, err := parseBoolParameter( + query.Get("old"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + oldParam = ¶m + } else { + } + result, err := c.service.SearchPet(r.Context(), ageParam, priceParam, bornAfterParam, oldParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -433,10 +545,15 @@ func (c *PetAPIController) UploadFile(w http.ResponseWriter, r *http.Request) { extraOptionalMetadataParam := strings.Split(r.FormValue("extraOptionalMetadata"), ",") - fileParam, err := ReadFormFileToTempFile(r, "file") - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var fileParam *os.File + { + param, err := ReadFormFileToTempFile(r, "file") + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + fileParam = param } @@ -468,10 +585,15 @@ func (c *PetAPIController) UploadFileArrayOfFiles(w http.ResponseWriter, r *http additionalMetadataParam := r.FormValue("additionalMetadata") - filesParam, err := ReadFormFilesToTempFiles(r, "files") - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var filesParam []*os.File + { + param, err := ReadFormFilesToTempFiles(r, "files") + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + filesParam = param } diff --git a/samples/server/petstore/go-api-server/go/api_pet_service.go b/samples/server/petstore/go-api-server/go/api_pet_service.go index a63455b2ba4c..269bb1234f21 100644 --- a/samples/server/petstore/go-api-server/go/api_pet_service.go +++ b/samples/server/petstore/go-api-server/go/api_pet_service.go @@ -83,7 +83,7 @@ func (s *PetAPIService) FindPetsByStatus(ctx context.Context, status []string) ( // FindPetsByTags - Finds Pets by tags // Deprecated -func (s *PetAPIService) FindPetsByTags(ctx context.Context, tags []string, bornAfter time.Time, bornBefore time.Time) (ImplResponse, error) { +func (s *PetAPIService) FindPetsByTags(ctx context.Context, tags []string, bornAfter time.Time, bornBefore time.Time, colour Colour) (ImplResponse, error) { // TODO - update FindPetsByTags with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. @@ -152,6 +152,17 @@ func (s *PetAPIService) GetPetsUsingBooleanQueryParameters(ctx context.Context, return Response(http.StatusNotImplemented, nil), errors.New("GetPetsUsingBooleanQueryParameters method not implemented") } +// SearchPet - Search Pets by filters +func (s *PetAPIService) SearchPet(ctx context.Context, age *int64, price *float32, bornAfter *time.Time, old *bool) (ImplResponse, error) { + // TODO - update SearchPet with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + + // TODO: Uncomment the next line to return response Response(200, []Pet{}) or use other options such as http.Ok ... + // return Response(200, []Pet{}), nil + + return Response(http.StatusNotImplemented, nil), errors.New("SearchPet method not implemented") +} + // UpdatePet - Update an existing pet func (s *PetAPIService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, error) { // TODO - update UpdatePet with the required logic for this service method. diff --git a/samples/server/petstore/go-api-server/go/api_user.go b/samples/server/petstore/go-api-server/go/api_user.go index 04e30486e0ba..2828512c89ff 100644 --- a/samples/server/petstore/go-api-server/go/api_user.go +++ b/samples/server/petstore/go-api-server/go/api_user.go @@ -179,13 +179,19 @@ func (c *UserAPIController) DeleteUser(w http.ResponseWriter, r *http.Request) { c.errorHandler(w, r, &RequiredError{"username"}, nil) return } - booleanTestParam, err := parseBoolParameter( - query.Get("boolean_test"), - WithParse[bool](parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var booleanTestParam bool + if query.Has("boolean_test") { + param, err := parseBoolParameter( + query.Get("boolean_test"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + booleanTestParam = param + } else { } result, err := c.service.DeleteUser(r.Context(), usernameParam, booleanTestParam) // If an error occurred, encode the error with the status code @@ -218,16 +224,38 @@ func (c *UserAPIController) GetUserByName(w http.ResponseWriter, r *http.Request // LoginUser - Logs user into the system func (c *UserAPIController) LoginUser(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() - usernameParam := query.Get("username") - passwordParam := query.Get("password") - booleanTestParam, err := parseBoolParameter( - query.Get("boolean_test"), - WithParse[bool](parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) + var usernameParam string + if query.Has("username") { + param := query.Get("username") + + usernameParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "username"}, nil) + return + } + var passwordParam string + if query.Has("password") { + param := query.Get("password") + + passwordParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "password"}, nil) return } + var booleanTestParam bool + if query.Has("boolean_test") { + param, err := parseBoolParameter( + query.Get("boolean_test"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + booleanTestParam = param + } else { + } result, err := c.service.LoginUser(r.Context(), usernameParam, passwordParam, booleanTestParam) // If an error occurred, encode the error with the status code if err != nil { diff --git a/samples/server/petstore/go-api-server/go/model_colour.go b/samples/server/petstore/go-api-server/go/model_colour.go new file mode 100644 index 000000000000..3a1569cd0961 --- /dev/null +++ b/samples/server/petstore/go-api-server/go/model_colour.go @@ -0,0 +1,66 @@ +/* + * 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. + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + + +import ( + "fmt" +) + + + +type Colour string + +// List of Colour +const ( + BLUE Colour = "Blue" + WHITE Colour = "White" +) + +// AllowedColourEnumValues is all the allowed values of Colour enum +var AllowedColourEnumValues = []Colour{ + "Blue", + "White", +} + +// validColourEnumValue provides a map of Colours for fast verification of use input +var validColourEnumValues = map[Colour]struct{}{ + "Blue": {}, + "White": {}, +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Colour) IsValid() bool { + _, ok := validColourEnumValues[v] + return ok +} + +// NewColourFromValue returns a pointer to a valid Colour +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewColourFromValue(v string) (Colour, error) { + ev := Colour(v) + if ev.IsValid() { + return ev, nil + } else { + return "", fmt.Errorf("invalid value '%v' for Colour: valid values are %v", v, AllowedColourEnumValues) + } +} + + + +// AssertColourRequired checks if the required fields are not zero-ed +func AssertColourRequired(obj Colour) error { + return nil +} + +// AssertColourConstraints checks if the values respects the defined constraints +func AssertColourConstraints(obj Colour) error { + return nil +} diff --git a/samples/server/petstore/go-chi-server/.openapi-generator/FILES b/samples/server/petstore/go-chi-server/.openapi-generator/FILES index 2e3c628098c4..a02f1779f262 100644 --- a/samples/server/petstore/go-chi-server/.openapi-generator/FILES +++ b/samples/server/petstore/go-chi-server/.openapi-generator/FILES @@ -16,6 +16,7 @@ go/logger.go go/model_an_object.go go/model_api_response.go go/model_category.go +go/model_colour.go go/model_gender.go go/model_order.go go/model_order_info.go diff --git a/samples/server/petstore/go-chi-server/api/openapi.yaml b/samples/server/petstore/go-chi-server/api/openapi.yaml index 3afede1048dc..f1b01ec3e136 100644 --- a/samples/server/petstore/go-chi-server/api/openapi.yaml +++ b/samples/server/petstore/go-chi-server/api/openapi.yaml @@ -119,6 +119,61 @@ paths: summary: Finds Pets by status tags: - pet + /pet/searchPetWithManyFilters: + get: + description: Search endpoint + operationId: searchPet + parameters: + - description: age of the pet + explode: true + in: query + name: age + required: false + schema: + format: int64 + nullable: true + type: integer + style: form + - description: Price of the pet + explode: true + in: query + name: price + required: false + schema: + nullable: true + type: number + style: form + - description: Find pets born after this date + explode: false + in: query + name: bornAfter + required: false + schema: + format: date-time + nullable: true + type: string + style: form + - description: Is the pet classified as old + explode: true + in: query + name: old + required: false + schema: + nullable: true + type: boolean + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + summary: Search Pets by filters + tags: + - pet /pet/findByTags: get: deprecated: true @@ -154,6 +209,13 @@ paths: format: date-time type: string style: form + - explode: true + in: query + name: colour + required: false + schema: + $ref: '#/components/schemas/Colour' + style: form responses: "200": content: @@ -1186,6 +1248,12 @@ components: - male - female type: string + Colour: + enum: + - Blue + - White + nullable: true + type: string ApiResponse: description: Describes the result of uploading an image resource example: diff --git a/samples/server/petstore/go-chi-server/go/api.go b/samples/server/petstore/go-chi-server/go/api.go index 2dab3b169782..e1c73dc0d204 100644 --- a/samples/server/petstore/go-chi-server/go/api.go +++ b/samples/server/petstore/go-chi-server/go/api.go @@ -32,6 +32,7 @@ type PetAPIRouter interface { GetPetImageById(http.ResponseWriter, *http.Request) GetPetsByTime(http.ResponseWriter, *http.Request) GetPetsUsingBooleanQueryParameters(http.ResponseWriter, *http.Request) + SearchPet(http.ResponseWriter, *http.Request) UpdatePet(http.ResponseWriter, *http.Request) UpdatePetWithForm(http.ResponseWriter, *http.Request) UploadFile(http.ResponseWriter, *http.Request) @@ -71,11 +72,12 @@ type PetAPIServicer interface { FilterPetsByCategory(context.Context, Gender, Species, []Species) (ImplResponse, error) FindPetsByStatus(context.Context, []string) (ImplResponse, error) // Deprecated - FindPetsByTags(context.Context, []string, time.Time, time.Time) (ImplResponse, error) + FindPetsByTags(context.Context, []string, time.Time, time.Time, Colour) (ImplResponse, error) GetPetById(context.Context, int64) (ImplResponse, error) GetPetImageById(context.Context, int64) (ImplResponse, error) GetPetsByTime(context.Context, time.Time) (ImplResponse, error) GetPetsUsingBooleanQueryParameters(context.Context, bool, bool, bool) (ImplResponse, error) + SearchPet(context.Context, *int64, *float32, *time.Time, *bool) (ImplResponse, error) UpdatePet(context.Context, Pet) (ImplResponse, error) UpdatePetWithForm(context.Context, int64, string, string) (ImplResponse, error) UploadFile(context.Context, int64, string, []string, *os.File) (ImplResponse, error) diff --git a/samples/server/petstore/go-chi-server/go/api_pet.go b/samples/server/petstore/go-chi-server/go/api_pet.go index 68d5bbcd057e..8aa3efc99af8 100644 --- a/samples/server/petstore/go-chi-server/go/api_pet.go +++ b/samples/server/petstore/go-chi-server/go/api_pet.go @@ -13,6 +13,8 @@ import ( "encoding/json" "net/http" "strings" + "time" + "os" "github.com/go-chi/chi/v5" ) @@ -95,6 +97,11 @@ func (c *PetAPIController) Routes() Routes { "/v2/pets/boolean/parsing", c.GetPetsUsingBooleanQueryParameters, }, + "SearchPet": Route{ + strings.ToUpper("Get"), + "/v2/pet/searchPetWithManyFilters", + c.SearchPet, + }, "UpdatePet": Route{ strings.ToUpper("Put"), "/v2/pet", @@ -174,13 +181,13 @@ func (c *PetAPIController) FilterPetsByCategory(w http.ResponseWriter, r *http.R c.errorHandler(w, r, &ParsingError{Err: err}, nil) return } - if !query.Has("species"){ - c.errorHandler(w, r, &RequiredError{"species"}, nil) - return - } - speciesParam, err := NewSpeciesFromValue(query.Get("species")) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) + var speciesParam Species + if query.Has("species") { + param := Species(query.Get("species")) + + speciesParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "species"}, nil) return } var notSpeciesParam []Species @@ -231,21 +238,38 @@ func (c *PetAPIController) FindPetsByTags(w http.ResponseWriter, r *http.Request if query.Has("tags") { tagsParam = strings.Split(query.Get("tags"), ",") } - if !query.Has("bornAfter"){ + var bornAfterParam time.Time + if query.Has("bornAfter"){ + param, err := parseTime(query.Get("bornAfter")) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + bornAfterParam = param + } else { c.errorHandler(w, r, &RequiredError{"bornAfter"}, nil) return } - bornAfterParam, err := parseTime(query.Get("bornAfter")) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return - } - bornBeforeParam, err := parseTime(query.Get("bornBefore")) - if err != nil { + var bornBeforeParam time.Time + if query.Has("bornBefore"){ + param, err := parseTime(query.Get("bornBefore")) + if err != nil { c.errorHandler(w, r, &ParsingError{Err: err}, nil) return + } + + bornBeforeParam = param + } else { } - result, err := c.service.FindPetsByTags(r.Context(), tagsParam, bornAfterParam, bornBeforeParam) + var colourParam Colour + if query.Has("colour") { + param := Colour(query.Get("colour")) + + colourParam = param + } else { + } + result, err := c.service.FindPetsByTags(r.Context(), tagsParam, bornAfterParam, bornBeforeParam, colourParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -315,31 +339,119 @@ func (c *PetAPIController) GetPetsByTime(w http.ResponseWriter, r *http.Request) // GetPetsUsingBooleanQueryParameters - Get the pets by only using boolean query parameters func (c *PetAPIController) GetPetsUsingBooleanQueryParameters(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() - exprParam, err := parseBoolParameter( - query.Get("expr"), - WithRequire[bool](parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var exprParam bool + if query.Has("expr") { + param, err := parseBoolParameter( + query.Get("expr"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + exprParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "expr"}, nil) + return + } + var groupingParam bool + if query.Has("grouping") { + param, err := parseBoolParameter( + query.Get("grouping"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + groupingParam = param + } else { + } + var inactiveParam bool + if query.Has("inactive") { + param, err := parseBoolParameter( + query.Get("inactive"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + inactiveParam = param + } else { + var param bool = false + inactiveParam = param } - groupingParam, err := parseBoolParameter( - query.Get("grouping"), - WithParse[bool](parseBool), - ) + result, err := c.service.GetPetsUsingBooleanQueryParameters(r.Context(), exprParam, groupingParam, inactiveParam) + // If an error occurred, encode the error with the status code if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) + c.errorHandler(w, r, err, &result) return } - inactiveParam, err := parseBoolParameter( - query.Get("inactive"), - WithDefaultOrParse[bool](false, parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + // If no error, encode the body and the result code + EncodeJSONResponse(result.Body, &result.Code, result.Headers, w) +} + +// SearchPet - Search Pets by filters +func (c *PetAPIController) SearchPet(w http.ResponseWriter, r *http.Request) { + query := r.URL.Query() + var ageParam *int64 + if query.Has("age") { + param, err := parseNumericParameter[int64]( + query.Get("age"), + WithParse[int64](parseInt64), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + ageParam = ¶m + } else { + } + var priceParam *float32 + if query.Has("price") { + param, err := parseNumericParameter[float32]( + query.Get("price"), + WithParse[float32](parseFloat32), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + priceParam = ¶m + } else { } - result, err := c.service.GetPetsUsingBooleanQueryParameters(r.Context(), exprParam, groupingParam, inactiveParam) + var bornAfterParam *time.Time + if query.Has("bornAfter"){ + param, err := parseTime(query.Get("bornAfter")) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + bornAfterParam = ¶m + } else { + } + var oldParam *bool + if query.Has("old") { + param, err := parseBoolParameter( + query.Get("old"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + oldParam = ¶m + } else { + } + result, err := c.service.SearchPet(r.Context(), ageParam, priceParam, bornAfterParam, oldParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -426,10 +538,15 @@ func (c *PetAPIController) UploadFile(w http.ResponseWriter, r *http.Request) { extraOptionalMetadataParam := strings.Split(r.FormValue("extraOptionalMetadata"), ",") - fileParam, err := ReadFormFileToTempFile(r, "file") - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var fileParam *os.File + { + param, err := ReadFormFileToTempFile(r, "file") + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + fileParam = param } @@ -460,10 +577,15 @@ func (c *PetAPIController) UploadFileArrayOfFiles(w http.ResponseWriter, r *http additionalMetadataParam := r.FormValue("additionalMetadata") - filesParam, err := ReadFormFilesToTempFiles(r, "files") - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var filesParam []*os.File + { + param, err := ReadFormFilesToTempFiles(r, "files") + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + filesParam = param } diff --git a/samples/server/petstore/go-chi-server/go/api_pet_service.go b/samples/server/petstore/go-chi-server/go/api_pet_service.go index a63455b2ba4c..269bb1234f21 100644 --- a/samples/server/petstore/go-chi-server/go/api_pet_service.go +++ b/samples/server/petstore/go-chi-server/go/api_pet_service.go @@ -83,7 +83,7 @@ func (s *PetAPIService) FindPetsByStatus(ctx context.Context, status []string) ( // FindPetsByTags - Finds Pets by tags // Deprecated -func (s *PetAPIService) FindPetsByTags(ctx context.Context, tags []string, bornAfter time.Time, bornBefore time.Time) (ImplResponse, error) { +func (s *PetAPIService) FindPetsByTags(ctx context.Context, tags []string, bornAfter time.Time, bornBefore time.Time, colour Colour) (ImplResponse, error) { // TODO - update FindPetsByTags with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. @@ -152,6 +152,17 @@ func (s *PetAPIService) GetPetsUsingBooleanQueryParameters(ctx context.Context, return Response(http.StatusNotImplemented, nil), errors.New("GetPetsUsingBooleanQueryParameters method not implemented") } +// SearchPet - Search Pets by filters +func (s *PetAPIService) SearchPet(ctx context.Context, age *int64, price *float32, bornAfter *time.Time, old *bool) (ImplResponse, error) { + // TODO - update SearchPet with the required logic for this service method. + // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + + // TODO: Uncomment the next line to return response Response(200, []Pet{}) or use other options such as http.Ok ... + // return Response(200, []Pet{}), nil + + return Response(http.StatusNotImplemented, nil), errors.New("SearchPet method not implemented") +} + // UpdatePet - Update an existing pet func (s *PetAPIService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, error) { // TODO - update UpdatePet with the required logic for this service method. diff --git a/samples/server/petstore/go-chi-server/go/api_user.go b/samples/server/petstore/go-chi-server/go/api_user.go index 6dc16a801e42..43f8c8974845 100644 --- a/samples/server/petstore/go-chi-server/go/api_user.go +++ b/samples/server/petstore/go-chi-server/go/api_user.go @@ -178,13 +178,19 @@ func (c *UserAPIController) DeleteUser(w http.ResponseWriter, r *http.Request) { c.errorHandler(w, r, &RequiredError{"username"}, nil) return } - booleanTestParam, err := parseBoolParameter( - query.Get("boolean_test"), - WithParse[bool](parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) - return + var booleanTestParam bool + if query.Has("boolean_test") { + param, err := parseBoolParameter( + query.Get("boolean_test"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + booleanTestParam = param + } else { } result, err := c.service.DeleteUser(r.Context(), usernameParam, booleanTestParam) // If an error occurred, encode the error with the status code @@ -216,16 +222,38 @@ func (c *UserAPIController) GetUserByName(w http.ResponseWriter, r *http.Request // LoginUser - Logs user into the system func (c *UserAPIController) LoginUser(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() - usernameParam := query.Get("username") - passwordParam := query.Get("password") - booleanTestParam, err := parseBoolParameter( - query.Get("boolean_test"), - WithParse[bool](parseBool), - ) - if err != nil { - c.errorHandler(w, r, &ParsingError{Err: err}, nil) + var usernameParam string + if query.Has("username") { + param := query.Get("username") + + usernameParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "username"}, nil) + return + } + var passwordParam string + if query.Has("password") { + param := query.Get("password") + + passwordParam = param + } else { + c.errorHandler(w, r, &RequiredError{Field: "password"}, nil) return } + var booleanTestParam bool + if query.Has("boolean_test") { + param, err := parseBoolParameter( + query.Get("boolean_test"), + WithParse[bool](parseBool), + ) + if err != nil { + c.errorHandler(w, r, &ParsingError{Err: err}, nil) + return + } + + booleanTestParam = param + } else { + } result, err := c.service.LoginUser(r.Context(), usernameParam, passwordParam, booleanTestParam) // If an error occurred, encode the error with the status code if err != nil { diff --git a/samples/server/petstore/go-chi-server/go/model_colour.go b/samples/server/petstore/go-chi-server/go/model_colour.go new file mode 100644 index 000000000000..3a1569cd0961 --- /dev/null +++ b/samples/server/petstore/go-chi-server/go/model_colour.go @@ -0,0 +1,66 @@ +/* + * 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. + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstoreserver + + +import ( + "fmt" +) + + + +type Colour string + +// List of Colour +const ( + BLUE Colour = "Blue" + WHITE Colour = "White" +) + +// AllowedColourEnumValues is all the allowed values of Colour enum +var AllowedColourEnumValues = []Colour{ + "Blue", + "White", +} + +// validColourEnumValue provides a map of Colours for fast verification of use input +var validColourEnumValues = map[Colour]struct{}{ + "Blue": {}, + "White": {}, +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Colour) IsValid() bool { + _, ok := validColourEnumValues[v] + return ok +} + +// NewColourFromValue returns a pointer to a valid Colour +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewColourFromValue(v string) (Colour, error) { + ev := Colour(v) + if ev.IsValid() { + return ev, nil + } else { + return "", fmt.Errorf("invalid value '%v' for Colour: valid values are %v", v, AllowedColourEnumValues) + } +} + + + +// AssertColourRequired checks if the required fields are not zero-ed +func AssertColourRequired(obj Colour) error { + return nil +} + +// AssertColourConstraints checks if the values respects the defined constraints +func AssertColourConstraints(obj Colour) error { + return nil +} diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index dd0d10d703f9..1eb30346855c 100755 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -56,8 +56,8 @@ const docusaurusConfig = { }, algolia: { - appId: 'MVE1LN4DBI', - apiKey: '3c3f7f355de15fa3f392264b2e7a5300', + appId: '51ITDG8FYN', + apiKey: '68eb9329427345f267486fd4f2d67b89', indexName: 'openapi-generator', }, diff --git a/website/src/dynamic/users.yml b/website/src/dynamic/users.yml index be7c751c0ba8..4e22ea2f4e54 100644 --- a/website/src/dynamic/users.yml +++ b/website/src/dynamic/users.yml @@ -403,6 +403,11 @@ image: "img/companies/paxos.png" infoLink: "https://www.paxos.com/" pinned: false +- + caption: "Passgenau Digital" + image: "img/companies/passgenau_digital.svg" + infoLink: "https://passgenau.digital/en" + pinned: false - caption: "PLAID, Inc." image: "img/companies/plaidcojp.jpg" @@ -598,6 +603,11 @@ image: "img/companies/wbt_solutions.png" infoLink: "https://www.wbt-solutions.de/" pinned: false +- + caption: we-make.ai + image: "img/companies/wemakeai.svg" + infoLink: "https://we-make.ai/" + pinned: false - caption: Woleet image: "img/companies/woleet.png" diff --git a/website/static/img/companies/passgenau_digital.svg b/website/static/img/companies/passgenau_digital.svg new file mode 100644 index 000000000000..3172afece0f3 --- /dev/null +++ b/website/static/img/companies/passgenau_digital.svg @@ -0,0 +1,113 @@ + + + + diff --git a/website/static/img/companies/wemakeai.svg b/website/static/img/companies/wemakeai.svg new file mode 100644 index 000000000000..c3e28e969be8 --- /dev/null +++ b/website/static/img/companies/wemakeai.svg @@ -0,0 +1,69 @@ + +image/svg+xml \ No newline at end of file