diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index c453503d315e..6750d76e7f13 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -10,7 +10,7 @@ assignees: ''
#### Bug Report Checklist
- [ ] Have you provided a full/minimal spec to reproduce the issue?
-- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
+- [ ] Have you validated the input using an OpenAPI validator ([example](https://apitools.dev/swagger-parser/online/))?
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
- [ ] Have you searched for related issues/PRs?
- [ ] What's the actual output vs expected output?
diff --git a/.github/workflows/samples-dotnet-standard.yaml b/.github/workflows/samples-dotnet-standard.yaml
index 7e9456d086c6..f2b6a6454c00 100644
--- a/.github/workflows/samples-dotnet-standard.yaml
+++ b/.github/workflows/samples-dotnet-standard.yaml
@@ -16,7 +16,7 @@ on:
jobs:
build:
name: Build .Net projects
- runs-on: ubuntu-latest
+ runs-on: windows-latest
strategy:
fail-fast: false
matrix:
diff --git a/.github/workflows/samples-dotnet9.yaml b/.github/workflows/samples-dotnet9.yaml
index d9379569cccd..5c27aa230887 100644
--- a/.github/workflows/samples-dotnet9.yaml
+++ b/.github/workflows/samples-dotnet9.yaml
@@ -35,6 +35,12 @@ jobs:
- samples/client/petstore/csharp/generichost/net9/Petstore
- samples/client/petstore/csharp/generichost/net9/SourceGeneration
- samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate
+ # restsharp
+ - samples/client/petstore/csharp/restsharp/net9/EnumMappings
+ # httpclient
+ - samples/client/petstore/csharp/httpclient/net9/Petstore
+ # unity
+ #- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.2.0
diff --git a/.github/workflows/samples-kotlin-server.yaml b/.github/workflows/samples-kotlin-server.yaml
index 7721fbd44a36..07af163a810e 100644
--- a/.github/workflows/samples-kotlin-server.yaml
+++ b/.github/workflows/samples-kotlin-server.yaml
@@ -34,6 +34,7 @@ jobs:
- samples/server/petstore/kotlin-springboot-delegate
- samples/server/petstore/kotlin-springboot-modelMutable
- samples/server/petstore/kotlin-springboot-reactive
+ - samples/server/petstore/kotlin-springboot-reactive-without-flow
- samples/server/petstore/kotlin-springboot-source-swagger1
- samples/server/petstore/kotlin-springboot-source-swagger2
- samples/server/petstore/kotlin-springboot-springfox
diff --git a/.github/workflows/samples-scala.yaml b/.github/workflows/samples-scala.yaml
index 5b937b0a42bb..5c2cb8bc04fe 100644
--- a/.github/workflows/samples-scala.yaml
+++ b/.github/workflows/samples-scala.yaml
@@ -40,6 +40,8 @@ jobs:
with:
distribution: 'temurin'
java-version: 8
+ - name: Setup sbt launcher
+ uses: sbt/setup-sbt@v1
- name: Cache maven dependencies
uses: actions/cache@v4
env:
diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh
index cc7e015f4c34..0d02dce87a7c 100755
--- a/CI/circle_parallel.sh
+++ b/CI/circle_parallel.sh
@@ -15,12 +15,22 @@ if [ "$NODE_INDEX" = "1" ]; then
sudo apt-get -y install cpanminus
+ # install rust
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+ source "$HOME/.cargo/env"
+
+ echo "Testing perl"
(cd samples/client/petstore/perl && /bin/bash ./test.bash)
+
+ echo "Testing ruby"
(cd samples/client/petstore/ruby && mvn integration-test)
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
+ echo "Testing rust"
+ (cd samples/server/petstore/rust-axum && mvn integration-test)
+
elif [ "$NODE_INDEX" = "2" ]; then
echo "Running node $NODE_INDEX to test Go"
# install haskell
diff --git a/README.md b/README.md
index b31c58d649a9..1cf42af4539e 100644
--- a/README.md
+++ b/README.md
@@ -1210,7 +1210,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Android | @jaz-ah (2017/09) |
| Apex | |
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
-| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) |
+| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) @eafer (2024/12) |
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
| C# | @mandrean (2017/08) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) @iBicha (2023/07) |
| Clojure | |
diff --git a/bin/configs/csharp-httpclient-net9.yaml b/bin/configs/csharp-httpclient-net9.yaml
new file mode 100644
index 000000000000..b1ce09e64d1f
--- /dev/null
+++ b/bin/configs/csharp-httpclient-net9.yaml
@@ -0,0 +1,13 @@
+# for .net standard httpclient
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/httpclient/net9/Petstore
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+library: httpclient
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ useOneOfDiscriminatorLookup: true
+ targetFramework: net9.0
+ equatable: true
diff --git a/bin/configs/csharp-restsharp-net9.yaml b/bin/configs/csharp-restsharp-net9.yaml
new file mode 100644
index 000000000000..568c9462b8d7
--- /dev/null
+++ b/bin/configs/csharp-restsharp-net9.yaml
@@ -0,0 +1,14 @@
+# for .net standard
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/restsharp/net9/EnumMappings
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ useOneOfDiscriminatorLookup: true
+ targetFramework: net9.0
+ equatable: true
+enumNameMappings:
+ delivered: Shipped
diff --git a/bin/configs/csharp-unityWebRequest-net9.yaml b/bin/configs/csharp-unityWebRequest-net9.yaml
new file mode 100644
index 000000000000..b5e84fae8528
--- /dev/null
+++ b/bin/configs/csharp-unityWebRequest-net9.yaml
@@ -0,0 +1,9 @@
+# for .net Unity
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/unityWebRequest/net9/Petstore
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+library: unityWebRequest
+additionalProperties:
+ targetFramework: net9.0
+ equatable: true
diff --git a/bin/configs/java-okhttp-gson.yaml b/bin/configs/java-okhttp-gson.yaml
index 8f5c07cae49c..a5c109e1a38d 100644
--- a/bin/configs/java-okhttp-gson.yaml
+++ b/bin/configs/java-okhttp-gson.yaml
@@ -15,6 +15,7 @@ additionalProperties:
useOneOfDiscriminatorLookup: true
disallowAdditionalPropertiesIfNotPresent: false
useReflectionEqualsHashCode:: true
+ removeEnumValuePrefix: true
enumNameMappings:
s: LOWER_CASE_S
S: UPPER_CASE_S
diff --git a/bin/configs/kotlin-spring-boot-reactive-without-flow.yaml b/bin/configs/kotlin-spring-boot-reactive-without-flow.yaml
new file mode 100644
index 000000000000..e2988c675d18
--- /dev/null
+++ b/bin/configs/kotlin-spring-boot-reactive-without-flow.yaml
@@ -0,0 +1,13 @@
+generatorName: kotlin-spring
+outputDir: samples/server/petstore/kotlin-springboot-reactive-without-flow
+library: spring-boot
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
+additionalProperties:
+ documentationProvider: springdoc
+ annotationLibrary: swagger2
+ useSwaggerUI: "true"
+ serviceImplementation: "true"
+ reactive: "true"
+ beanValidations: "true"
+ useFlowForArrayReturnType: "false"
diff --git a/bin/configs/kotlin-spring-boot-reactive.yaml b/bin/configs/kotlin-spring-boot-reactive.yaml
index f9a3f1996792..cff5b79adc79 100644
--- a/bin/configs/kotlin-spring-boot-reactive.yaml
+++ b/bin/configs/kotlin-spring-boot-reactive.yaml
@@ -1,7 +1,7 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-reactive
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: springdoc
@@ -10,3 +10,5 @@ additionalProperties:
serviceImplementation: "true"
reactive: "true"
beanValidations: "true"
+ # the following option is set to true by default
+ #useFlowForArrayReturnType: "true"
diff --git a/bin/configs/manual/rust-axum-oneof-v3.yaml b/bin/configs/manual/rust-axum-oneof-v3.yaml
new file mode 100644
index 000000000000..4d1bb07c1d71
--- /dev/null
+++ b/bin/configs/manual/rust-axum-oneof-v3.yaml
@@ -0,0 +1,11 @@
+generatorName: rust-axum
+outputDir: samples/server/petstore/rust-axum/output/rust-axum-oneof
+inputSpec: modules/openapi-generator/src/test/resources/3_0/rust-axum/rust-axum-oneof.yaml
+templateDir: modules/openapi-generator/src/main/resources/rust-axum
+generateAliasAsModel: true
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ packageName: rust-axum-oneof
+globalProperties:
+ skipFormModel: "false"
+enablePostProcessFile: true
diff --git a/bin/utils/test_file_list.yaml b/bin/utils/test_file_list.yaml
index 5c63f356e280..735f2821f9b4 100644
--- a/bin/utils/test_file_list.yaml
+++ b/bin/utils/test_file_list.yaml
@@ -49,3 +49,8 @@
sha256: 67a9e63e13ebddac21cb236aa015edce30f5d3bd8d6adcf50044cad00d48c45e
- filename: "samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ZebraTest.java"
sha256: 15eeb6d8a9a79d0f1930b861540d9c5780d6c49ea4fdb68269ac3e7ec481e142
+# rust axum test files
+- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/tests/oneof_with_discriminator.rs"
+ sha256: 2d4f5a069fdcb3057bb078d5e75b3de63cd477b97725e457079df24bd2c30600
+- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
+ sha256: e72fbf81a9849dc7abb7e2169f2fc355c8b1cf991c0e2ffc083126abd9e966e7
diff --git a/docs/faq.md b/docs/faq.md
index 061135a68b53..99ca22c51e74 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -5,6 +5,8 @@ title: "FAQ: General"
## Do you have a chat room?
+Yes, we use Slack.
+
[![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-2wmkn4s8g-n19PJ99Y6Vei74WMUIehQA)
## What is the governance structure of the OpenAPI Generator project?
diff --git a/docs/generators/README.md b/docs/generators/README.md
index 3b624bd8b8f6..c9c48556912b 100644
--- a/docs/generators/README.md
+++ b/docs/generators/README.md
@@ -40,7 +40,7 @@ The following generators are available:
* [php-dt](php-dt.md)
* [powershell](powershell.md)
* [python](python.md)
-* [python-legacy](python-legacy.md)
+* [python-pydantic-v1](python-pydantic-v1.md)
* [r](r.md)
* [ruby](ruby.md)
* [rust](rust.md)
@@ -100,6 +100,7 @@ The following generators are available:
* [php-symfony](php-symfony.md)
* [python-aiohttp](python-aiohttp.md)
* [python-blueplanet](python-blueplanet.md)
+* [python-fastapi](python-fastapi.md)
* [python-flask](python-flask.md)
* [ruby-on-rails](ruby-on-rails.md)
* [ruby-sinatra](ruby-sinatra.md)
diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md
index 48d3072ce725..ef482820cef6 100644
--- a/docs/generators/csharp.md
+++ b/docs/generators/csharp.md
@@ -47,7 +47,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
- **net8.0**
- .NET 8.0
- **net9.0**
- .NET 9.0
|net9.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
- **net8.0**
- .NET 8.0 (End of Support 10 November 2026)
- **net9.0**
- .NET 9.0 (End of Support 12 May 2026)
|net9.0|
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|useDateTimeForDate|Use DateTime to model date properties even if DateOnly supported. (.net 6.0+ only)| |false|
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md
index 5aa6a24c2f6a..195c51460ef6 100644
--- a/docs/generators/kotlin-spring.md
+++ b/docs/generators/kotlin-spring.md
@@ -52,6 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|title|server title name or client service name| |OpenAPI Kotlin Spring|
|useBeanValidation|Use BeanValidation API annotations to validate data types| |true|
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
+|useFlowForArrayReturnType|Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead.| |true|
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|useTags|Whether to use tags for creating interface and controller class names| |false|
diff --git a/docs/generators/postgresql-schema.md b/docs/generators/postgresql-schema.md
index b4959234ae6e..ee85c7e680e0 100644
--- a/docs/generators/postgresql-schema.md
+++ b/docs/generators/postgresql-schema.md
@@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|defaultDatabaseName|Database name that will be used for all generated PostgreSQL DDL and DML statements.| ||
|idAutoIncEnabled|If `true`, generates autoincrement PostgreSQL types `SERIAL` and `BIGSERIAL` for `int32` and `int64` respectively for integer fields with name 'id'.| |false|
|identifierNamingConvention|Naming convention of PostgreSQL idebntifiers (table names and column names).|- **snake_case**
- Transform named to 'snake_case'.
- **original**
- Leave original names as in `YAML` file.
|snake_case|
-|jsonDataType|Use of PostgreSQL data types for complex model properties.|- **json**
- Generate `JSON` fields. Value is stored in `JSON` data type field as human-readable text. Value compliance with JSON standard is checked.
- **jsonb**
- Generate `JSONB` fields. Value is stored in `JSONB` data type field in binary format. `JSONB` data type is generally nore efficient than `JSON` but it is not human-readable. Value compliance with JSON standard is checked.
- **off**
- Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.
|json|
+|jsonDataType|Use of PostgreSQL data types for complex model properties.|- **json**
- Generate `JSON` fields. Value is stored in `JSON` data type field as human-readable text. Value compliance with JSON standard is checked.
- **jsonb**
- Generate `JSONB` fields. Value is stored in `JSONB` data type field in binary format. `JSONB` data type is generally more efficient than `JSON` but it is not human-readable. Value compliance with JSON standard is checked.
- **off**
- Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.
|json|
|namedParametersEnabled|Generates query examples with named variables in value placeholders (eg.`:name`,`:quantity`) if `true`. Otherwise, generates question marks `?` in value placeholders.| |false|
## IMPORT MAPPING
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
index 0a340ecb14e1..70d58617e024 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
@@ -409,9 +409,7 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case,
"If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.";
public static final String UNSUPPORTED_V310_SPEC_MSG =
- "Generation using 3.1.0 specs is in development and is not officially supported yet. " +
- "If you would like to expedite development, please consider working on the open issues in the 3.1.0 project: https://github.com/orgs/OpenAPITools/projects/4/views/1 " +
- "and reach out to our team on Slack at https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g";
+ "OpenAPI 3.1 support is still in beta. To report an issue related to 3.1 spec, please kindly open an issue in the Github repo: https://github.com/openAPITools/openapi-generator.";
public static final String ENUM_UNKNOWN_DEFAULT_CASE = "enumUnknownDefaultCase";
public static final String ENUM_UNKNOWN_DEFAULT_CASE_DESC =
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
index 41a3a176ab2a..5303598ed7a6 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
@@ -1083,8 +1083,8 @@ public String toString() {
sb.append(", items='").append(items).append('\'');
sb.append(", additionalProperties='").append(additionalProperties).append('\'');
sb.append(", isModel='").append(isModel).append('\'');
- sb.append(", isNull='").append(isNull);
- sb.append(", hasValidation='").append(hasValidation);
+ sb.append(", isNull='").append(isNull).append('\'');
+ sb.append(", hasValidation='").append(hasValidation).append('\'');
sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType());
sb.append(", getHasDiscriminatorWithNonEmptyMapping=").append(hasDiscriminatorWithNonEmptyMapping);
sb.append(", getIsAnyType=").append(getIsAnyType());
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 a015dee2a21b..434983fb5e06 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
@@ -297,7 +297,7 @@ apiTemplateFiles are for API outputs only (controllers/handlers).
// acts strictly upon a spec, potentially modifying it to have consistent behavior across generators.
protected boolean strictSpecBehavior = true;
// flag to indicate whether enum value prefixes are removed
- protected boolean removeEnumValuePrefix = true;
+ protected boolean removeEnumValuePrefix = false;
// Support legacy logic for evaluating discriminators
@Setter protected boolean legacyDiscriminatorBehavior = true;
@@ -3875,29 +3875,8 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo
}
Schema original = null;
- // process the dereference schema if it's a ref to allOf with a single item
- // and certain field(s) (e.g. description, readyOnly, etc) is set
- if (p.get$ref() != null) {
- Schema derefSchema = ModelUtils.getReferencedSchema(openAPI, p);
- if (ModelUtils.isAllOfWithSingleItem(derefSchema) && (
- derefSchema.getReadOnly() != null ||
- derefSchema.getWriteOnly() != null ||
- derefSchema.getDeprecated() != null ||
- derefSchema.getDescription() != null ||
- derefSchema.getMaxLength() != null ||
- derefSchema.getMinLength() != null ||
- derefSchema.getMinimum() != null ||
- derefSchema.getMaximum() != null ||
- derefSchema.getMaximum() != null ||
- derefSchema.getMinItems() != null ||
- derefSchema.getTitle() != null
- )) {
- p = ModelUtils.getReferencedSchema(openAPI, p);
- }
- }
-
// check if it's allOf (only 1 sub schema) with or without default/nullable/etc set in the top level
- if (ModelUtils.isAllOfWithSingleItem(p)) {
+ if (ModelUtils.isAllOf(p) && p.getAllOf().size() == 1) {
if (p.getAllOf().get(0) instanceof Schema) {
original = p;
p = (Schema) p.getAllOf().get(0);
@@ -6524,6 +6503,9 @@ public String sanitizeName(final String name, String removeCharRegEx, ArrayList<
// input.name => input_name
modifiable = this.sanitizeValue(modifiable, "\\.", "_", exceptions);
+ // input:name => input_name
+ modifiable = this.sanitizeValue(modifiable, ":", "_", exceptions);
+
// input-name => input_name
modifiable = this.sanitizeValue(modifiable, "-", "_", exceptions);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java
index 8cdf045a4249..e45cc3df9b92 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java
@@ -207,7 +207,7 @@ private String getInlineSchemaName(HttpMethod httpVerb, String pathname) {
/**
* Return false if model can be represented by primitives e.g. string, object
- * without properties, array or map of other model (model contanier), etc.
+ * without properties, array or map of other model (model container), etc.
*
* Return true if a model should be generated e.g. object with properties,
* enum, oneOf, allOf, anyOf, etc.
@@ -220,7 +220,7 @@ private boolean isModelNeeded(Schema schema) {
/**
* Return false if model can be represented by primitives e.g. string, object
- * without properties, array or map of other model (model contanier), etc.
+ * without properties, array or map of other model (model container), etc.
*
* Return true if a model should be generated e.g. object with properties,
* enum, oneOf, allOf, anyOf, etc.
@@ -1043,7 +1043,7 @@ private void copyVendorExtensions(Schema source, Schema target) {
* Add the schemas to the components
*
* @param name name of the inline schema
- * @param schema inilne schema
+ * @param schema inline schema
* @return the actual model name (based on inlineSchemaNameMapping if provided)
*/
private String addSchemas(String name, Schema schema) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
index 3bc48fb57de3..cdec5424ca8d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
@@ -791,7 +791,7 @@ public ModelsMap postProcessModels(ModelsMap objs) {
}
// construct data tag in the template: x-go-datatag
- // originl template
+ // original template
// `json:"{{{baseName}}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{{baseName}}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#withValidate}} validate:"{{validate}}"{{/withValidate}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
String goDataTag = "json:\"" + cp.baseName;
if (!cp.required) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
index 960a5c8d71a2..4c364a507258 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
@@ -657,6 +657,9 @@ public void processOpts() {
}
writer.write(content);
});
+ additionalProperties.put("removeAnnotations", (Mustache.Lambda) (fragment, writer) -> {
+ writer.write(removeAnnotations(fragment.execute()));
+ });
}
/**
@@ -1077,10 +1080,10 @@ private String getBeanValidation(Schema> items) {
}
if (items.get$ref() != null) {
- Map shemas = this.openAPI.getComponents().getSchemas();
+ Map schemas = this.openAPI.getComponents().getSchemas();
String ref = ModelUtils.getSimpleRef(items.get$ref());
if (ref != null) {
- Schema> schema = shemas.get(ref);
+ Schema> schema = schemas.get(ref);
if (schema == null || ModelUtils.isObjectSchema(schema)) {
return "@Valid ";
}
@@ -1802,18 +1805,30 @@ public void postProcessResponseWithProperty(CodegenResponse response, CodegenPro
return;
}
- // the response data types should not contain a bean validation annotation.
- if (property.dataType.contains("@")) {
- property.dataType = removeAnnotations(property.dataType);
- }
- // the response data types should not contain a bean validation annotation.
- if (response.dataType.contains("@")) {
- response.dataType = removeAnnotations(response.dataType);
- }
+ // the response data types should not contain bean validation annotations.
+ property.dataType = removeAnnotations(property.dataType);
+ response.dataType = removeAnnotations(response.dataType);
}
- private String removeAnnotations(String type) {
- return type.replaceAll("(?:(?i)@[a-z0-9]*+([(].*[)]|\\s*))*+", "");
+ /**
+ * Remove annotations from the given data type string.
+ *
+ * For example:
+ *
+ * - {@code @Min(0) @Max(10)Integer} -> {@code Integer}
+ * - {@code @Pattern(regexp = "^[a-z]$")String>} -> {@code String}
+ * - {@code List<@Pattern(regexp = "^[a-z]$")String>}" -> "{@code List}"
+ * - {@code List<@Valid Pet>}" -> "{@code List}"
+ *
+ *
+ * @param dataType the data type string
+ * @return the data type string without annotations
+ */
+ public String removeAnnotations(String dataType) {
+ if (dataType != null && dataType.contains("@")) {
+ return dataType.replaceAll("(?:(?i)@[a-z0-9]*+([(].*[)]|\\s*))*+", "");
+ }
+ return dataType;
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
index b850b6bffc80..43cc08e3dfce 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
@@ -435,7 +435,7 @@ public String toVarName(String name) {
}
// translate @ for properties (like @type) to at_.
- // Otherwise an additional "type" property will leed to duplcates
+ // Otherwise an additional "type" property will lead to duplicates
name = name.replaceAll("^@", "at_");
// sanitize name
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java
index f6813081563c..9fa261694f61 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java
@@ -1827,7 +1827,7 @@ private PythonType stringType(IJsonSchemaValidationProperties cp) {
}
return pt;
} else {
- if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead
+ if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead
moduleImports.add("pydantic", "SecretStr");
return new PythonType("SecretStr");
} else {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java
index c697bc8f2346..ec629c1ce6cc 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java
@@ -1090,7 +1090,7 @@ private String getPydanticType(CodegenParameter cp,
pydanticImports.add("constr");
return String.format(Locale.ROOT, "constr(%s)", StringUtils.join(fieldCustomization, ", "));
} else {
- if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead
+ if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead
pydanticImports.add("SecretStr");
return "SecretStr";
} else {
@@ -1375,7 +1375,7 @@ private String getPydanticType(CodegenProperty cp,
pydanticImports.add("constr");
return String.format(Locale.ROOT, "constr(%s)", StringUtils.join(fieldCustomization, ", "));
} else {
- if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead
+ if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead
pydanticImports.add("SecretStr");
return "SecretStr";
} else {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRustCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRustCodegen.java
index 55bd4290126f..7da93b288de1 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRustCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRustCodegen.java
@@ -21,6 +21,8 @@ public abstract class AbstractRustCodegen extends DefaultCodegen implements Code
private final Logger LOGGER = LoggerFactory.getLogger(AbstractRustCodegen.class);
+ protected static final String VENDOR_EXTENSION_PARAM_IDENTIFIER = "x-rust-param-identifier";
+
protected List charactersToAllow = Collections.singletonList("_");
protected Set keywordsThatDoNotSupportRawIdentifiers = new HashSet<>(
Arrays.asList("super", "self", "Self", "extern", "crate"));
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java
index 119609b49844..60e8fb231011 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java
@@ -848,10 +848,10 @@ private void setIsFramework() {
additionalProperties.put(TARGET_FRAMEWORK, "netcoreapp" + aspnetCoreVersion);
}
- setAddititonalPropertyForFramework();
+ setAdditionalPropertyForFramework();
}
- private void setAddititonalPropertyForFramework() {
+ private void setAdditionalPropertyForFramework() {
String targetFramework = ((String) additionalProperties.get(TARGET_FRAMEWORK));
if (targetFramework.startsWith("net6.0") ||
targetFramework.startsWith("net7.0") ||
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 2ed30b2f8136..d7456a3f0bc5 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
@@ -88,8 +88,6 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
FrameworkStrategy.NETSTANDARD_2_1,
FrameworkStrategy.NETFRAMEWORK_4_7,
FrameworkStrategy.NETFRAMEWORK_4_8,
- FrameworkStrategy.NET_6_0,
- FrameworkStrategy.NET_7_0,
FrameworkStrategy.NET_8_0,
FrameworkStrategy.NET_9_0
);
@@ -1428,13 +1426,9 @@ private static abstract class FrameworkStrategy {
};
static FrameworkStrategy NETFRAMEWORK_4_8 = new FrameworkStrategy("net48", ".NET Framework 4.8", "net48", Boolean.FALSE) {
};
- static FrameworkStrategy NET_6_0 = new FrameworkStrategy("net6.0", ".NET 6.0 (End of Support 12 November 2024)", "net6.0", Boolean.FALSE) {
+ static FrameworkStrategy NET_8_0 = new FrameworkStrategy("net8.0", ".NET 8.0 (End of Support 10 November 2026)", "net8.0", Boolean.FALSE) {
};
- 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) {
- };
- static FrameworkStrategy NET_9_0 = new FrameworkStrategy("net9.0", ".NET 9.0", "net9.0", Boolean.FALSE) {
+ static FrameworkStrategy NET_9_0 = new FrameworkStrategy("net9.0", ".NET 9.0 (End of Support 12 May 2026)", "net9.0", Boolean.FALSE) {
};
protected String name;
protected String description;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java
index 4871f6d44fd3..61f4ef6bae87 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java
@@ -599,10 +599,10 @@ private void setAzureFunctionsVersion() {
//set .NET target version
String targetFrameworkVersion = "net" + netCoreVersion.getOptValue();
additionalProperties.put(TARGET_FRAMEWORK, targetFrameworkVersion);
- setAddititonalPropertyForFramework();
+ setAdditionalPropertyForFramework();
}
- private void setAddititonalPropertyForFramework() {
+ private void setAdditionalPropertyForFramework() {
if (((String)additionalProperties.get(TARGET_FRAMEWORK)).startsWith("net6.0")) {
additionalProperties.put(NET_60_OR_LATER, true);
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java
index 55d383a6b26f..8b5d2fa3d12d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java
@@ -302,11 +302,11 @@ private String capitalizeFirstChar(String str) {
}
private String convertPathSegmentToResourceNamePart(String pathSegment) {
- String convertedSegnemt = pathSegment;
+ String convertedSegment = pathSegment;
if (pathSegment.matches(OPEN_API_PATH_PARAM_PATTERN)) {
- convertedSegnemt = pathSegment.substring(1, pathSegment.length() - 1);
+ convertedSegment = pathSegment.substring(1, pathSegment.length() - 1);
}
- return capitalizeFirstChar(sanitizeName(convertedSegnemt));
+ return capitalizeFirstChar(sanitizeName(convertedSegment));
}
private String convertPathParamPattern(String pathSegment) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java
index 684df587ffb5..422866c16b23 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java
@@ -405,7 +405,7 @@ public String sanitizeModelName(String modelName) {
String[] parts = modelName.split("::");
ArrayList new_parts = new ArrayList();
for (String part : parts) {
- new_parts.add(sanitizeName(part));
+ new_parts.add(sanitizeName(part, "\\W", new ArrayList<>(List.of(":"))));
}
return String.join("::", new_parts);
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
index 57f8a1961ef3..5c85543929d6 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
@@ -40,26 +40,34 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen implements BeanVa
public static final String DEFAULT_LIBRARY = Constants.KTOR;
private final Logger LOGGER = LoggerFactory.getLogger(KotlinServerCodegen.class);
- @Getter @Setter
+ @Getter
+ @Setter
private Boolean autoHeadFeatureEnabled = true;
- @Getter @Setter
+ @Getter
+ @Setter
private Boolean conditionalHeadersFeatureEnabled = false;
- @Getter @Setter
+ @Getter
+ @Setter
private Boolean hstsFeatureEnabled = true;
- @Getter @Setter
+ @Getter
+ @Setter
private Boolean corsFeatureEnabled = false;
- @Getter @Setter
+ @Getter
+ @Setter
private Boolean compressionFeatureEnabled = true;
- @Getter @Setter
+ @Getter
+ @Setter
private Boolean resourcesFeatureEnabled = true;
- @Getter @Setter
+ @Getter
+ @Setter
private Boolean metricsFeatureEnabled = true;
private boolean interfaceOnly = false;
private boolean useBeanValidation = false;
private boolean useCoroutines = false;
private boolean useMutiny = false;
private boolean returnResponse = false;
- @Setter private boolean omitGradleWrapper = false;
+ @Setter
+ private boolean omitGradleWrapper = false;
// This is here to potentially warn the user when an option is not supported by the target framework.
private Map> optionsSupportedPerFramework = new ImmutableMap.Builder>()
@@ -452,7 +460,7 @@ private boolean isKtor2Or3() {
/**
* Returns true if latest version of ktor is used.
*
- * @return true if latest veresion of ktor is used.
+ * @return true if latest version of ktor is used.
*/
private boolean isKtor() {
return Constants.KTOR.equals(library);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
index 6a483ca6e8d3..ea0c6c4e60f4 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
@@ -105,6 +105,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
public static final String BEAN_QUALIFIERS = "beanQualifiers";
public static final String USE_SPRING_BOOT3 = "useSpringBoot3";
+ public static final String USE_FLOW_FOR_ARRAY_RETURN_TYPE = "useFlowForArrayReturnType";
public static final String REQUEST_MAPPING_OPTION = "requestMappingMode";
public static final String USE_REQUEST_MAPPING_ON_CONTROLLER = "useRequestMappingOnController";
public static final String USE_REQUEST_MAPPING_ON_INTERFACE = "useRequestMappingOnInterface";
@@ -145,6 +146,8 @@ public String getDescription() {
@Setter private boolean serviceImplementation = false;
@Getter @Setter
private boolean reactive = false;
+ @Getter @Setter
+ private boolean useFlowForArrayReturnType = true;
@Setter private boolean interfaceOnly = false;
@Setter protected boolean useFeignClientUrl = true;
@Setter protected boolean useFeignClient = false;
@@ -235,6 +238,7 @@ public KotlinSpringServerCodegen() {
"@RestController annotations. May be used to prevent bean names clash if multiple generated libraries" +
" (contexts) added to single project.", beanQualifiers);
addSwitch(USE_SPRING_BOOT3, "Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.", useSpringBoot3);
+ addSwitch(USE_FLOW_FOR_ARRAY_RETURN_TYPE, "Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead.", useFlowForArrayReturnType);
supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application.");
supportedLibraries.put(SPRING_CLOUD_LIBRARY,
"Spring-Cloud-Feign client with Spring-Boot auto-configured settings.");
@@ -527,10 +531,15 @@ public void processOpts() {
this.setReactive(convertPropertyToBoolean(REACTIVE));
// spring webflux doesn't support @ControllerAdvice
this.setExceptionHandler(false);
+
+ if (additionalProperties.containsKey(USE_FLOW_FOR_ARRAY_RETURN_TYPE)) {
+ this.setUseFlowForArrayReturnType(convertPropertyToBoolean(USE_FLOW_FOR_ARRAY_RETURN_TYPE));
+ }
}
}
writePropertyBack(REACTIVE, reactive);
writePropertyBack(EXCEPTION_HANDLER, exceptionHandler);
+ writePropertyBack(USE_FLOW_FOR_ARRAY_RETURN_TYPE, useFlowForArrayReturnType);
if (additionalProperties.containsKey(BEAN_QUALIFIERS) && library.equals(SPRING_BOOT)) {
this.setBeanQualifiers(convertPropertyToBoolean(BEAN_QUALIFIERS));
@@ -685,7 +694,7 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("buildGradleKts.mustache", "build.gradle.kts"));
}
supportingFiles.add(new SupportingFile("settingsGradle.mustache", "settings.gradle"));
-
+
String gradleWrapperPackage = "gradle.wrapper";
supportingFiles.add(new SupportingFile("gradlew.mustache", "", "gradlew"));
supportingFiles.add(new SupportingFile("gradlew.bat.mustache", "", "gradlew.bat"));
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostgresqlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostgresqlSchemaCodegen.java
index 5910be7699ab..b3ecedfd4b86 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostgresqlSchemaCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostgresqlSchemaCodegen.java
@@ -313,7 +313,7 @@ public PostgresqlSchemaCodegen() {
"Use of PostgreSQL data types for complex model properties.");
jsonDataTypeOpt.addEnum("json", "Generate `JSON` fields. Value is stored in `JSON` data type field as human-readable text. Value compliance with JSON standard is checked.")
.addEnum("jsonb",
- "Generate `JSONB` fields. Value is stored in `JSONB` data type field in binary format. `JSONB` data type is generally nore efficient than `JSON` but it is not human-readable. Value compliance with JSON standard is checked.")
+ "Generate `JSONB` fields. Value is stored in `JSONB` data type field in binary format. `JSONB` data type is generally more efficient than `JSON` but it is not human-readable. Value compliance with JSON standard is checked.")
.addEnum("off", "Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.")
.setDefault("json");
cliOptions.add(jsonDataTypeOpt);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustAxumServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustAxumServerCodegen.java
index 059d6ac6fb54..44fccb193c1d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustAxumServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustAxumServerCodegen.java
@@ -236,8 +236,7 @@ public RustAxumServerCodegen() {
supportingFiles.add(new SupportingFile("header.mustache", "src", "header.rs"));
supportingFiles.add(new SupportingFile("server-mod.mustache", "src/server", "mod.rs"));
supportingFiles.add(new SupportingFile("apis-mod.mustache", apiPackage().replace('.', File.separatorChar), "mod.rs"));
- supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")
- .doNotOverwrite());
+ supportingFiles.add(new SupportingFile("README.mustache", "", "README.md").doNotOverwrite());
}
@Override
@@ -594,8 +593,105 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
return op;
}
+ private void postProcessOneOfModels(List allModels) {
+ final HashMap> oneOfMapDiscriminator = new HashMap<>();
+
+ for (ModelMap mo : allModels) {
+ final CodegenModel cm = mo.getModel();
+
+ final CodegenComposedSchemas cs = cm.getComposedSchemas();
+ if (cs != null) {
+ final List csOneOf = cs.getOneOf();
+
+ if (csOneOf != null) {
+ for (CodegenProperty model : csOneOf) {
+ // Generate a valid name for the enum variant.
+ // Mainly needed for primitive types.
+ String[] modelParts = model.dataType.replace("<", "Of").replace(">", "").split("::");
+ model.datatypeWithEnum = camelize(modelParts[modelParts.length - 1]);
+
+ // Primitive type is not properly set, this overrides it to guarantee adequate model generation.
+ if (!model.getDataType().matches(String.format(Locale.ROOT, ".*::%s", model.getDatatypeWithEnum()))) {
+ model.isPrimitiveType = true;
+ }
+ }
+
+ cs.setOneOf(csOneOf);
+ cm.setComposedSchemas(cs);
+ }
+ }
+
+ if (cm.discriminator != null) {
+ for (String model : cm.oneOf) {
+ List discriminators = oneOfMapDiscriminator.getOrDefault(model, new ArrayList<>());
+ discriminators.add(cm.discriminator.getPropertyName());
+ oneOfMapDiscriminator.put(model, discriminators);
+ }
+ }
+ }
+
+ for (ModelMap mo : allModels) {
+ final CodegenModel cm = mo.getModel();
+
+ for (CodegenProperty var : cm.vars) {
+ var.isDiscriminator = false;
+ }
+
+ final List discriminatorsForModel = oneOfMapDiscriminator.get(cm.getSchemaName());
+
+ if (discriminatorsForModel != null) {
+ for (String discriminator : discriminatorsForModel) {
+ boolean hasDiscriminatorDefined = false;
+
+ for (CodegenProperty var : cm.vars) {
+ if (var.baseName.equals(discriminator)) {
+ var.isDiscriminator = true;
+ hasDiscriminatorDefined = true;
+ break;
+ }
+ }
+
+ // If the discriminator field is not a defined attribute in the variant structure, create it.
+ if (!hasDiscriminatorDefined) {
+ CodegenProperty property = new CodegenProperty();
+
+ // Static attributes
+ // Only strings are supported by serde for tag field types, so it's the only one we'll deal with
+ property.openApiType = "string";
+ property.complexType = "string";
+ property.dataType = "String";
+ property.datatypeWithEnum = "String";
+ property.baseType = "string";
+ property.required = true;
+ property.isPrimitiveType = true;
+ property.isString = true;
+ property.isDiscriminator = true;
+
+ // Attributes based on the discriminator value
+ property.baseName = discriminator;
+ property.name = discriminator;
+ property.nameInCamelCase = camelize(discriminator);
+ property.nameInPascalCase = property.nameInCamelCase.substring(0, 1).toUpperCase(Locale.ROOT) + property.nameInCamelCase.substring(1);
+ property.nameInSnakeCase = underscore(discriminator).toUpperCase(Locale.ROOT);
+ property.getter = String.format(Locale.ROOT, "get%s", property.nameInPascalCase);
+ property.setter = String.format(Locale.ROOT, "set%s", property.nameInPascalCase);
+ property.defaultValueWithParam = String.format(Locale.ROOT, " = data.%s;", property.name);
+
+ // Attributes based on the model name
+ property.defaultValue = String.format(Locale.ROOT, "r#\"%s\"#.to_string()", cm.getSchemaName());
+ property.jsonSchema = String.format(Locale.ROOT, "{ \"default\":\"%s\"; \"type\":\"string\" }", cm.getSchemaName());
+
+ cm.vars.add(property);
+ }
+ }
+ }
+ }
+ }
+
@Override
public OperationsMap postProcessOperationsWithModels(final OperationsMap operationsMap, List allModels) {
+ postProcessOneOfModels(allModels);
+
final OperationMap operations = operationsMap.getOperations();
operations.put("classnamePascalCase", camelize(operations.getClassname()));
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
index d8d58cd588b8..3f8ba7bb3b5b 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
@@ -39,8 +39,10 @@
import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenProperty;
+import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile;
+import org.openapitools.codegen.VendorExtension;
import org.openapitools.codegen.meta.features.ClientModificationFeature;
import org.openapitools.codegen.meta.features.DocumentationFeature;
import org.openapitools.codegen.meta.features.GlobalFeature;
@@ -602,6 +604,25 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert
}
}
+ @Override
+ public void postProcessParameter(CodegenParameter parameter) {
+ super.postProcessParameter(parameter);
+ // in order to avoid name conflicts, we map parameters inside the functions
+ String inFunctionIdentifier = "";
+ if (this.useSingleRequestParameter) {
+ inFunctionIdentifier = "params." + parameter.paramName;
+ } else {
+ if (parameter.paramName.startsWith("r#")) {
+ inFunctionIdentifier = "p_" + parameter.paramName.substring(2);
+ } else {
+ inFunctionIdentifier = "p_" + parameter.paramName;
+ }
+ }
+ if (!parameter.vendorExtensions.containsKey(this.VENDOR_EXTENSION_PARAM_IDENTIFIER)) { // allow to overwrite this value
+ parameter.vendorExtensions.put(this.VENDOR_EXTENSION_PARAM_IDENTIFIER, inFunctionIdentifier);
+ }
+ }
+
@Override
public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) {
OperationMap objectMap = objs.getOperations();
@@ -699,7 +720,7 @@ public String toDefaultValue(Schema p) {
@Override
protected ImmutableMap.Builder addMustacheLambdas() {
return super.addMustacheLambdas()
- // Convert variable names to lifetime names.
+ // Convert variable names to lifetime names.
// Generally they are the same, but `#` is not valid in lifetime names.
// Rust uses `r#` prefix for variables that are also keywords.
.put("lifetimeName", new ReplaceAllLambda("^r#", "r_"));
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java
index 9339370f286e..426b336966c2 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java
@@ -460,7 +460,7 @@ public ParamPart(String name, CodegenParameter param) {
* {{{
*
* @cask.get("/user", subpath = true)
- * def userRouteDescriminator(request: cask.Request) = {
+ * def userRouteDiscriminator(request: cask.Request) = {
* request.remainingPathSegments match {
* case Seq("logout") => logoutUser(request)
* case Seq("login") => loginUser(request)
@@ -758,7 +758,7 @@ private static boolean doesNotNeedMapping(final CodegenProperty p, final Set postProcessAllModels(Map objs)
return modelsMap;
}
- private Map makeRefiined(Set imports, String dataType, ArrayList refined) {
+ private Map makeRefined(Set imports, String dataType, ArrayList refined) {
Map vendorExtensions = new HashMap<>();
if (!refined.isEmpty()) {
imports.add("And");
@@ -426,7 +426,7 @@ private Map refineProp(IJsonSchemaValidationProperties prop, Set
} catch (IndexOutOfBoundsException ignored) {
}
}
- vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined));
+ vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined));
}
if ("Int".equals(prop.getDataType())
@@ -455,7 +455,7 @@ private Map refineProp(IJsonSchemaValidationProperties prop, Set
imports.add("LessEqual");
}
}
- vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined));
+ vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined));
}
if (prop.getIsUuid() || "Uuid".equals(prop.getDataType())) {
@@ -476,7 +476,7 @@ private Map refineProp(IJsonSchemaValidationProperties prop, Set
imports.add("MaxSize");
}
- vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined));
+ vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined));
}
return vendorExtensions;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
index e62c275622a2..9a613c3bb67b 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
@@ -446,6 +446,7 @@ public void processOpts() {
convertPropertyToStringAndWriteBack(RESOURCE_FOLDER, this::setResourceFolder);
typeMapping.put("file", "org.springframework.core.io.Resource");
+ importMapping.put("Nullable", "org.springframework.lang.Nullable");
importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource");
importMapping.put("DateTimeFormat", "org.springframework.format.annotation.DateTimeFormat");
importMapping.put("ApiIgnore", "springfox.documentation.annotations.ApiIgnore");
@@ -952,6 +953,11 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert
if (model.getVendorExtensions().containsKey("x-jackson-optional-nullable-helpers")) {
model.imports.add("Arrays");
}
+
+ // to prevent inheritors (JavaCamelServerCodegen etc.) mistakenly use it
+ if (getName().contains("spring")) {
+ model.imports.add("Nullable");
+ }
}
@Override
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 c0a6b6acf787..def572e2ba97 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
@@ -1935,7 +1935,7 @@ private static void setNumericValidations(Schema schema, BigDecimal multipleOf,
private static void logWarnMessagesForIneffectiveValidations(Set setValidations, Schema schema, Set effectiveValidations) {
setValidations.removeAll(effectiveValidations);
setValidations.stream().forEach(validation -> {
- LOGGER.warn("Validation '" + validation + "' has no effect on schema '" + getType(schema) +"'. Ignoring!");
+ LOGGER.warn("Validation '" + validation + "' has no effect on schema '" + getType(schema) + "'. Ignoring!");
});
}
@@ -2031,18 +2031,6 @@ public static boolean isAllOf(Schema schema) {
return false;
}
-
- /**
- * Returns true if the schema contains allOf with a single item but
- * no properties/oneOf/anyOf defined
- *
- * @param schema the schema
- * @return true if the schema contains allOf but no properties/oneOf/anyOf defined.
- */
- public static boolean isAllOfWithSingleItem(Schema schema) {
- return (isAllOf(schema) && schema.getAllOf().size() == 1);
- }
-
/**
* Returns true if the schema contains allOf and may or may not have
* properties/oneOf/anyOf defined.
@@ -2272,11 +2260,14 @@ public static boolean isNullTypeSchema(OpenAPI openAPI, Schema schema) {
}
// for `type: null`
- if (schema.getTypes() == null && schema.get$ref() == null) {
+ if (schema.getTypes() == null && schema.get$ref() == null
+ && schema.getDescription() == null) { // ensure it's not schema with just a description)
return true;
}
} else { // 3.0.x or 2.x spec
- if ((schema.getType() == null || schema.getType().equals("null")) && schema.get$ref() == null) {
+ if ((schema.getType() == null || schema.getType().equals("null"))
+ && schema.get$ref() == null
+ && schema.getDescription() == null) { // ensure it's not schema with just a description)
return true;
}
}
@@ -2302,7 +2293,7 @@ public static boolean isUnsupportedSchema(OpenAPI openAPI, Schema schema) {
// dereference the schema
schema = ModelUtils.getReferencedSchema(openAPI, schema);
- if (schema.getTypes() == null && hasValidation(schema)) {
+ if (schema.getTypes() == null && hasValidation(schema)) {
// just validation without type
return true;
} else if (schema.getIf() != null && schema.getThen() != null) {
diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache
index fa59c65e07ba..97a44e464432 100644
--- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache
+++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache
@@ -6,25 +6,21 @@ cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
-set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration -Werror=missing-declarations -Werror=int-conversion")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=missing-declarations")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
find_package(OpenSSL)
if (OPENSSL_FOUND)
- message (STATUS "OPENSSL found")
-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL")
if(CMAKE_VERSION VERSION_LESS 3.4)
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIRS})
link_directories(${OPENSSL_LIBRARIES})
endif()
-
- message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
-else()
- message (STATUS "OpenSSL Not found.")
endif()
set(pkgName "{{projectName}}")
@@ -42,8 +38,6 @@ else()
if(CURL_FOUND)
include_directories(${CURL_INCLUDE_DIR})
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
- else(CURL_FOUND)
- message(FATAL_ERROR "Could not find the CURL library and development files.")
endif()
endif()
diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache
index cb01a7f9763a..91277d21dc54 100644
--- a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache
+++ b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache
@@ -108,9 +108,7 @@ end:
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("{{{path}}}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "{{{path}}}");
+ char *localVarPath = strdup("{{{path}}}");
{{#pathParams}}
{{#isString}}
@@ -126,7 +124,7 @@ end:
{{#pathParams}}
// Path Params
- long sizeOfPathParams_{{{paramName}}} = {{#pathParams}}{{#isLong}}sizeof({{paramName}})+3{{/isLong}}{{#isString}}strlen({{^isEnum}}{{paramName}}{{/isEnum}}{{#isEnum}}{{{operationId}}}_{{enumName}}_ToString({{paramName}}){{/isEnum}})+3{{/isString}}{{^-last}} + {{/-last}}{{/pathParams}} + strlen("{ {{baseName}} }");
+ long sizeOfPathParams_{{{paramName}}} = {{#pathParams}}{{#isLong}}sizeof({{paramName}})+3{{/isLong}}{{#isString}}strlen({{^isEnum}}{{paramName}}{{/isEnum}}{{#isEnum}}{{{operationId}}}_{{enumName}}_ToString({{paramName}}){{/isEnum}})+3{{/isString}}{{^-last}} + {{/-last}}{{/pathParams}} + sizeof("{ {{baseName}} }") - 1;
{{#isNumeric}}
if({{paramName}} == 0){
goto end;
@@ -254,7 +252,7 @@ end:
valueQuery_{{{paramName}}} = {{#isString}}{{^isEnum}}strdup({{/isEnum}}{{/isString}}({{{paramName}}}){{#isString}}{{^isEnum}}){{/isEnum}}{{/isString}};
{{/isBoolean}}
{{/isInteger}}
- keyPairQuery_{{paramName}} = keyValuePair_create(keyQuery_{{{paramName}}}, {{#isEnum}}(void *)strdup({{{operationId}}}_{{enumName}}_ToString(
+ keyPairQuery_{{paramName}} = keyValuePair_create(keyQuery_{{{paramName}}}, {{#isEnum}}strdup({{{operationId}}}_{{enumName}}_ToString(
{{/isEnum}}{{^isString}}{{^isInteger}}{{^isBoolean}}&{{/isBoolean}}{{/isInteger}}{{/isString}}valueQuery_{{{paramName}}}{{#isEnum}})){{/isEnum}});
list_addElement(localVarQueryParameters,keyPairQuery_{{paramName}});
{{/isArray}}
diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache
index d032b5de1fa8..f6cb0fb49a2a 100644
--- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache
+++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache
@@ -173,10 +173,11 @@ void sslConfig_free(sslConfig_t *sslConfig) {
free(sslConfig);
}
-static void replaceSpaceWithPlus(char *stringToProcess) {
- for(int i = 0; i < strlen(stringToProcess); i++) {
- if(stringToProcess[i] == ' ') {
- stringToProcess[i] = '+';
+static void replaceSpaceWithPlus(char *str) {
+ if (str) {
+ for (; *str; str++) {
+ if (*str == ' ')
+ *str = '+';
}
}
}
@@ -286,38 +287,26 @@ void apiClient_invoke(apiClient_t *apiClient,
if(headerType != NULL) {
list_ForEach(listEntry, headerType) {
- if(strstr((char *) listEntry->data,
- "xml") == NULL)
+ if(strstr(listEntry->data, "xml") == NULL)
{
- buffHeader = malloc(strlen(
- "Accept: ") +
- strlen((char *)
- listEntry->
- data) + 1);
- sprintf(buffHeader, "%s%s", "Accept: ",
+ buffHeader = malloc(sizeof("Accept: ") +
+ strlen(listEntry->data));
+ sprintf(buffHeader, "Accept: %s",
(char *) listEntry->data);
- headers = curl_slist_append(headers,
- buffHeader);
+ headers = curl_slist_append(headers, buffHeader);
free(buffHeader);
}
}
}
if(contentType != NULL) {
list_ForEach(listEntry, contentType) {
- if(strstr((char *) listEntry->data,
- "xml") == NULL)
+ if(strstr(listEntry->data, "xml") == NULL)
{
- buffContent =
- malloc(strlen(
- "Content-Type: ") + strlen(
- (char *)
- listEntry->data) +
- 1);
- sprintf(buffContent, "%s%s",
- "Content-Type: ",
+ buffContent = malloc(sizeof("Content-Type: ") +
+ strlen(listEntry->data));
+ sprintf(buffContent, "Content-Type: %s",
(char *) listEntry->data);
- headers = curl_slist_append(headers,
- buffContent);
+ headers = curl_slist_append(headers, buffContent);
free(buffContent);
buffContent = NULL;
}
@@ -594,8 +583,8 @@ void apiClient_invoke(apiClient_t *apiClient,
size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) {
size_t size_this_time = nmemb * size;
- apiClient_t *apiClient = (apiClient_t *)userp;
- apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
+ apiClient_t *apiClient = userp;
+ apiClient->dataReceived = realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
memcpy((char *)apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time);
apiClient->dataReceivedLen += size_this_time;
((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1
diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache
index 786812158a24..7053ff122dfc 100644
--- a/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache
+++ b/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache
@@ -20,7 +20,7 @@ void listEntry_free(listEntry_t *listEntry, void *additionalData) {
}
void listEntry_printAsInt(listEntry_t *listEntry, void *additionalData) {
- printf("%i\n", *((int *) (listEntry->data)));
+ printf("%i\n", *(int *)listEntry->data);
}
list_t *list_createList() {
@@ -176,8 +176,8 @@ char* findStrInStrList(list_t *strList, const char *str)
listEntry_t* listEntry = NULL;
list_ForEach(listEntry, strList) {
- if (strstr((char*)listEntry->data, str) != NULL) {
- return (char*)listEntry->data;
+ if (strstr(listEntry->data, str) != NULL) {
+ return listEntry->data;
}
}
@@ -197,4 +197,4 @@ void clear_and_free_string_list(list_t *list)
list_item = NULL;
}
list_freeList(list);
-}
\ No newline at end of file
+}
diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache
index a835a9b37080..70f2106ba847 100644
--- a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache
+++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache
@@ -119,7 +119,7 @@ char* {{classname}}_{{name}}_ToString({{projectName}}_{{classVarName}}_{{enumNam
{{/isContainer}}
{{/vars}}
-{{classname}}_t *{{classname}}_create(
+static {{classname}}_t *{{classname}}_create_internal(
{{#vars}}
{{^isContainer}}
{{^isPrimitiveType}}
@@ -205,14 +205,103 @@ char* {{classname}}_{{name}}_ToString({{projectName}}_{{classVarName}}_{{enumNam
{{classname}}_local_var->{{{name}}} = {{{name}}};
{{/vars}}
+ {{classname}}_local_var->_library_owned = 1;
return {{classname}}_local_var;
}
+__attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
+ {{#vars}}
+ {{^isContainer}}
+ {{^isPrimitiveType}}
+ {{#isModel}}
+ {{#isEnum}}
+ {{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
+ {{/isEnum}}
+ {{^isEnum}}
+ {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
+ {{/isEnum}}
+ {{/isModel}}
+ {{^isModel}}
+ {{^isFreeFormObject}}
+ {{^isEnum}}
+ {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
+ {{/isEnum}}
+ {{#isEnum}}
+ {{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
+ {{/isEnum}}
+ {{/isFreeFormObject}}
+ {{/isModel}}
+ {{#isUuid}}
+ {{datatype}} *{{name}}{{^-last}},{{/-last}}
+ {{/isUuid}}
+ {{#isEmail}}
+ {{datatype}} *{{name}}{{^-last}},{{/-last}}
+ {{/isEmail}}
+ {{#isFreeFormObject}}
+ {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
+ {{/isFreeFormObject}}
+ {{/isPrimitiveType}}
+ {{#isPrimitiveType}}
+ {{#isNumeric}}
+ {{datatype}} {{name}}{{^-last}},{{/-last}}
+ {{/isNumeric}}
+ {{#isBoolean}}
+ {{datatype}} {{name}}{{^-last}},{{/-last}}
+ {{/isBoolean}}
+ {{#isEnum}}
+ {{#isString}}
+ {{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
+ {{/isString}}
+ {{/isEnum}}
+ {{^isEnum}}
+ {{#isString}}
+ {{datatype}} *{{name}}{{^-last}},{{/-last}}
+ {{/isString}}
+ {{/isEnum}}
+ {{#isByteArray}}
+ {{datatype}} *{{name}}{{^-last}},{{/-last}}
+ {{/isByteArray}}
+ {{#isBinary}}
+ {{datatype}} {{name}}{{^-last}},{{/-last}}
+ {{/isBinary}}
+ {{#isDate}}
+ {{datatype}} *{{name}}{{^-last}},{{/-last}}
+ {{/isDate}}
+ {{#isDateTime}}
+ {{datatype}} *{{name}}{{^-last}},{{/-last}}
+ {{/isDateTime}}
+ {{/isPrimitiveType}}
+ {{/isContainer}}
+ {{#isContainer}}
+ {{#isArray}}
+ {{#isPrimitiveType}}
+ {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
+ {{/isPrimitiveType}}
+ {{^isPrimitiveType}}
+ {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
+ {{/isPrimitiveType}}
+ {{/isArray}}
+ {{#isMap}}
+ {{datatype}} {{name}}{{^-last}},{{/-last}}
+ {{/isMap}}
+ {{/isContainer}}
+ {{/vars}}
+ ) {
+ return {{classname}}_create_internal (
+ {{#vars}}
+ {{name}}{{^-last}},{{/-last}}
+ {{/vars}}
+ );
+}
void {{classname}}_free({{classname}}_t *{{classname}}) {
if(NULL == {{classname}}){
return ;
}
+ if({{classname}}->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "{{classname}}_free");
+ return ;
+ }
listEntry_t *listEntry;
{{#vars}}
{{^isContainer}}
@@ -313,7 +402,7 @@ void {{classname}}_free({{classname}}_t *{{classname}}) {
{{#isMap}}
if ({{{classname}}}->{{{name}}}) {
list_ForEach(listEntry, {{classname}}->{{name}}) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
+ keyValuePair_t *localKeyValue = listEntry->data;
free (localKeyValue->key);
free (localKeyValue->value);
keyValuePair_free(localKeyValue);
@@ -481,7 +570,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) {
list_ForEach({{{name}}}ListEntry, {{{classname}}}->{{{name}}}) {
{{#items}}
{{#isString}}
- if(cJSON_AddStringToObject({{{name}}}, "", (char*){{{name}}}ListEntry->data) == NULL)
+ if(cJSON_AddStringToObject({{{name}}}, "", {{{name}}}ListEntry->data) == NULL)
{
goto fail;
}
@@ -528,16 +617,16 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) {
listEntry_t *{{{name}}}ListEntry;
if ({{{classname}}}->{{{name}}}) {
list_ForEach({{{name}}}ListEntry, {{{classname}}}->{{{name}}}) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*){{{name}}}ListEntry->data;
+ keyValuePair_t *localKeyValue = {{{name}}}ListEntry->data;
{{#items}}
{{#isString}}
- if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL)
+ if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL)
{
goto fail;
}
{{/isString}}
{{#isByteArray}}
- if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL)
+ if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL)
{
goto fail;
}
@@ -759,7 +848,7 @@ fail:
{
goto end;
}
- double *{{{name}}}_local_value = (double *)calloc(1, sizeof(double));
+ double *{{{name}}}_local_value = calloc(1, sizeof(double));
if(!{{{name}}}_local_value)
{
goto end;
@@ -859,7 +948,7 @@ fail:
{{/vars}}
- {{classname}}_local_var = {{classname}}_create (
+ {{classname}}_local_var = {{classname}}_create_internal (
{{#vars}}
{{^isContainer}}
{{^isPrimitiveType}}
@@ -999,7 +1088,7 @@ end:
if ({{{name}}}List) {
listEntry_t *listEntry = NULL;
list_ForEach(listEntry, {{{name}}}List) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
+ keyValuePair_t *localKeyValue = listEntry->data;
free(localKeyValue->key);
localKeyValue->key = NULL;
{{#items}}
diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache
index d69dc8d5cd34..236d9e8c3cba 100644
--- a/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache
+++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache
@@ -154,9 +154,10 @@ typedef struct {{classname}}_t {
{{/isContainer}}
{{/vars}}
+ int _library_owned; // Is the library responsible for freeing this object?
} {{classname}}_t;
-{{classname}}_t *{{classname}}_create(
+__attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
{{#vars}}
{{^isContainer}}
{{^isPrimitiveType}}
diff --git a/modules/openapi-generator/src/main/resources/Java/javaBuilder.mustache b/modules/openapi-generator/src/main/resources/Java/javaBuilder.mustache
index c02730081ca9..4a0e102b893b 100644
--- a/modules/openapi-generator/src/main/resources/Java/javaBuilder.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/javaBuilder.mustache
@@ -14,9 +14,9 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par
}
{{#vars}}
- public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) {
+ public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) {
{{#vendorExtensions.x-is-jackson-optional-nullable}}
- this.instance.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});
+ this.instance.{{name}} = JsonNullable.<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}>of({{name}});
{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{^vendorExtensions.x-is-jackson-optional-nullable}}
this.instance.{{name}} = {{name}};
@@ -24,7 +24,7 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par
return this;
}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
- public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) {
+ public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) {
this.instance.{{name}} = {{name}};
return this;
}
@@ -32,12 +32,12 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par
{{/vars}}
{{#parentVars}}
- public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { // inherited: {{isInherited}}
+ public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { // inherited: {{isInherited}}
super.{{name}}({{name}});
return this;
}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
- public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) {
+ public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) {
this.instance.{{name}} = {{name}};
return this;
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache
index 309ee2fc3214..366e3689df7f 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache
@@ -280,7 +280,7 @@ public class {{classname}} {
{{! The `available` method would work with a `PushbackInputStream`, because we could read 1 byte to check if it exists then push it back so Jackson can read it again. The issue with that is that it will also insert an ascii character for "head of input" and that will break Jackson as it does not handle special whitespace characters. }}
{{! A fix for that problem is to read it into a string and remove those characters, but if we need to read it before giving it to jackson to fix the string then just reading it into a string as is to do an emptiness check is the cleaner solution. }}
{{! We could also manipulate the inputstream to remove that bad character, but string manipulation is easier to read and this codepath is not asyncronus so we do not gain anything by reading the stream later. }}
- {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a syncronus client is already not the right tool for that.}}
+ {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}}
if (localVarResponse.body() == null) {
return new ApiResponse<{{{returnType}}}>(
localVarResponse.statusCode(),
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache
index 5c36825ab9b2..d97de41fda36 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache
@@ -188,7 +188,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
return new {{classname}}BuilderImpl();
}
- private static class {{classname}}BuilderImpl extends {{classname}}Builder<{{classname}}, {{classname}}BuilderImpl> {
+ private static final class {{classname}}BuilderImpl extends {{classname}}Builder<{{classname}}, {{classname}}BuilderImpl> {
@Override
protected {{classname}}BuilderImpl self() {
@@ -203,7 +203,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
public static abstract class {{classname}}Builder> {{#parent}}extends {{{.}}}Builder{{/parent}} {
{{#vars}}
- private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
+ private {{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/vars}}
{{^parent}}
protected abstract B self();
@@ -212,7 +212,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
{{/parent}}
{{#vars}}
- public B {{name}}({{{datatypeWithEnum}}} {{name}}) {
+ public B {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) {
this.{{name}} = {{name}};
return self();
}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/javaBuilder.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/javaBuilder.mustache
index 2b15a6ceeea5..6814c2983c71 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/javaBuilder.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/javaBuilder.mustache
@@ -24,12 +24,12 @@
{{#deprecated}}
@Deprecated
{{/deprecated}}
- public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) {
+ public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) {
this.instance.{{name}}({{name}});
return this;
}
{{#openApiNullable}}{{#isNullable}}
- public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) {
+ public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) {
this.instance.{{name}} = {{name}};
return this;
}
@@ -37,12 +37,12 @@
{{/vars}}
{{#parentVars}}
@Override
- public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) {
+ public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) {
this.instance.{{name}}({{name}});
return this;
}
{{#openApiNullable}}{{#isNullable}}
- public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) {
+ public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) {
this.instance.{{setter}}({{name}});
return this;
}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/nullableAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/nullableAnnotation.mustache
new file mode 100644
index 000000000000..de4ee36cfcae
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/nullableAnnotation.mustache
@@ -0,0 +1 @@
+{{^required}}{{^defaultValue}}{{^useOptional}}{{#openApiNullable}}{{^isNullable}}@Nullable {{/isNullable}}{{/openApiNullable}}{{^openApiNullable}}@Nullable {{/openApiNullable}}{{/useOptional}}{{/defaultValue}}{{#defaultValue}}{{^openApiNullable}}{{#isNullable}}@Nullable {{/isNullable}}{{/openApiNullable}}{{/defaultValue}}{{/required}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
index e94b47c326fe..a64b34f44a49 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
@@ -66,16 +66,21 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
+ {{#lombok.Builder}}
+ {{#defaultValue}}
+ @lombok.Builder.Default
+ {{/defaultValue}}
+ {{/lombok.Builder}}
{{#deprecated}}
@Deprecated
{{/deprecated}}
{{#isContainer}}
{{#useBeanValidation}}@Valid{{/useBeanValidation}}
{{#openApiNullable}}
- private {{#isNullable}}{{>nullableDataTypeBeanValidation}} {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined();{{/isNullable}}{{^required}}{{^isNullable}}{{>nullableDataTypeBeanValidation}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/isNullable}}{{/required}}{{#required}}{{^isNullable}}{{>nullableDataTypeBeanValidation}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/isNullable}}{{/required}}
+ private {{>nullableAnnotation}}{{#isNullable}}{{>nullableDataTypeBeanValidation}} {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined();{{/isNullable}}{{^required}}{{^isNullable}}{{>nullableDataTypeBeanValidation}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/isNullable}}{{/required}}{{#required}}{{^isNullable}}{{>nullableDataTypeBeanValidation}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/isNullable}}{{/required}}
{{/openApiNullable}}
{{^openApiNullable}}
- private {{>nullableDataType}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
+ private {{>nullableAnnotation}}{{>nullableDataType}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/openApiNullable}}
{{/isContainer}}
{{^isContainer}}
@@ -86,10 +91,10 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}}
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
{{/isDateTime}}
{{#openApiNullable}}
- private {{#isNullable}}{{>nullableDataTypeBeanValidation}} {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined();{{/isNullable}}{{^required}}{{^isNullable}}{{>nullableDataTypeBeanValidation}} {{name}}{{#useOptional}} = Optional.{{^defaultValue}}empty(){{/defaultValue}}{{#defaultValue}}of({{{.}}}){{/defaultValue}};{{/useOptional}}{{^useOptional}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/useOptional}}{{/isNullable}}{{/required}}{{^isNullable}}{{#required}}{{>nullableDataTypeBeanValidation}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/required}}{{/isNullable}}
+ private {{>nullableAnnotation}}{{#isNullable}}{{>nullableDataTypeBeanValidation}} {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined();{{/isNullable}}{{^required}}{{^isNullable}}{{>nullableDataTypeBeanValidation}} {{name}}{{#useOptional}} = Optional.{{^defaultValue}}empty(){{/defaultValue}}{{#defaultValue}}of({{{.}}}){{/defaultValue}};{{/useOptional}}{{^useOptional}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/useOptional}}{{/isNullable}}{{/required}}{{^isNullable}}{{#required}}{{>nullableDataTypeBeanValidation}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/required}}{{/isNullable}}
{{/openApiNullable}}
{{^openApiNullable}}
- private {{>nullableDataType}} {{name}}{{#isNullable}} = null{{/isNullable}}{{^isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isNullable}};
+ private {{>nullableAnnotation}}{{>nullableDataType}} {{name}}{{#isNullable}} = null{{/isNullable}}{{^isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isNullable}};
{{/openApiNullable}}
{{/isContainer}}
{{/vars}}
@@ -130,7 +135,7 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}}
/**
* Constructor with all args parameters
*/
- public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) {
+ public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{>nullableAnnotation}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) {
{{#parent}}
super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}});
{{/parent}}
diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache
index 0103ae41bbe2..0a804a2743d9 100644
--- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache
+++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache
@@ -8,54 +8,54 @@
true
{{packageVersion}}
{{#nullableReferenceTypes}}
- annotations
+ annotations
{{/nullableReferenceTypes}}
{{#isLibrary}}
- Library
+ Library
{{/isLibrary}}
{{packageName}}
{{packageName}}
{{userSecretsGuid}}
Linux
..\..
- {{#centralizedPackageVersionManagement}}
+ {{#centralizedPackageVersionManagement}}
{{.}}
- {{/centralizedPackageVersionManagement}}
+ {{/centralizedPackageVersionManagement}}
{{#useSeparateModelProject}}
-
+
{{/useSeparateModelProject}}
{{#useFrameworkReference}}
- {{#isLibrary}}
-
- {{/isLibrary}}
+ {{#isLibrary}}
+
+ {{/isLibrary}}
{{/useFrameworkReference}}
{{^useFrameworkReference}}
-
+
{{/useFrameworkReference}}
{{^useSeparateModelProject}}
-
+
{{/useSeparateModelProject}}
- {{#useSwashbuckle}}
-
- {{#useNewtonsoft}}
-
-
- {{/useNewtonsoft}}
- {{^useNewtonsoft}}
-
- {{/useNewtonsoft}}
-
+ {{#useSwashbuckle}}
+
+ {{#useNewtonsoft}}
+
+
+ {{/useNewtonsoft}}
+ {{^useNewtonsoft}}
+
+ {{/useNewtonsoft}}
+
+ {{/useSwashbuckle}}
+ {{^useSwashbuckle}}
+ {{#useNewtonsoft}}
+
+ {{/useNewtonsoft}}
{{/useSwashbuckle}}
- {{^useSwashbuckle}}
- {{#useNewtonsoft}}
-
- {{/useNewtonsoft}}
- {{/useSwashbuckle}}
-
\ No newline at end of file
+
diff --git a/modules/openapi-generator/src/main/resources/csharp-functions/JsonSubTypesTests.mustache b/modules/openapi-generator/src/main/resources/csharp-functions/JsonSubTypesTests.mustache
index 9b1f66624d74..55b1d51837d9 100644
--- a/modules/openapi-generator/src/main/resources/csharp-functions/JsonSubTypesTests.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp-functions/JsonSubTypesTests.mustache
@@ -17,17 +17,17 @@ namespace {{packageName}}.Test.Client
[Test]
public void TestSimpleJsonSubTypesExample()
{
- var annimal =
+ var animal =
JsonConvert.DeserializeObject("{\"Kind\":\"Dog\",\"Breed\":\"Jack Russell Terrier\"}");
- Assert.AreEqual("Jack Russell Terrier", (annimal as Dog)?.Breed);
+ Assert.AreEqual("Jack Russell Terrier", (animal as Dog)?.Breed);
}
[Test]
public void DeserializeObjectWithCustomMapping()
{
- var annimal =
+ var animal =
JsonConvert.DeserializeObject("{\"Sound\":\"Bark\",\"Breed\":\"Jack Russell Terrier\"}");
- Assert.AreEqual("Jack Russell Terrier", (annimal as Dog2)?.Breed);
+ Assert.AreEqual("Jack Russell Terrier", (animal as Dog2)?.Breed);
}
[Test]
diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache
index ec45cbab3c56..c386535dd955 100644
--- a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache
@@ -317,7 +317,7 @@ namespace {{packageName}}.Client
{
foreach (var value in headerParam.Value)
{
- request.AddHeader(headerParam.Key, value);
+ request.AddOrUpdateHeader(headerParam.Key, value);
}
}
}
diff --git a/modules/openapi-generator/src/main/resources/gdscript/model.handlebars b/modules/openapi-generator/src/main/resources/gdscript/model.handlebars
index 1eeb8a0479c0..199d4d27b558 100644
--- a/modules/openapi-generator/src/main/resources/gdscript/model.handlebars
+++ b/modules/openapi-generator/src/main/resources/gdscript/model.handlebars
@@ -43,7 +43,7 @@
{{/if}}
__{{name}}__was__set = true
{{name}} = value
-{{! Flag used to only serialize what has been explicitely set. (no nullable types, anyway null might be legit) }}
+{{! Flag used to only serialize what has been explicitly set. (no nullable types, anyway null might be legit) }}
var __{{name}}__was__set := false
{{! Store the allowed values if the property is an enum }}
{{#if isEnum}}
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 5dc6fd9aebd1..f1067422e244 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
@@ -591,7 +591,7 @@ func (c *{{classname}}Controller) {{nickname}}(w http.ResponseWriter, r *http.Re
{{paramName}}Param := r.Header.Get("{{baseName}}")
{{/isHeaderParam}}
{{#isBodyParam}}
- {{paramName}}Param := {{dataType}}{}
+ var {{paramName}}Param {{dataType}}
d := json.NewDecoder(r.Body)
{{^isAdditionalPropertiesTrue}}
d.DisallowUnknownFields()
diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache
index ec5d8c742f69..568c7e31ee05 100644
--- a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache
+++ b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache
@@ -111,10 +111,10 @@
} else {
// Use a for loop instead of forEach to avoid nested functions
// Otherwise "return" will not work properly
- for(var propt in currentNode){
- if (currentNode.hasOwnProperty(propt)) {
- currentChild = currentNode[propt]
- if (id == propt) {
+ for(var property in currentNode){
+ if (currentNode.hasOwnProperty(property)) {
+ currentChild = currentNode[property]
+ if (id == property) {
return currentChild;
} else {
// Search in the current child
diff --git a/modules/openapi-generator/src/main/resources/julia-client/api.mustache b/modules/openapi-generator/src/main/resources/julia-client/api.mustache
index e1aaa06369ff..045543bedc1a 100644
--- a/modules/openapi-generator/src/main/resources/julia-client/api.mustache
+++ b/modules/openapi-generator/src/main/resources/julia-client/api.mustache
@@ -22,7 +22,7 @@ const _returntypes_{{operationId}}_{{classname}} = Dict{Regex,Type}(
{{/responses}}
)
-function _oacinternal_{{operationId}}(_api::{{classname}}{{#allParams}}{{#required}}, {{paramName}}::{{#dataType}}{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{/dataType}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}} _mediaType=nothing)
+function _oacinternal_{{operationId}}(_api::{{classname}}{{#allParams}}{{#required}}, {{paramName}}::{{#dataType}}{{#isBinary}}{{#isFile}}{{dataType}}{{/isFile}}{{^isFile}}Vector{UInt8}{{/isFile}}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{/dataType}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}} _mediaType=nothing)
{{#allParams}}
{{#hasValidation}}
{{#maxLength}}
@@ -61,7 +61,7 @@ function _oacinternal_{{operationId}}(_api::{{classname}}{{#allParams}}{{#requir
OpenAPI.Clients.set_param(_ctx.form, "{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}", {{paramName}}{{#isListContainer}}; collection_format="{{collectionFormat}}"{{/isListContainer}}) # type {{dataType}}
{{/isFile}}
{{#isFile}}
- OpenAPI.Clients.set_param(_ctx.file, "{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}", {{paramName}}) # type {{#dataType}}{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{/dataType}}
+ OpenAPI.Clients.set_param(_ctx.file, "{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}", {{paramName}}) # type {{#dataType}}{{#isBinary}}{{#isFile}}{{dataType}}{{/isFile}}{{^isFile}}Vector{UInt8}{{/isFile}}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{/dataType}}
{{/isFile}}
{{/formParams}}
OpenAPI.Clients.set_header_accept(_ctx, [{{#produces}}"{{{mediaType}}}", {{/produces}}])
@@ -74,17 +74,17 @@ end
{{/summary.length}}{{#notes.length}}{{{notes}}}
{{/notes.length}}Params:
-{{#allParams}}- {{paramName}}::{{dataType}}{{#required}} (required){{/required}}
+{{#allParams}}- {{paramName}}::{{#isBinary}}{{#isFile}}{{dataType}}{{/isFile}}{{^isFile}}Vector{UInt8}{{/isFile}}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{#required}} (required){{/required}}
{{/allParams}}
Return: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Nothing{{/returnType}}, OpenAPI.Clients.ApiResponse
"""
-function {{operationId}}(_api::{{classname}}{{#allParams}}{{#required}}, {{paramName}}::{{dataType}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}} _mediaType=nothing)
+function {{operationId}}(_api::{{classname}}{{#allParams}}{{#required}}, {{paramName}}::{{#isBinary}}{{#isFile}}{{dataType}}{{/isFile}}{{^isFile}}Vector{UInt8}{{/isFile}}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}} _mediaType=nothing)
_ctx = _oacinternal_{{operationId}}(_api{{#allParams}}{{#required}}, {{paramName}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}={{paramName}},{{/required}}{{/allParams}} _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
-function {{operationId}}(_api::{{classname}}, response_stream::Channel{{#allParams}}{{#required}}, {{paramName}}::{{dataType}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}} _mediaType=nothing)
+function {{operationId}}(_api::{{classname}}, response_stream::Channel{{#allParams}}{{#required}}, {{paramName}}::{{#isBinary}}{{#isFile}}{{dataType}}{{/isFile}}{{^isFile}}Vector{UInt8}{{/isFile}}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}} _mediaType=nothing)
_ctx = _oacinternal_{{operationId}}(_api{{#allParams}}{{#required}}, {{paramName}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}={{paramName}},{{/required}}{{/allParams}} _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
diff --git a/modules/openapi-generator/src/main/resources/julia-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/julia-client/api_doc.mustache
index 3328e7e64200..c5b846858799 100644
--- a/modules/openapi-generator/src/main/resources/julia-client/api_doc.mustache
+++ b/modules/openapi-generator/src/main/resources/julia-client/api_doc.mustache
@@ -23,13 +23,13 @@ Method | HTTP request | Description
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**_api** | **{{classname}}** | API context | {{/-last}}{{/allParams}}{{#allParams}}{{#required}}
-**{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}}
+**{{paramName}}** | {{#isPrimitiveType}}**{{#isBinary}}{{#isFile}}{{dataType}}{{/isFile}}{{^isFile}}Vector{UInt8}{{/isFile}}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{#isFile}}**{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}**{{/isFile}}{{/isPrimitiveType}} | {{description}} |{{/required}}{{/allParams}}{{#hasOptionalParams}}
### Optional Parameters
{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}}{{^required}}
- **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/required}}{{/allParams}}{{/hasOptionalParams}}
+ **{{paramName}}** | {{#isPrimitiveType}}**{{#isBinary}}{{#isFile}}{{dataType}}{{/isFile}}{{^isFile}}Vector{UInt8}{{/isFile}}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{#isFile}}**{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}**{{/isFile}}{{/isPrimitiveType}} | {{description}} | {{^isBinary}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/isBinary}}{{/required}}{{/allParams}}{{/hasOptionalParams}}
### Return type
diff --git a/modules/openapi-generator/src/main/resources/julia-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/julia-server/api_doc.mustache
index 1595704fa317..19562f3717c1 100644
--- a/modules/openapi-generator/src/main/resources/julia-server/api_doc.mustache
+++ b/modules/openapi-generator/src/main/resources/julia-server/api_doc.mustache
@@ -11,7 +11,7 @@ Method | HTTP request | Description
{{#operations}}
{{#operation}}
# **{{{operationId}}}**
-> {{operationId}}(req::HTTP.Request{{#allParams}}{{#required}}, {{paramName}}::{{dataType}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}}) -> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Nothing{{/returnType}}
+> {{operationId}}(req::HTTP.Request{{#allParams}}{{#required}}, {{paramName}}::{{#dataType}}{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{/dataType}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}}) -> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Nothing{{/returnType}}
{{{summary}}}{{#notes}}
@@ -22,13 +22,13 @@ Method | HTTP request | Description
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**req** | **HTTP.Request** | The HTTP Request object | {{/-last}}{{/allParams}}{{#allParams}}{{#required}}
-**{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}}
+**{{paramName}}** | {{#isPrimitiveType}}**{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{#isFile}}**{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}**{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{/required}}{{/allParams}}{{#hasOptionalParams}}
### Optional Parameters
{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}}{{^required}}
- **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/required}}{{/allParams}}{{/hasOptionalParams}}
+ **{{paramName}}** | {{#isPrimitiveType}}**{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{#isFile}}**{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}**{{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^isBinary}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/isBinary}}{{/required}}{{/allParams}}{{/hasOptionalParams}}
### Return type
diff --git a/modules/openapi-generator/src/main/resources/julia-server/server.mustache b/modules/openapi-generator/src/main/resources/julia-server/server.mustache
index 3b075eaf5a50..bafc19141f1a 100644
--- a/modules/openapi-generator/src/main/resources/julia-server/server.mustache
+++ b/modules/openapi-generator/src/main/resources/julia-server/server.mustache
@@ -11,7 +11,7 @@ The following server methods must be implemented:
{{#operation}}
- **{{operationId}}**
- *invocation:* {{httpMethod}} {{{path}}}
- - *signature:* {{operationId}}(req::HTTP.Request{{#allParams}}{{#required}}, {{paramName}}::{{dataType}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}}) -> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Nothing{{/returnType}}
+ - *signature:* {{operationId}}(req::HTTP.Request{{#allParams}}{{#required}}, {{paramName}}::{{#isBinary}}Vector{UInt8}{{/isBinary}}{{^isBinary}}{{dataType}}{{/isBinary}}{{/required}}{{/allParams}};{{#allParams}}{{^required}} {{paramName}}=nothing,{{/required}}{{/allParams}}) -> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Nothing{{/returnType}}
{{/operation}}
{{/operations}}
{{/apis}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache
index 984ce8c047cf..6bf2ef3e8e91 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache
@@ -11,7 +11,7 @@ version = "{{artifactVersion}}"
val kotlin_version = "2.0.21"
val coroutines_version = "1.9.0"
val serialization_version = "1.7.3"
-val ktor_version = "3.0.2"
+val ktor_version = "3.0.3"
repositories {
mavenCentral()
diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/returnTypes.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/returnTypes.mustache
index 12a74e5ad7ac..612aa9ec0599 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-spring/returnTypes.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-spring/returnTypes.mustache
@@ -1 +1 @@
-{{#isMap}}Map{{/isMap}}{{#isArray}}{{#reactive}}Flow{{/reactive}}{{^reactive}}{{{returnContainer}}}{{/reactive}}<{{{returnType}}}>{{/isArray}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
\ No newline at end of file
+{{#isMap}}Map{{/isMap}}{{#isArray}}{{#reactive}}{{#useFlowForArrayReturnType}}Flow{{/useFlowForArrayReturnType}}{{^useFlowForArrayReturnType}}{{{returnContainer}}}{{/useFlowForArrayReturnType}}{{/reactive}}{{^reactive}}{{{returnContainer}}}{{/reactive}}<{{{returnType}}}>{{/isArray}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache
index 757c79827c25..bdbe28f85c5c 100644
--- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache
+++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache
@@ -711,7 +711,7 @@ use {{invokerPackage}}\ObjectSerializer;
{{#queryParams}}
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
- ${{paramName}}{{#isEnumRef}}->value{{/isEnumRef}},
+ ${{paramName}}{{#isEnumRef}}?->value{{/isEnumRef}},
'{{baseName}}', // param base name
'{{#schema}}{{openApiType}}{{/schema}}', // openApiType
'{{style}}', // style
diff --git a/modules/openapi-generator/src/main/resources/php/libraries/psr-18/ApiException.mustache b/modules/openapi-generator/src/main/resources/php/libraries/psr-18/ApiException.mustache
index e3f055abafb7..c3ea7ad7f5c2 100644
--- a/modules/openapi-generator/src/main/resources/php/libraries/psr-18/ApiException.mustache
+++ b/modules/openapi-generator/src/main/resources/php/libraries/psr-18/ApiException.mustache
@@ -90,7 +90,7 @@ class ApiException extends RequestException
}
/**
- * Sets the deseralized response object (during deserialization)
+ * Sets the deserialized response object (during deserialization)
*
* @param mixed $obj Deserialized response object
*
@@ -102,7 +102,7 @@ class ApiException extends RequestException
}
/**
- * Gets the deseralized response object (during deserialization)
+ * Gets the deserialized response object (during deserialization)
*
* @return mixed the deserialized response object
*/
diff --git a/modules/openapi-generator/src/main/resources/python-pydantic-v1/model_generic.mustache b/modules/openapi-generator/src/main/resources/python-pydantic-v1/model_generic.mustache
index a9ba41b394a9..5422b0790d0f 100644
--- a/modules/openapi-generator/src/main/resources/python-pydantic-v1/model_generic.mustache
+++ b/modules/openapi-generator/src/main/resources/python-pydantic-v1/model_generic.mustache
@@ -17,7 +17,7 @@ from typing import TYPE_CHECKING
from importlib import import_module
if TYPE_CHECKING:
{{#mappedModels}}
- from {{packageName}}.models.{{model.classVarName}} import {{modelName}}
+ from {{packageName}}.models.{{model.classFilename}} import {{modelName}}
{{/mappedModels}}
{{/discriminator}}
@@ -238,7 +238,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
object_type = cls.get_discriminator_value(obj)
{{#mappedModels}}
if object_type == '{{{modelName}}}':
- return import_module("{{packageName}}.models.{{model.classVarName}}").{{modelName}}.from_dict(obj)
+ return import_module("{{packageName}}.models.{{model.classFilename}}").{{modelName}}.from_dict(obj)
{{/mappedModels}}
raise ValueError("{{{classname}}} failed to lookup discriminator value from " +
json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name +
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 efd8e3041684..9fa35c84fab4 100644
--- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache
+++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache
@@ -18,7 +18,7 @@ from typing_extensions import Self
from typing import TYPE_CHECKING
if TYPE_CHECKING:
{{#mappedModels}}
- from {{packageName}}.models.{{model.classVarName}} import {{modelName}}
+ from {{packageName}}.models.{{model.classFilename}} import {{modelName}}
{{/mappedModels}}
{{/discriminator}}
@@ -261,7 +261,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
object_type = cls.get_discriminator_value(obj)
{{#mappedModels}}
if object_type == '{{{modelName}}}':
- return import_module("{{packageName}}.models.{{model.classVarName}}").{{modelName}}.from_dict(obj)
+ return import_module("{{packageName}}.models.{{model.classFilename}}").{{modelName}}.from_dict(obj)
{{/mappedModels}}
raise ValueError("{{{classname}}} failed to lookup discriminator value from " +
diff --git a/modules/openapi-generator/src/main/resources/python/pyproject.mustache b/modules/openapi-generator/src/main/resources/python/pyproject.mustache
index a38136621504..8dab7dec7c44 100644
--- a/modules/openapi-generator/src/main/resources/python/pyproject.mustache
+++ b/modules/openapi-generator/src/main/resources/python/pyproject.mustache
@@ -12,14 +12,14 @@ include = ["{{packageName}}/py.typed"]
[tool.poetry.dependencies]
python = "^3.8"
-urllib3 = ">= 1.25.3 < 3.0.0"
+urllib3 = ">= 1.25.3, < 3.0.0"
python-dateutil = ">= 2.8.2"
{{#asyncio}}
aiohttp = ">= 3.8.4"
aiohttp-retry = ">= 2.8.3"
{{/asyncio}}
{{#tornado}}
-tornado = ">=4.2 <5"
+tornado = ">=4.2, <5"
{{/tornado}}
{{#hasHttpSignatureMethods}}
pem = ">= 19.3.0"
diff --git a/modules/openapi-generator/src/main/resources/r/api_client.mustache b/modules/openapi-generator/src/main/resources/r/api_client.mustache
index 72287876e969..2a50b0263bda 100644
--- a/modules/openapi-generator/src/main/resources/r/api_client.mustache
+++ b/modules/openapi-generator/src/main/resources/r/api_client.mustache
@@ -437,7 +437,7 @@ ApiClient <- R6::R6Class(
#'
#' @param local_var_resp The API response
#' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is.
- #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne.
+ #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response.
DeserializeResponse = function(local_var_resp, return_type = NULL) {
text <- local_var_resp$response_as_text()
if (is.na(text)) {
@@ -454,8 +454,8 @@ ApiClient <- R6::R6Class(
#' The function will write out data.
#'
#' 1. If binary data is detected it will use `writeBin`
- #' 2. If the raw response is coercable to text, the text will be written to a file
- #' 3. If the raw response is not coercable to text, the raw response will be written
+ #' 2. If the raw response is coercible to text, the text will be written to a file
+ #' 3. If the raw response is not coercible to text, the raw response will be written
#'
#' @param local_var_resp The API response
#' @param file The name of the data file to save the result
diff --git a/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache b/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache
index 194083b2d38c..3020d69ff821 100644
--- a/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache
+++ b/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache
@@ -450,7 +450,7 @@ ApiClient <- R6::R6Class(
#'
#' @param local_var_resp The API response
#' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is.
- #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne.
+ #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response.
DeserializeResponse = function(local_var_resp, return_type = NULL) {
text <- local_var_resp$response_as_text()
if (is.na(text)) {
@@ -467,8 +467,8 @@ ApiClient <- R6::R6Class(
#' The function will write out data.
#'
#' 1. If binary data is detected it will use `writeBin`
- #' 2. If the raw response is coercable to text, the text will be written to a file
- #' 3. If the raw response is not coercable to text, the raw response will be written
+ #' 2. If the raw response is coercible to text, the text will be written to a file
+ #' 3. If the raw response is not coercible to text, the raw response will be written
#'
#' @param local_var_resp The API response
#' @param file The name of the data file to save the result
diff --git a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache
index 6c158a02b0b3..f64ef16400d1 100644
--- a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache
+++ b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache
@@ -573,21 +573,70 @@ impl PartialEq for {{{classname}}} {
self.0.get() == other.0.get()
}
}
+
{{/anyOf.size}}
{{#oneOf.size}}
-/// One of:
-{{#oneOf}}
-/// - {{{.}}}
-{{/oneOf}}
-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
-pub struct {{{classname}}}(Box);
+{{#discriminator}}
+#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
+#[serde(tag = "{{{propertyBaseName}}}")]
+{{/discriminator}}
+{{^discriminator}}
+#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
+#[serde(untagged)]
+{{/discriminator}}
+#[allow(non_camel_case_types)]
+pub enum {{{classname}}} {
+ {{#composedSchemas}}
+ {{#oneOf}}
+ {{{datatypeWithEnum}}}(Box<{{{dataType}}}>),
+ {{/oneOf}}
+ {{/composedSchemas}}
+}
impl validator::Validate for {{{classname}}}
{
fn validate(&self) -> std::result::Result<(), validator::ValidationErrors> {
- std::result::Result::Ok(())
+ match self {
+ {{#composedSchemas}}
+ {{#oneOf}}
+ {{#isPrimitiveType}}
+ Self::{{{datatypeWithEnum}}}(_) => std::result::Result::Ok(()),
+ {{/isPrimitiveType}}
+ {{^isPrimitiveType}}
+ Self::{{{datatypeWithEnum}}}(x) => x.validate(),
+ {{/isPrimitiveType}}
+ {{/oneOf}}
+ {{/composedSchemas}}
+ }
+ }
+}
+
+{{#discriminator}}
+impl serde::Serialize for {{{classname}}} {
+ fn serialize(&self, serializer: S) -> Result
+ where S: serde::Serializer {
+ match self {
+ {{#composedSchemas}}
+ {{#oneOf}}
+ Self::{{{datatypeWithEnum}}}(x) => x.serialize(serializer),
+ {{/oneOf}}
+ {{/composedSchemas}}
+ }
}
}
+{{/discriminator}}
+
+
+
+{{#composedSchemas}}
+{{#oneOf}}
+impl From<{{{dataType}}}> for {{{classname}}} {
+ fn from(value: {{{dataType}}}) -> Self {
+ Self::{{{datatypeWithEnum}}}(Box::new(value))
+ }
+}
+{{/oneOf}}
+{{/composedSchemas}}
/// Converts Query Parameters representation (style=form, explode=false) to a {{{classname}}} value
/// as specified in https://swagger.io/docs/specification/serialization/
@@ -600,11 +649,6 @@ impl std::str::FromStr for {{{classname}}} {
}
}
-impl PartialEq for {{{classname}}} {
- fn eq(&self, other: &Self) -> bool {
- self.0.get() == other.0.get()
- }
-}
{{/oneOf.size}}
{{^anyOf.size}}
{{^oneOf.size}}
@@ -613,11 +657,15 @@ impl PartialEq for {{{classname}}} {
pub struct {{{classname}}} {
{{#vars}}
{{#description}}
-/// {{{.}}}
+ /// {{{.}}}
{{/description}}
{{#isEnum}}
-/// Note: inline enums are not fully supported by openapi-generator
+ /// Note: inline enums are not fully supported by openapi-generator
{{/isEnum}}
+{{#isDiscriminator}}
+ #[serde(default = "{{{classname}}}::_name_for_{{{name}}}")]
+ #[serde(serialize_with = "{{{classname}}}::_serialize_{{{name}}}")]
+{{/isDiscriminator}}
#[serde(rename = "{{{baseName}}}")]
{{#hasValidation}}
#[validate(
@@ -685,6 +733,25 @@ pub struct {{{classname}}} {
{{/vars}}
}
+
+{{#vars}}
+{{#isDiscriminator}}
+impl {{{classname}}} {
+ fn _name_for_{{{name}}}() -> String {
+ String::from("{{{classname}}}")
+ }
+
+ fn _serialize_{{{name}}}(_: &String, s: S) -> Result
+ where
+ S: serde::Serializer,
+ {
+ s.serialize_str(&Self::_name_for_{{{name}}}())
+ }
+}
+{{/isDiscriminator}}
+{{/vars}}
+
+
{{#vars}}
{{#hasValidation}}
{{#pattern}}
diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache
index b96063531e61..ffe0f199a980 100644
--- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache
@@ -81,66 +81,62 @@ pub enum {{{operationIdCamelCase}}}Error {
{{/notes}}
{{#vendorExtensions.x-group-parameters}}
pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: &configuration::Configuration{{#allParams}}{{#-first}}, params: {{{operationIdCamelCase}}}Params{{/-first}}{{/allParams}}) -> Result<{{#isResponseFile}}{{#supportAsync}}reqwest::Response{{/supportAsync}}{{^supportAsync}}reqwest::blocking::Response{{/supportAsync}}{{/isResponseFile}}{{^isResponseFile}}{{#supportMultipleResponses}}ResponseContent<{{{operationIdCamelCase}}}Success>{{/supportMultipleResponses}}{{^supportMultipleResponses}}{{^returnType}}(){{/returnType}}{{{returnType}}}{{/supportMultipleResponses}}{{/isResponseFile}}, Error<{{{operationIdCamelCase}}}Error>> {
- let local_var_configuration = configuration;
-
- // unbox the parameters
- {{#allParams}}
- let {{paramName}} = params.{{paramName}};
- {{/allParams}}
-
{{/vendorExtensions.x-group-parameters}}
{{^vendorExtensions.x-group-parameters}}
pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: &configuration::Configuration, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}{{#isArray}}Vec<{{/isArray}}{{^isUuid}}&str{{/isUuid}}{{#isArray}}>{{/isArray}}{{/isString}}{{#isUuid}}{{#isArray}}Vec<{{/isArray}}&str{{#isArray}}>{{/isArray}}{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Result<{{#isResponseFile}}{{#supportAsync}}reqwest::Response{{/supportAsync}}{{^supportAsync}}reqwest::blocking::Response{{/supportAsync}}{{/isResponseFile}}{{^isResponseFile}}{{#supportMultipleResponses}}ResponseContent<{{{operationIdCamelCase}}}Success>{{/supportMultipleResponses}}{{^supportMultipleResponses}}{{^returnType}}(){{/returnType}}{{{returnType}}}{{/supportMultipleResponses}}{{/isResponseFile}}, Error<{{{operationIdCamelCase}}}Error>> {
- let local_var_configuration = configuration;
+ {{#allParams.0}}
+ // add a prefix to parameters to efficiently prevent name collisions
+ {{/allParams.0}}
+ {{#allParams}}
+ let {{{vendorExtensions.x-rust-param-identifier}}} = {{{paramName}}};
+ {{/allParams}}
{{/vendorExtensions.x-group-parameters}}
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}{{{path}}}", local_var_configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{paramName}}}{{^required}}.unwrap(){{/required}}{{#required}}{{#isNullable}}.unwrap(){{/isNullable}}{{/required}}{{#isArray}}.join(",").as_ref(){{/isArray}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}.to_string(){{/isContainer}}{{/isPrimitiveType}}{{/isUuid}}{{/isString}}{{#isString}}){{/isString}}{{/pathParams}});
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::{{{httpMethod}}}, local_var_uri_str.as_str());
+ let uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{vendorExtensions.x-rust-param-identifier}}}{{^required}}.unwrap(){{/required}}{{#required}}{{#isNullable}}.unwrap(){{/isNullable}}{{/required}}{{#isArray}}.join(",").as_ref(){{/isArray}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}.to_string(){{/isContainer}}{{/isPrimitiveType}}{{/isUuid}}{{/isString}}{{#isString}}){{/isString}}{{/pathParams}});
+ let mut req_builder = configuration.client.request(reqwest::Method::{{{httpMethod}}}, &uri_str);
{{#queryParams}}
{{#required}}
{{#isArray}}
- local_var_req_builder = match "{{collectionFormat}}" {
- "multi" => local_var_req_builder.query(&{{{paramName}}}.into_iter().map(|p| ("{{{baseName}}}".to_owned(), p.to_string())).collect::>()),
- _ => local_var_req_builder.query(&[("{{{baseName}}}", &{{{paramName}}}.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]),
+ req_builder = match "{{collectionFormat}}" {
+ "multi" => req_builder.query(&{{{vendorExtensions.x-rust-param-identifier}}}.into_iter().map(|p| ("{{{baseName}}}".to_owned(), p.to_string())).collect::>()),
+ _ => req_builder.query(&[("{{{baseName}}}", &{{{vendorExtensions.x-rust-param-identifier}}}.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]),
};
{{/isArray}}
{{^isArray}}
{{^isNullable}}
- local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &{{{paramName}}}.to_string())]);
+ req_builder = req_builder.query(&[("{{{baseName}}}", &{{{vendorExtensions.x-rust-param-identifier}}}.to_string())]);
{{/isNullable}}
{{#isNullable}}
{{#isDeepObject}}
- if let Some(ref local_var_str) = {{{paramName}}} {
- let params = crate::apis::parse_deep_object("{{{baseName}}}", local_var_str);
- local_var_req_builder = local_var_req_builder.query(¶ms);
+ if let Some(ref param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
+ let params = crate::apis::parse_deep_object("{{{baseName}}}", param_value);
+ req_builder = req_builder.query(¶ms);
};
{{/isDeepObject}}
{{^isDeepObject}}
- if let Some(ref local_var_str) = {{{paramName}}} {
- local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &local_var_str.to_string())]);
+ if let Some(ref param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
+ req_builder = req_builder.query(&[("{{{baseName}}}", ¶m_value.to_string())]);
};
{{/isDeepObject}}
{{/isNullable}}
{{/isArray}}
{{/required}}
{{^required}}
- if let Some(ref local_var_str) = {{{paramName}}} {
+ if let Some(ref param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
{{#isArray}}
- local_var_req_builder = match "{{collectionFormat}}" {
- "multi" => local_var_req_builder.query(&local_var_str.into_iter().map(|p| ("{{{baseName}}}".to_owned(), p.to_string())).collect::>()),
- _ => local_var_req_builder.query(&[("{{{baseName}}}", &local_var_str.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]),
+ req_builder = match "{{collectionFormat}}" {
+ "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("{{{baseName}}}".to_owned(), p.to_string())).collect::>()),
+ _ => req_builder.query(&[("{{{baseName}}}", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]),
};
{{/isArray}}
{{^isArray}}
{{#isDeepObject}}
- let params = crate::apis::parse_deep_object("{{{baseName}}}", local_var_str);
- local_var_req_builder = local_var_req_builder.query(¶ms);
+ let params = crate::apis::parse_deep_object("{{{baseName}}}", param_value);
+ req_builder = req_builder.query(¶ms);
{{/isDeepObject}}
{{^isDeepObject}}
- local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &local_var_str.to_string())]);
+ req_builder = req_builder.query(&[("{{{baseName}}}", ¶m_value.to_string())]);
{{/isDeepObject}}
{{/isArray}}
}
@@ -150,13 +146,13 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
{{#authMethods}}
{{#isApiKey}}
{{#isKeyInQuery}}
- if let Some(ref local_var_apikey) = local_var_configuration.api_key {
- let local_var_key = local_var_apikey.key.clone();
- let local_var_value = match local_var_apikey.prefix {
- Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
- None => local_var_key,
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let value = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
};
- local_var_req_builder = local_var_req_builder.query(&[("{{{keyParamName}}}", local_var_value)]);
+ req_builder = req_builder.query(&[("{{{keyParamName}}}", value)]);
}
{{/isKeyInQuery}}
{{/isApiKey}}
@@ -164,13 +160,13 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
{{/hasAuthMethods}}
{{#hasAuthMethods}}
{{#withAWSV4Signature}}
- if let Some(ref local_var_aws_v4_key) = local_var_configuration.aws_v4_key {
- let local_var_new_headers = match local_var_aws_v4_key.sign(
- &local_var_uri_str,
+ if let Some(ref aws_v4_key) = configuration.aws_v4_key {
+ let new_headers = match aws_v4_key.sign(
+ &uri_str,
"{{{httpMethod}}}",
{{#hasBodyParam}}
{{#bodyParams}}
- &serde_json::to_string(&{{{paramName}}}).expect("param should serialize to string"),
+ &serde_json::to_string(&{{{vendorExtensions.x-rust-param-identifier}}}).expect("param should serialize to string"),
{{/bodyParams}}
{{/hasBodyParam}}
{{^hasBodyParam}}
@@ -180,31 +176,31 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
Ok(new_headers) => new_headers,
Err(err) => return Err(Error::AWSV4SignatureError(err)),
};
- for (local_var_name, local_var_value) in local_var_new_headers.iter() {
- local_var_req_builder = local_var_req_builder.header(local_var_name.as_str(), local_var_value.as_str());
+ for (name, value) in new_headers.iter() {
+ req_builder = req_builder.header(name.as_str(), value.as_str());
}
}
{{/withAWSV4Signature}}
{{/hasAuthMethods}}
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
{{#hasHeaderParams}}
{{#headerParams}}
{{#required}}
{{^isNullable}}
- local_var_req_builder = local_var_req_builder.header("{{{baseName}}}", {{{paramName}}}{{#isArray}}.join(","){{/isArray}}.to_string());
+ req_builder = req_builder.header("{{{baseName}}}", {{{vendorExtensions.x-rust-param-identifier}}}{{#isArray}}.join(","){{/isArray}}.to_string());
{{/isNullable}}
{{#isNullable}}
- match {{{paramName}}} {
- Some(local_var_param_value) => { local_var_req_builder = local_var_req_builder.header("{{{baseName}}}", local_var_param_value{{#isArray}}.join(","){{/isArray}}.to_string()); },
- None => { local_var_req_builder = local_var_req_builder.header("{{{baseName}}}", ""); },
+ match {{{vendorExtensions.x-rust-param-identifier}}} {
+ Some(param_value) => { req_builder = req_builder.header("{{{baseName}}}", param_value{{#isArray}}.join(","){{/isArray}}.to_string()); },
+ None => { req_builder = req_builder.header("{{{baseName}}}", ""); },
}
{{/isNullable}}
{{/required}}
{{^required}}
- if let Some(local_var_param_value) = {{{paramName}}} {
- local_var_req_builder = local_var_req_builder.header("{{{baseName}}}", local_var_param_value{{#isArray}}.join(","){{/isArray}}.to_string());
+ if let Some(param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
+ req_builder = req_builder.header("{{{baseName}}}", param_value{{#isArray}}.join(","){{/isArray}}.to_string());
}
{{/required}}
{{/headerParams}}
@@ -214,38 +210,38 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
{{#supportTokenSource}}
// Obtain a token from source provider.
// Tokens can be Id or access tokens depending on the provider type and configuration.
- let token = local_var_configuration.token_source.token().await.map_err(Error::TokenSource)?;
+ let token = configuration.token_source.token().await.map_err(Error::TokenSource)?;
// The token format is the responsibility of the provider, thus we just set the authorization header with whatever is given.
- local_var_req_builder = local_var_req_builder.header(reqwest::header::AUTHORIZATION, token);
+ req_builder = req_builder.header(reqwest::header::AUTHORIZATION, token);
{{/supportTokenSource}}
{{^supportTokenSource}}
{{#isApiKey}}
{{#isKeyInHeader}}
- if let Some(ref local_var_apikey) = local_var_configuration.api_key {
- let local_var_key = local_var_apikey.key.clone();
- let local_var_value = match local_var_apikey.prefix {
- Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
- None => local_var_key,
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let value = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
};
- local_var_req_builder = local_var_req_builder.header("{{{keyParamName}}}", local_var_value);
+ req_builder = req_builder.header("{{{keyParamName}}}", value);
};
{{/isKeyInHeader}}
{{/isApiKey}}
{{#isBasic}}
{{#isBasicBasic}}
- if let Some(ref local_var_auth_conf) = local_var_configuration.basic_auth {
- local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned());
+ if let Some(ref auth_conf) = configuration.basic_auth {
+ req_builder = req_builder.basic_auth(auth_conf.0.to_owned(), auth_conf.1.to_owned());
};
{{/isBasicBasic}}
{{#isBasicBearer}}
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
+ if let Some(ref token) = configuration.bearer_access_token {
+ req_builder = req_builder.bearer_auth(token.to_owned());
};
{{/isBasicBearer}}
{{/isBasic}}
{{#isOAuth}}
- if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
+ if let Some(ref token) = configuration.oauth_access_token {
+ req_builder = req_builder.bearer_auth(token.to_owned());
};
{{/isOAuth}}
{{/supportTokenSource}}
@@ -253,24 +249,24 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
{{/hasAuthMethods}}
{{#isMultipart}}
{{#hasFormParams}}
- let mut local_var_form = reqwest{{^supportAsync}}::blocking{{/supportAsync}}::multipart::Form::new();
+ let mut multipart_form = reqwest{{^supportAsync}}::blocking{{/supportAsync}}::multipart::Form::new();
{{#formParams}}
{{#isFile}}
{{^supportAsync}}
{{#required}}
{{^isNullable}}
- local_var_form = local_var_form.file("{{{baseName}}}", {{{paramName}}})?;
+ multipart_form = multipart_form.file("{{{baseName}}}", {{{vendorExtensions.x-rust-param-identifier}}})?;
{{/isNullable}}
{{#isNullable}}
- match {{{paramName}}} {
- Some(local_var_param_value) => { local_var_form = local_var_form.file("{{{baseName}}}", local_var_param_value)?; },
+ match {{{vendorExtensions.x-rust-param-identifier}}} {
+ Some(param_value) => { multipart_form = multipart_form.file("{{{baseName}}}", param_value)?; },
None => { unimplemented!("Required nullable form file param not supported"); },
}
{{/isNullable}}
{{/required}}
{{^required}}
- if let Some(local_var_param_value) = {{{paramName}}} {
- local_var_form = local_var_form.file("{{{baseName}}}", local_var_param_value)?;
+ if let Some(param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
+ multipart_form = multipart_form.file("{{{baseName}}}", param_value)?;
}
{{/required}}
{{/supportAsync}}
@@ -281,116 +277,114 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
{{^isFile}}
{{#required}}
{{^isNullable}}
- local_var_form = local_var_form.text("{{{baseName}}}", {{{paramName}}}{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string());
+ multipart_form = multipart_form.text("{{{baseName}}}", {{{vendorExtensions.x-rust-param-identifier}}}{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string());
{{/isNullable}}
{{#isNullable}}
- match {{{paramName}}} {
- Some(local_var_param_value) => { local_var_form = local_var_form.text("{{{baseName}}}", local_var_param_value{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string()); },
- None => { local_var_form = local_var_form.text("{{{baseName}}}", ""); },
+ match {{{vendorExtensions.x-rust-param-identifier}}} {
+ Some(param_value) => { multipart_form = multipart_form.text("{{{baseName}}}", param_value{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string()); },
+ None => { multipart_form = multipart_form.text("{{{baseName}}}", ""); },
}
{{/isNullable}}
{{/required}}
{{^required}}
- if let Some(local_var_param_value) = {{{paramName}}} {
- local_var_form = local_var_form.text("{{{baseName}}}", local_var_param_value{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string());
+ if let Some(param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
+ multipart_form = multipart_form.text("{{{baseName}}}", param_value{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string());
}
{{/required}}
{{/isFile}}
{{/formParams}}
- local_var_req_builder = local_var_req_builder.multipart(local_var_form);
+ req_builder = req_builder.multipart(multipart_form);
{{/hasFormParams}}
{{/isMultipart}}
{{^isMultipart}}
{{#hasFormParams}}
- let mut local_var_form_params = std::collections::HashMap::new();
+ let mut multipart_form_params = std::collections::HashMap::new();
{{#formParams}}
{{#isFile}}
{{#required}}
{{^isNullable}}
- local_var_form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content"));
+ multipart_form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content"));
{{/isNullable}}
{{#isNullable}}
- match {{{paramName}}} {
- Some(local_var_param_value) => { local_var_form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content")); },
+ match {{{vendorExtensions.x-rust-param-identifier}}} {
+ Some(param_value) => { multipart_form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content")); },
None => { unimplemented!("Required nullable file form param not supported with x-www-form-urlencoded content"); },
}
{{/isNullable}}
{{/required}}
{{^required}}
- if let Some(local_var_param_value) = {{{paramName}}} {
- local_var_form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content"));
+ if let Some(param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
+ multipart_form_params.insert("{{{baseName}}}", unimplemented!("File form param not supported with x-www-form-urlencoded content"));
}
{{/required}}
{{/isFile}}
{{^isFile}}
{{#required}}
{{^isNullable}}
- local_var_form_params.insert("{{{baseName}}}", {{{paramName}}}{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string());
+ multipart_form_params.insert("{{{baseName}}}", {{{vendorExtensions.x-rust-param-identifier}}}{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string());
{{/isNullable}}
{{#isNullable}}
- match {{{paramName}}} {
- Some(local_var_param_value) => { local_var_form_params.insert("{{{baseName}}}", local_var_param_value{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string()); },
- None => { local_var_form_params.insert("{{{baseName}}}", ""); },
+ match {{{vendorExtensions.x-rust-param-identifier}}} {
+ Some(param_value) => { multipart_form_params.insert("{{{baseName}}}", param_value{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string()); },
+ None => { multipart_form_params.insert("{{{baseName}}}", ""); },
}
{{/isNullable}}
{{/required}}
{{^required}}
- if let Some(local_var_param_value) = {{{paramName}}} {
- local_var_form_params.insert("{{{baseName}}}", local_var_param_value{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string());
+ if let Some(param_value) = {{{vendorExtensions.x-rust-param-identifier}}} {
+ multipart_form_params.insert("{{{baseName}}}", param_value{{#isArray}}.into_iter().map(|p| p.to_string()).collect::>().join(","){{/isArray}}.to_string());
}
{{/required}}
{{/isFile}}
{{/formParams}}
- local_var_req_builder = local_var_req_builder.form(&local_var_form_params);
+ req_builder = req_builder.form(&multipart_form_params);
{{/hasFormParams}}
{{/isMultipart}}
{{#hasBodyParam}}
{{#bodyParams}}
{{#isFile}}
- local_var_req_builder = local_var_req_builder.body({{{paramName}}});
+ req_builder = req_builder.body({{{vendorExtensions.x-rust-param-identifier}}});
{{/isFile}}
{{^isFile}}
- local_var_req_builder = local_var_req_builder.json(&{{{paramName}}});
+ req_builder = req_builder.json(&{{{vendorExtensions.x-rust-param-identifier}}});
{{/isFile}}
{{/bodyParams}}
{{/hasBodyParam}}
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req){{#supportAsync}}.await{{/supportAsync}}?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req){{#supportAsync}}.await{{/supportAsync}}?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
+ if !status.is_client_error() && !status.is_server_error() {
{{^supportMultipleResponses}}
{{#isResponseFile}}
- Ok(local_var_resp)
+ Ok(resp)
{{/isResponseFile}}
{{^isResponseFile}}
{{^returnType}}
Ok(())
{{/returnType}}
{{#returnType}}
- let local_var_content = local_var_resp.text(){{#supportAsync}}.await{{/supportAsync}}?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ let content = resp.text(){{#supportAsync}}.await{{/supportAsync}}?;
+ serde_json::from_str(&content).map_err(Error::from)
{{/returnType}}
{{/isResponseFile}}
{{/supportMultipleResponses}}
{{#supportMultipleResponses}}
{{#isResponseFile}}
- Ok(local_var_resp)
+ Ok(resp)
{{/isResponseFile}}
{{^isResponseFile}}
- let local_var_content = local_var_resp.text(){{#supportAsync}}.await{{/supportAsync}}?;
- let local_var_entity: Option<{{{operationIdCamelCase}}}Success> = serde_json::from_str(&local_var_content).ok();
- let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Ok(local_var_result)
+ let content = resp.text(){{#supportAsync}}.await{{/supportAsync}}?;
+ let entity: Option<{{{operationIdCamelCase}}}Success> = serde_json::from_str(&content).ok();
+ Ok(ResponseContent { status, content, entity })
{{/isResponseFile}}
{{/supportMultipleResponses}}
} else {
- let local_var_content = local_var_resp.text(){{#supportAsync}}.await{{/supportAsync}}?;
- let local_var_entity: Option<{{{operationIdCamelCase}}}Error> = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text(){{#supportAsync}}.await{{/supportAsync}}?;
+ let entity: Option<{{{operationIdCamelCase}}}Error> = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
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 3eef324a7bdb..a59c1528086a 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
@@ -889,6 +889,7 @@ public void updateCodegenPropertyEnumWithExtension() {
@Test
public void updateCodegenPropertyEnumWithPrefixRemoved() {
final DefaultCodegen codegen = new DefaultCodegen();
+ codegen.setRemoveEnumValuePrefix(true);
CodegenProperty enumProperty = codegenProperty(Arrays.asList("animal_dog", "animal_cat"));
codegen.updateCodegenPropertyEnum(enumProperty);
@@ -925,6 +926,7 @@ public void updateCodegenPropertyEnumWithoutPrefixRemoved() {
@Test
public void postProcessModelsEnumWithPrefixRemoved() {
final DefaultCodegen codegen = new DefaultCodegen();
+ codegen.setRemoveEnumValuePrefix(true);
ModelsMap objs = codegenModel(Arrays.asList("animal_dog", "animal_cat"));
CodegenModel cm = objs.getModels().get(0).getModel();
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java
index 5f58dc56c791..8e2a0bb556e1 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java
@@ -955,4 +955,14 @@ public void AnnotationsContainerTest() {
defaultValue = codegen.getTypeDeclaration(schema);
Assert.assertEquals(defaultValue, "List<@Max(10)Integer>");
}
+
+ @Test
+ public void removeAnnotationsTest() {
+ Assert.assertEquals(codegen.removeAnnotations("@Min(0) @Max(10)Integer"), "Integer");
+ Assert.assertEquals(codegen.removeAnnotations("@Pattern(regexp = \"^[a-z]$\")String"), "String");
+ Assert.assertEquals(codegen.removeAnnotations("List<@Min(0) @Max(10)Integer>"), "List");
+ Assert.assertEquals(codegen.removeAnnotations("List<@Pattern(regexp = \"^[a-z]$\")String>"), "List");
+ Assert.assertEquals(codegen.removeAnnotations("List<@Valid Pet>"), "List");
+ }
+
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java
index 91c36f642936..d9d3157d8be2 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaModelTest.java
@@ -274,10 +274,10 @@ public void restrictedCharactersPropertiesTest() {
final CodegenProperty property = cm.vars.get(0);
Assert.assertEquals(property.baseName, "@Some:restricted%characters#to!handle+");
- Assert.assertEquals(property.getter, "getAtSomeColonRestrictedPercentCharactersHashToExclamationHandlePlus");
- Assert.assertEquals(property.setter, "setAtSomeColonRestrictedPercentCharactersHashToExclamationHandlePlus");
+ Assert.assertEquals(property.getter, "getAtSomeRestrictedPercentCharactersHashToExclamationHandlePlus");
+ Assert.assertEquals(property.setter, "setAtSomeRestrictedPercentCharactersHashToExclamationHandlePlus");
Assert.assertEquals(property.dataType, "Boolean");
- Assert.assertEquals(property.name, "atSomeColonRestrictedPercentCharactersHashToExclamationHandlePlus");
+ Assert.assertEquals(property.name, "atSomeRestrictedPercentCharactersHashToExclamationHandlePlus");
Assert.assertNull(property.defaultValue);
Assert.assertEquals(property.baseType, "Boolean");
Assert.assertFalse(property.required);
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAssert.java
index d75727c8bc89..2ae08ad55064 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAssert.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/PropertyAssert.java
@@ -30,4 +30,18 @@ public PropertyAssert withType(final String expectedType) {
public PropertyAnnotationsAssert assertPropertyAnnotations() {
return new PropertyAnnotationsAssert(this, actual.getAnnotations());
}
+
+ public PropertyAnnotationsAssert doesNotHaveAnnotation(String annotationName) {
+ return new PropertyAnnotationsAssert(
+ this,
+ actual.getAnnotations()
+ ).doesNotContainWithName(annotationName);
+ }
+
+ public PropertyAnnotationsAssert hasAnnotation(String annotationName) {
+ return new PropertyAnnotationsAssert(
+ this,
+ actual.getAnnotations()
+ ).containsWithName(annotationName);
+ }
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
index f2d7bd627458..82b92f0082e7 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
@@ -4893,14 +4893,14 @@ public void testCollectionTypesWithDefaults_issue_18102() throws IOException {
.collect(Collectors.toMap(File::getName, Function.identity()));
JavaFileAssert.assertThat(files.get("PetDto.java"))
- .fileContains("private List<@Valid TagDto> tags")
+ .fileContains("private @Nullable List<@Valid TagDto> tags")
.fileContains("private List<@Valid TagDto> tagsDefaultList = new ArrayList<>()")
- .fileContains("private Set<@Valid TagDto> tagsUnique")
+ .fileContains("private @Nullable Set<@Valid TagDto> tagsUnique")
.fileContains("private Set<@Valid TagDto> tagsDefaultSet = new LinkedHashSet<>();")
- .fileContains("private List stringList")
+ .fileContains("private @Nullable List stringList")
.fileContains("private List stringDefaultList = new ArrayList<>(Arrays.asList(\"A\", \"B\"));")
.fileContains("private List stringEmptyDefaultList = new ArrayList<>();")
- .fileContains("Set stringSet")
+ .fileContains("@Nullable Set stringSet")
.fileContains("private Set stringDefaultSet = new LinkedHashSet<>(Arrays.asList(\"A\", \"B\"));")
.fileContains("private Set stringEmptyDefaultSet = new LinkedHashSet<>();")
.fileDoesNotContain("private List<@Valid TagDto> tags = new ArrayList<>()")
@@ -5099,4 +5099,156 @@ public void testEnumUnknownDefaultCaseDeserializationNotSet_issue13241() throws
.assertMethod("build")
.doesNotHaveAnnotation("Deprecated");
}
+
+ @Test
+ public void shouldAnnotateNonRequiredFieldsAsNullable() throws IOException {
+ SpringCodegen codegen = new SpringCodegen();
+ codegen.setLibrary(SPRING_BOOT);
+ codegen.setGenerateConstructorWithAllArgs(true);
+
+ Map files = generateFiles(codegen, "src/test/resources/3_0/nullable-annotation.yaml");
+ var file = files.get("Item.java");
+
+ JavaFileAssert.assertThat(file)
+ .assertProperty("mandatoryName")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalDescription")
+ .hasAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalOneWithDefault")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("nullableStr")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("mandatoryContainer")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalContainer")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalContainerWithDefault")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("nullableContainer")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .fileContains(
+ "public Item(" +
+ "String mandatoryName," +
+ " @Nullable String optionalDescription," +
+ " String optionalOneWithDefault," +
+ " String nullableStr," +
+ " List mandatoryContainer," +
+ " List optionalContainer," +
+ " List optionalContainerWithDefault," +
+ " List nullableContainer)"
+ );
+ }
+
+ @Test
+ public void shouldAnnotateNonRequiredFieldsAsNullableWhenSetContainerDefaultToNull() throws IOException {
+ SpringCodegen codegen = new SpringCodegen();
+ codegen.setLibrary(SPRING_BOOT);
+ codegen.setGenerateConstructorWithAllArgs(true);
+ codegen.setContainerDefaultToNull(true);
+
+ Map files = generateFiles(codegen, "src/test/resources/3_0/nullable-annotation.yaml");
+ var file = files.get("Item.java");
+
+ JavaFileAssert.assertThat(file)
+ .assertProperty("mandatoryContainer")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalContainer")
+ .hasAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalContainerWithDefault")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("nullableContainer")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .fileContains(
+ ", List mandatoryContainer," +
+ " @Nullable List optionalContainer," +
+ " List optionalContainerWithDefault," +
+ " List nullableContainer)"
+ );
+ }
+
+ @Test
+ public void shouldNotAnnotateNonRequiredFieldsAsNullableWhileUseOptional() throws IOException {
+ SpringCodegen codegen = new SpringCodegen();
+ codegen.setLibrary(SPRING_BOOT);
+ codegen.setGenerateConstructorWithAllArgs(true);
+ codegen.setUseOptional(true);
+
+ Map files = generateFiles(codegen, "src/test/resources/3_0/nullable-annotation.yaml");
+ var file = files.get("Item.java");
+
+ JavaFileAssert.assertThat(file)
+ .assertProperty("mandatoryName")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalDescription")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalOneWithDefault")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("nullableStr")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .fileContains(
+ "public Item(String mandatoryName, String optionalDescription," +
+ " String optionalOneWithDefault, String nullableStr"
+ );
+ }
+
+ @Test
+ public void shouldAnnotateNonRequiredFieldsAsNullableWhileNotUsingOpenApiNullableAndContainerDefaultToNullSet() throws IOException {
+ SpringCodegen codegen = new SpringCodegen();
+ codegen.setLibrary(SPRING_BOOT);
+ codegen.setGenerateConstructorWithAllArgs(true);
+ codegen.setOpenApiNullable(false);
+ codegen.setContainerDefaultToNull(true);
+
+ Map files = generateFiles(codegen, "src/test/resources/3_0/nullable-annotation.yaml");
+ var file = files.get("Item.java");
+
+ JavaFileAssert.assertThat(file)
+ .assertProperty("mandatoryName")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalDescription")
+ .hasAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalOneWithDefault")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("nullableStr")
+ .hasAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("mandatoryContainer")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalContainer")
+ .hasAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("optionalContainerWithDefault")
+ .doesNotHaveAnnotation("Nullable");
+ JavaFileAssert.assertThat(file)
+ .assertProperty("nullableContainer")
+ .hasAnnotation("Nullable");
+
+ JavaFileAssert.assertThat(file)
+ .fileContains(
+ " List mandatoryContainer," +
+ " @Nullable List optionalContainer," +
+ " List optionalContainerWithDefault," +
+ " @Nullable List nullableContainer)"
+ );
+ }
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java
index f579e5933448..8804e7561767 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java
@@ -911,4 +911,230 @@ public void generateSerializableModel() throws Exception {
"private const val serialVersionUID: kotlin.Long = 1"
);
}
+
+ @Test
+ public void reactiveWithoutFlow() throws Exception {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen();
+ codegen.setOutputDir(output.getAbsolutePath());
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.REACTIVE, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_FLOW_FOR_ARRAY_RETURN_TYPE, false);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_TAGS, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.SERVICE_IMPLEMENTATION, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.DELEGATE_PATTERN, true);
+
+ List files = new DefaultGenerator()
+ .opts(
+ new ClientOptInput()
+ .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue16130-add-useFlowForArrayReturnType-param.yaml"))
+ .config(codegen)
+ )
+ .generate();
+
+ Assertions.assertThat(files).contains(
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiService.kt")
+ );
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "Flow");
+ }
+
+ @Test
+ public void reactiveWithFlow() throws Exception {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen();
+ codegen.setOutputDir(output.getAbsolutePath());
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.REACTIVE, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_FLOW_FOR_ARRAY_RETURN_TYPE, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_TAGS, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.SERVICE_IMPLEMENTATION, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.DELEGATE_PATTERN, true);
+
+ List files = new DefaultGenerator()
+ .opts(
+ new ClientOptInput()
+ .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue16130-add-useFlowForArrayReturnType-param.yaml"))
+ .config(codegen)
+ )
+ .generate();
+
+ Assertions.assertThat(files).contains(
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiService.kt")
+ );
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ "List");
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "List");
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "Flow");
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "List");
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "Flow");
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "List");
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "Flow");
+ }
+
+ @Test
+ public void reactiveWithDefaultValueFlow() throws Exception {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen();
+ codegen.setOutputDir(output.getAbsolutePath());
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.REACTIVE, true);
+ // should use default 'true' instead
+ // codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_FLOW_FOR_ARRAY_RETURN_TYPE, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_TAGS, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.SERVICE_IMPLEMENTATION, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.DELEGATE_PATTERN, true);
+
+ List files = new DefaultGenerator()
+ .opts(
+ new ClientOptInput()
+ .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue16130-add-useFlowForArrayReturnType-param.yaml"))
+ .config(codegen)
+ )
+ .generate();
+
+ Assertions.assertThat(files).contains(
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiService.kt")
+ );
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ "List");
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "List");
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "Flow");
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "List");
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "Flow");
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "List");
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "Flow");
+ }
+
+ @Test
+ public void nonReactiveWithoutFlow() throws Exception {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen();
+ codegen.setOutputDir(output.getAbsolutePath());
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.REACTIVE, false);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_FLOW_FOR_ARRAY_RETURN_TYPE, false);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_TAGS, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.SERVICE_IMPLEMENTATION, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.DELEGATE_PATTERN, true);
+
+ List files = new DefaultGenerator()
+ .opts(
+ new ClientOptInput()
+ .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue16130-add-useFlowForArrayReturnType-param.yaml"))
+ .config(codegen)
+ )
+ .generate();
+
+ Assertions.assertThat(files).contains(
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiService.kt")
+ );
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "Flow");
+ }
+
+ @Test
+ public void nonReactiveWithFlow() throws Exception {
+ File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
+ KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen();
+ codegen.setOutputDir(output.getAbsolutePath());
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.REACTIVE, false);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_FLOW_FOR_ARRAY_RETURN_TYPE, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.USE_TAGS, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.SERVICE_IMPLEMENTATION, true);
+ codegen.additionalProperties().put(KotlinSpringServerCodegen.DELEGATE_PATTERN, true);
+
+ List files = new DefaultGenerator()
+ .opts(
+ new ClientOptInput()
+ .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/issue16130-add-useFlowForArrayReturnType-param.yaml"))
+ .config(codegen)
+ )
+ .generate();
+
+ Assertions.assertThat(files).contains(
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ new File(output, "src/main/kotlin/org/openapitools/api/TestV1ApiService.kt")
+ );
+
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiController.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1Api.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiDelegate.kt"),
+ "Flow");
+
+ assertFileContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "List");
+ assertFileNotContains(Paths.get(output + "/src/main/kotlin/org/openapitools/api/TestV1ApiService.kt"),
+ "Flow");
+ }
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java
index ac0560194f60..739d7277c818 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java
@@ -133,6 +133,7 @@ public void toEnumVarName() {
Assert.assertEquals(codegen.toEnumVarName("valid_var", "string"), "ValidVar");
Assert.assertEquals(codegen.toEnumVarName("-valid_var+", "string"), "ValidVar");
Assert.assertEquals(codegen.toEnumVarName("30valid_+var", "string"), "_30validVar");
+ Assert.assertEquals(codegen.toEnumVarName("VALID:var", "string"), "ValidVar");
codegen = new TypeScriptFetchClientCodegen();
codegen.additionalProperties().put(CodegenConstants.ENUM_PROPERTY_NAMING, "original");
@@ -142,6 +143,7 @@ public void toEnumVarName() {
Assert.assertEquals(codegen.toEnumVarName("valid_var", "string"), "valid_var");
Assert.assertEquals(codegen.toEnumVarName("-valid_var+", "string"), "valid_var");
Assert.assertEquals(codegen.toEnumVarName("30valid_+var", "string"), "_30valid_var");
+ Assert.assertEquals(codegen.toEnumVarName("VALID:var", "string"), "VALID_var");
codegen = new TypeScriptFetchClientCodegen();
codegen.additionalProperties().put(CodegenConstants.ENUM_PROPERTY_NAMING, "UPPERCASE");
@@ -153,7 +155,7 @@ public void toEnumVarName() {
Assert.assertEquals(codegen.toEnumVarName("-valid_+var", "string"), "MINUS_VALID_PLUS_VAR");
Assert.assertEquals(codegen.toEnumVarName("-valid_var+", "string"), "MINUS_VALID_VAR_PLUS");
Assert.assertEquals(codegen.toEnumVarName("30valid_+var", "string"), "_30VALID_PLUS_VAR");
-
+ Assert.assertEquals(codegen.toEnumVarName("VALID:var", "string"), "VALID_VAR");
}
@Test
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java
index 05a3cb48d549..3405a3003623 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java
@@ -497,9 +497,22 @@ public void isNullTypeSchemaTest() {
schema = openAPI.getComponents().getSchemas().get("AnyOfTest");
assertFalse(ModelUtils.isNullTypeSchema(openAPI, schema));
+ // first element (getAnyOf().get(0)) is a string. no need to test
assertTrue(ModelUtils.isNullTypeSchema(openAPI, (Schema) schema.getAnyOf().get(1)));
assertTrue(ModelUtils.isNullTypeSchema(openAPI, (Schema) schema.getAnyOf().get(2)));
assertTrue(ModelUtils.isNullTypeSchema(openAPI, (Schema) schema.getAnyOf().get(3)));
+
+ schema = openAPI.getComponents().getSchemas().get("OneOfRef");
+ assertFalse(ModelUtils.isNullTypeSchema(openAPI, schema));
+ assertFalse(ModelUtils.isNullTypeSchema(openAPI, (Schema) schema.getOneOf().get(0)));
+
+ schema = openAPI.getComponents().getSchemas().get("OneOfMultiRef");
+ assertFalse(ModelUtils.isNullTypeSchema(openAPI, schema));
+ assertFalse(ModelUtils.isNullTypeSchema(openAPI, (Schema) schema.getOneOf().get(0)));
+ assertFalse(ModelUtils.isNullTypeSchema(openAPI, (Schema) schema.getOneOf().get(1)));
+
+ schema = openAPI.getComponents().getSchemas().get("JustDescription");
+ assertFalse(ModelUtils.isNullTypeSchema(openAPI, schema));
}
@Test
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 0e249cae5d9e..7a7c158efb79 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
@@ -849,11 +849,37 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
+ /fake/collection/test:
+ post:
+ summary: POST a test batch
+ operationId: fakePostTest
+ tags:
+ - fake
+ requestBody:
+ $ref: '#/components/requestBodies/TestBody'
+ responses:
+ '200':
+ $ref: '#/components/responses/SuccessfulOp'
externalDocs:
description: Find out more about Swagger
url: 'http://swagger.io'
components:
+ responses:
+ SuccessfulOp:
+ description: Successful Operation
+ content:
+ application/json:
+ schema:
+ type: bool
requestBodies:
+ TestBody:
+ description: Test body
+ required: true
+ content:
+ text/plain:
+ schema:
+ type: string
+ format: byte
UserArray:
content:
application/json:
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 fa56ab5043cf..3d6fb0e9be22 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
@@ -2617,10 +2617,6 @@ components:
minItems: 1
items:
$ref: '#/components/schemas/Scalar'
- AllOfRefToString:
- allOf:
- - $ref: '#/components/schemas/OuterString'
- description: testing allOf with a ref to string
NewPet:
type: object
required:
@@ -2631,12 +2627,6 @@ components:
type: integer
format: int64
x-is-unique: true
- category_ref_to_inline_allof_string:
- $ref: '#/components/schemas/AllOfRefToString'
- category_inline_allof_string:
- allOf:
- - $ref: '#/components/schemas/OuterString'
- description: testing allOf with a ref to string
category_inline_allof:
allOf:
- type: object
diff --git a/modules/openapi-generator/src/test/resources/3_0/kotlin/issue16130-add-useFlowForArrayReturnType-param.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/issue16130-add-useFlowForArrayReturnType-param.yaml
new file mode 100644
index 000000000000..4ec1c61f7f4e
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/issue16130-add-useFlowForArrayReturnType-param.yaml
@@ -0,0 +1,20 @@
+openapi: "3.0.1"
+info:
+ title: test
+ version: "1.0"
+
+paths:
+
+ /api/v1/test:
+ get:
+ tags: [Test v1]
+ operationId: test1
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: string
diff --git a/modules/openapi-generator/src/test/resources/3_0/null_schema_test.yaml b/modules/openapi-generator/src/test/resources/3_0/null_schema_test.yaml
index b7c370080ca4..e403eeef1397 100644
--- a/modules/openapi-generator/src/test/resources/3_0/null_schema_test.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/null_schema_test.yaml
@@ -56,9 +56,9 @@ components:
properties:
dummy:
$ref: '#/components/schemas/IntegerRef'
- number:
+ string_ref:
anyOf:
- - $ref: '#/components/schemas/Number'
+ - $ref: '#/components/schemas/StringRef'
AnyOfStringArrayOfString:
anyOf:
- type: string
@@ -85,6 +85,8 @@ components:
- $ref: '#/components/schemas/IntegerRef'
IntegerRef:
type: integer
+ StringRef:
+ type: string
OneOfAnyType:
oneOf:
- type: object
@@ -93,4 +95,13 @@ components:
- type: string
- type: integer
- type: array
- items: {}
\ No newline at end of file
+ items: {}
+ OneOfRef:
+ oneOf:
+ - $ref: '#/components/schemas/IntegerRef'
+ OneOfMultiRef:
+ oneOf:
+ - $ref: '#/components/schemas/IntegerRef'
+ - $ref: '#/components/schemas/StringRef'
+ JustDescription:
+ description: A schema with just description
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/resources/3_0/nullable-annotation.yaml b/modules/openapi-generator/src/test/resources/3_0/nullable-annotation.yaml
new file mode 100644
index 000000000000..1de632345f0e
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/3_0/nullable-annotation.yaml
@@ -0,0 +1,37 @@
+openapi: 3.0.0
+components:
+ schemas:
+ Item:
+ type: object
+ required:
+ - mandatoryName
+ - mandatoryContainer
+ properties:
+ mandatoryName:
+ type: string
+ optionalDescription:
+ type: string
+ optionalOneWithDefault:
+ type: string
+ default: "someDefaultValue"
+ nullableStr:
+ type: string
+ nullable: true
+ mandatoryContainer:
+ type: array
+ items:
+ type: string
+ optionalContainer:
+ type: array
+ items:
+ type: string
+ optionalContainerWithDefault:
+ type: array
+ items:
+ type: string
+ default: [ ]
+ nullableContainer:
+ type: array
+ items:
+ type: string
+ nullable: true
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 c647aa74f4d8..59d623ec8965 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
@@ -1950,6 +1950,13 @@ components:
properties:
_class:
type: string
+ Hunting__Dog:
+ allOf:
+ - $ref: '#/components/schemas/Creature'
+ - type: object
+ properties:
+ isTrained:
+ type: boolean
Dog:
allOf:
- $ref: '#/components/schemas/Animal'
diff --git a/modules/openapi-generator/src/test/resources/3_0/rust-axum/rust-axum-oneof.yaml b/modules/openapi-generator/src/test/resources/3_0/rust-axum/rust-axum-oneof.yaml
new file mode 100644
index 000000000000..f66fd7ef6d95
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/3_0/rust-axum/rust-axum-oneof.yaml
@@ -0,0 +1,86 @@
+openapi: "3.0.4"
+info:
+ title: "test"
+ version: "0.0.1"
+paths:
+ "/":
+ post:
+ operationId: foo
+ requestBody:
+ required: true
+ content:
+ "application/json":
+ schema:
+ "$ref": "#/components/schemas/Message"
+ responses:
+ "200":
+ description: Re-serialize and echo the request data
+ content:
+ "application/json":
+ schema:
+ "$ref": "#/components/schemas/Message"
+components:
+ schemas:
+ Message:
+ type: object
+ additionalProperties: false
+ discriminator:
+ propertyName: op
+ oneOf:
+ - "$ref": "#/components/schemas/Hello"
+ - "$ref": "#/components/schemas/Greeting"
+ - "$ref": "#/components/schemas/Goodbye"
+ title: Message
+ Hello:
+ type: object
+ additionalProperties: false
+ title: Hello
+ properties:
+ op:
+ type: string
+ enum:
+ - Hello
+ default: Hello
+ d:
+ type: object
+ properties:
+ welcome_message:
+ type: string
+ required:
+ - welcome_message
+ required:
+ - op
+ - d
+ Greeting:
+ type: object
+ additionalProperties: false
+ title: Greeting
+ properties:
+ d:
+ type: object
+ properties:
+ greet_message:
+ type: string
+ required:
+ - greet_message
+ required:
+ - d
+ Goodbye:
+ type: object
+ additionalProperties: false
+ title: Goodbye
+ properties:
+ op:
+ type: string
+ enum:
+ - Goodbye
+ d:
+ type: object
+ properties:
+ goodbye_message:
+ type: string
+ required:
+ - goodbye_message
+ required:
+ - op
+ - d
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
index e193a3bc5902..211f9986dca1 100644
--- a/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
@@ -608,6 +608,11 @@ paths:
description: To test parameter names in upper case
schema:
type: string
+ - name: content
+ in: query
+ description: To test escaping of parameters in rust code works
+ schema:
+ type: string
responses:
'200':
description: successful operation
diff --git a/samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Client/ApiClient.cs
index 8fab398a3f83..02d4488153a5 100644
--- a/samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Client/ApiClient.cs
+++ b/samples/client/echo_api/csharp/restsharp/net8/EchoApi/src/Org.OpenAPITools/Client/ApiClient.cs
@@ -317,7 +317,7 @@ private RestRequest NewRequest(
{
foreach (var value in headerParam.Value)
{
- request.AddHeader(headerParam.Key, value);
+ request.AddOrUpdateHeader(headerParam.Key, value);
}
}
}
diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php
index f0e76da188be..674bdd46d7eb 100644
--- a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php
+++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php
@@ -424,7 +424,7 @@ public function testEnumRefStringRequest(
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
- $enum_ref_string_query->value,
+ $enum_ref_string_query?->value,
'enum_ref_string_query', // param base name
'StringEnumRef', // openApiType
'form', // style
diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php
index f0e76da188be..674bdd46d7eb 100644
--- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php
+++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php
@@ -424,7 +424,7 @@ public function testEnumRefStringRequest(
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
- $enum_ref_string_query->value,
+ $enum_ref_string_query?->value,
'enum_ref_string_query', // param base name
'StringEnumRef', // openApiType
'form', // style
diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml
index 0d2e8a39c934..89df0faa8de6 100644
--- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml
+++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml
@@ -12,7 +12,7 @@ include = ["openapi_client/py.typed"]
[tool.poetry.dependencies]
python = "^3.8"
-urllib3 = ">= 1.25.3 < 3.0.0"
+urllib3 = ">= 1.25.3, < 3.0.0"
python-dateutil = ">= 2.8.2"
pydantic = ">= 2"
typing-extensions = ">= 4.7.1"
diff --git a/samples/client/echo_api/python/pyproject.toml b/samples/client/echo_api/python/pyproject.toml
index 0d2e8a39c934..89df0faa8de6 100644
--- a/samples/client/echo_api/python/pyproject.toml
+++ b/samples/client/echo_api/python/pyproject.toml
@@ -12,7 +12,7 @@ include = ["openapi_client/py.typed"]
[tool.poetry.dependencies]
python = "^3.8"
-urllib3 = ">= 1.25.3 < 3.0.0"
+urllib3 = ">= 1.25.3, < 3.0.0"
python-dateutil = ">= 2.8.2"
pydantic = ">= 2"
typing-extensions = ">= 4.7.1"
diff --git a/samples/client/echo_api/r/R/api_client.R b/samples/client/echo_api/r/R/api_client.R
index ab9094f67dab..78edd45d748b 100644
--- a/samples/client/echo_api/r/R/api_client.R
+++ b/samples/client/echo_api/r/R/api_client.R
@@ -389,7 +389,7 @@ ApiClient <- R6::R6Class(
#'
#' @param local_var_resp The API response
#' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is.
- #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne.
+ #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response.
DeserializeResponse = function(local_var_resp, return_type = NULL) {
text <- local_var_resp$response_as_text()
if (is.na(text)) {
@@ -406,8 +406,8 @@ ApiClient <- R6::R6Class(
#' The function will write out data.
#'
#' 1. If binary data is detected it will use `writeBin`
- #' 2. If the raw response is coercable to text, the text will be written to a file
- #' 3. If the raw response is not coercable to text, the raw response will be written
+ #' 2. If the raw response is coercible to text, the text will be written to a file
+ #' 3. If the raw response is not coercible to text, the raw response will be written
#'
#' @param local_var_resp The API response
#' @param file The name of the data file to save the result
diff --git a/samples/client/others/c/bearerAuth/CMakeLists.txt b/samples/client/others/c/bearerAuth/CMakeLists.txt
index e359d41c7789..30076da6c6eb 100644
--- a/samples/client/others/c/bearerAuth/CMakeLists.txt
+++ b/samples/client/others/c/bearerAuth/CMakeLists.txt
@@ -6,25 +6,21 @@ cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
-set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration -Werror=missing-declarations -Werror=int-conversion")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=missing-declarations")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
find_package(OpenSSL)
if (OPENSSL_FOUND)
- message (STATUS "OPENSSL found")
-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL")
if(CMAKE_VERSION VERSION_LESS 3.4)
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIRS})
link_directories(${OPENSSL_LIBRARIES})
endif()
-
- message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
-else()
- message (STATUS "OpenSSL Not found.")
endif()
set(pkgName "sample_api")
@@ -42,8 +38,6 @@ else()
if(CURL_FOUND)
include_directories(${CURL_INCLUDE_DIR})
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
- else(CURL_FOUND)
- message(FATAL_ERROR "Could not find the CURL library and development files.")
endif()
endif()
diff --git a/samples/client/others/c/bearerAuth/api/DefaultAPI.c b/samples/client/others/c/bearerAuth/api/DefaultAPI.c
index 41f6047cb62f..b3e5c7709bf3 100644
--- a/samples/client/others/c/bearerAuth/api/DefaultAPI.c
+++ b/samples/client/others/c/bearerAuth/api/DefaultAPI.c
@@ -26,9 +26,7 @@ DefaultAPI_privateGet(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/private")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/private");
+ char *localVarPath = strdup("/private");
@@ -98,9 +96,7 @@ DefaultAPI_publicGet(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/public")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/public");
+ char *localVarPath = strdup("/public");
@@ -170,9 +166,7 @@ DefaultAPI_usersGet(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/users")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/users");
+ char *localVarPath = strdup("/users");
diff --git a/samples/client/others/c/bearerAuth/src/apiClient.c b/samples/client/others/c/bearerAuth/src/apiClient.c
index b9f52e2e1b7f..b67055c2abae 100644
--- a/samples/client/others/c/bearerAuth/src/apiClient.c
+++ b/samples/client/others/c/bearerAuth/src/apiClient.c
@@ -89,10 +89,11 @@ void sslConfig_free(sslConfig_t *sslConfig) {
free(sslConfig);
}
-static void replaceSpaceWithPlus(char *stringToProcess) {
- for(int i = 0; i < strlen(stringToProcess); i++) {
- if(stringToProcess[i] == ' ') {
- stringToProcess[i] = '+';
+static void replaceSpaceWithPlus(char *str) {
+ if (str) {
+ for (; *str; str++) {
+ if (*str == ' ')
+ *str = '+';
}
}
}
@@ -202,38 +203,26 @@ void apiClient_invoke(apiClient_t *apiClient,
if(headerType != NULL) {
list_ForEach(listEntry, headerType) {
- if(strstr((char *) listEntry->data,
- "xml") == NULL)
+ if(strstr(listEntry->data, "xml") == NULL)
{
- buffHeader = malloc(strlen(
- "Accept: ") +
- strlen((char *)
- listEntry->
- data) + 1);
- sprintf(buffHeader, "%s%s", "Accept: ",
+ buffHeader = malloc(sizeof("Accept: ") +
+ strlen(listEntry->data));
+ sprintf(buffHeader, "Accept: %s",
(char *) listEntry->data);
- headers = curl_slist_append(headers,
- buffHeader);
+ headers = curl_slist_append(headers, buffHeader);
free(buffHeader);
}
}
}
if(contentType != NULL) {
list_ForEach(listEntry, contentType) {
- if(strstr((char *) listEntry->data,
- "xml") == NULL)
+ if(strstr(listEntry->data, "xml") == NULL)
{
- buffContent =
- malloc(strlen(
- "Content-Type: ") + strlen(
- (char *)
- listEntry->data) +
- 1);
- sprintf(buffContent, "%s%s",
- "Content-Type: ",
+ buffContent = malloc(sizeof("Content-Type: ") +
+ strlen(listEntry->data));
+ sprintf(buffContent, "Content-Type: %s",
(char *) listEntry->data);
- headers = curl_slist_append(headers,
- buffContent);
+ headers = curl_slist_append(headers, buffContent);
free(buffContent);
buffContent = NULL;
}
@@ -438,8 +427,8 @@ void apiClient_invoke(apiClient_t *apiClient,
size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) {
size_t size_this_time = nmemb * size;
- apiClient_t *apiClient = (apiClient_t *)userp;
- apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
+ apiClient_t *apiClient = userp;
+ apiClient->dataReceived = realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
memcpy((char *)apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time);
apiClient->dataReceivedLen += size_this_time;
((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1
diff --git a/samples/client/others/c/bearerAuth/src/list.c b/samples/client/others/c/bearerAuth/src/list.c
index 786812158a24..7053ff122dfc 100644
--- a/samples/client/others/c/bearerAuth/src/list.c
+++ b/samples/client/others/c/bearerAuth/src/list.c
@@ -20,7 +20,7 @@ void listEntry_free(listEntry_t *listEntry, void *additionalData) {
}
void listEntry_printAsInt(listEntry_t *listEntry, void *additionalData) {
- printf("%i\n", *((int *) (listEntry->data)));
+ printf("%i\n", *(int *)listEntry->data);
}
list_t *list_createList() {
@@ -176,8 +176,8 @@ char* findStrInStrList(list_t *strList, const char *str)
listEntry_t* listEntry = NULL;
list_ForEach(listEntry, strList) {
- if (strstr((char*)listEntry->data, str) != NULL) {
- return (char*)listEntry->data;
+ if (strstr(listEntry->data, str) != NULL) {
+ return listEntry->data;
}
}
@@ -197,4 +197,4 @@ void clear_and_free_string_list(list_t *list)
list_item = NULL;
}
list_freeList(list);
-}
\ No newline at end of file
+}
diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs
index c8d1224a3477..599c9d343945 100644
--- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs
+++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Client/ApiClient.cs
@@ -317,7 +317,7 @@ private RestRequest NewRequest(
{
foreach (var value in headerParam.Value)
{
- request.AddHeader(headerParam.Key, value);
+ request.AddOrUpdateHeader(headerParam.Key, value);
}
}
}
diff --git a/samples/client/others/rust/reqwest-regression-16119/src/apis/default_api.rs b/samples/client/others/rust/reqwest-regression-16119/src/apis/default_api.rs
index bea5f638a6e7..382dc5a2ce0d 100644
--- a/samples/client/others/rust/reqwest-regression-16119/src/apis/default_api.rs
+++ b/samples/client/others/rust/reqwest-regression-16119/src/apis/default_api.rs
@@ -24,30 +24,26 @@ pub enum ReproError {
pub fn repro(configuration: &configuration::Configuration, ) -> Result> {
- let local_var_configuration = configuration;
- let local_var_client = &local_var_configuration.client;
+ let uri_str = format!("{}/repro", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
- let local_var_uri_str = format!("{}/repro", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- let local_var_content = local_var_resp.text()?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ if !status.is_client_error() && !status.is_server_error() {
+ let content = resp.text()?;
+ serde_json::from_str(&content).map_err(Error::from)
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
diff --git a/samples/client/others/rust/reqwest/api-with-ref-param/src/apis/default_api.rs b/samples/client/others/rust/reqwest/api-with-ref-param/src/apis/default_api.rs
index 179f9ea5c141..562421a76248 100644
--- a/samples/client/others/rust/reqwest/api-with-ref-param/src/apis/default_api.rs
+++ b/samples/client/others/rust/reqwest/api-with-ref-param/src/apis/default_api.rs
@@ -24,29 +24,27 @@ pub enum DemoColorGetError {
pub async fn demo_color_get(configuration: &configuration::Configuration, color: models::Color) -> Result<(), Error> {
- let local_var_configuration = configuration;
+ // add a prefix to parameters to efficiently prevent name collisions
+ let p_color = color;
- let local_var_client = &local_var_configuration.client;
+ let uri_str = format!("{}/demo/{color}", configuration.base_path, color=p_color.to_string());
+ let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
- let local_var_uri_str = format!("{}/demo/{color}", local_var_configuration.base_path, color=color.to_string());
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req).await?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
+ if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
- let local_var_content = local_var_resp.text().await?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text().await?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
diff --git a/samples/client/others/rust/reqwest/composed-oneof/src/apis/default_api.rs b/samples/client/others/rust/reqwest/composed-oneof/src/apis/default_api.rs
index c0def694ddee..593abfd48216 100644
--- a/samples/client/others/rust/reqwest/composed-oneof/src/apis/default_api.rs
+++ b/samples/client/others/rust/reqwest/composed-oneof/src/apis/default_api.rs
@@ -31,58 +31,52 @@ pub enum GetStateError {
pub fn create_state(configuration: &configuration::Configuration, create_state_request: models::CreateStateRequest) -> Result<(), Error> {
- let local_var_configuration = configuration;
+ // add a prefix to parameters to efficiently prevent name collisions
+ let p_create_state_request = create_state_request;
- let local_var_client = &local_var_configuration.client;
+ let uri_str = format!("{}/state", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
- let local_var_uri_str = format!("{}/state", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- local_var_req_builder = local_var_req_builder.json(&create_state_request);
+ req_builder = req_builder.json(&p_create_state_request);
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
+ if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
pub fn get_state(configuration: &configuration::Configuration, ) -> Result> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
- let local_var_uri_str = format!("{}/state", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
+ let uri_str = format!("{}/state", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- let local_var_content = local_var_resp.text()?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ if !status.is_client_error() && !status.is_server_error() {
+ let content = resp.text()?;
+ serde_json::from_str(&content).map_err(Error::from)
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
diff --git a/samples/client/others/rust/reqwest/emptyObject/src/apis/default_api.rs b/samples/client/others/rust/reqwest/emptyObject/src/apis/default_api.rs
index 54b21d9c0766..6b5803fd2423 100644
--- a/samples/client/others/rust/reqwest/emptyObject/src/apis/default_api.rs
+++ b/samples/client/others/rust/reqwest/emptyObject/src/apis/default_api.rs
@@ -24,30 +24,26 @@ pub enum EndpointGetError {
pub fn endpoint_get(configuration: &configuration::Configuration, ) -> Result> {
- let local_var_configuration = configuration;
- let local_var_client = &local_var_configuration.client;
+ let uri_str = format!("{}/endpoint", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
- let local_var_uri_str = format!("{}/endpoint", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- let local_var_content = local_var_resp.text()?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ if !status.is_client_error() && !status.is_server_error() {
+ let content = resp.text()?;
+ serde_json::from_str(&content).map_err(Error::from)
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
diff --git a/samples/client/others/rust/reqwest/oneOf-array-map/src/apis/default_api.rs b/samples/client/others/rust/reqwest/oneOf-array-map/src/apis/default_api.rs
index 9fc93a60045b..d7fbf92af0ad 100644
--- a/samples/client/others/rust/reqwest/oneOf-array-map/src/apis/default_api.rs
+++ b/samples/client/others/rust/reqwest/oneOf-array-map/src/apis/default_api.rs
@@ -31,58 +31,52 @@ pub enum TestError {
pub fn root_get(configuration: &configuration::Configuration, ) -> Result> {
- let local_var_configuration = configuration;
- let local_var_client = &local_var_configuration.client;
+ let uri_str = format!("{}/", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
- let local_var_uri_str = format!("{}/", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- let local_var_content = local_var_resp.text()?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ if !status.is_client_error() && !status.is_server_error() {
+ let content = resp.text()?;
+ serde_json::from_str(&content).map_err(Error::from)
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
pub fn test(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
+ // add a prefix to parameters to efficiently prevent name collisions
+ let p_body = body;
- let local_var_uri_str = format!("{}/", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
+ let uri_str = format!("{}/", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- local_var_req_builder = local_var_req_builder.json(&body);
+ req_builder = req_builder.json(&p_body);
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
+ if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
diff --git a/samples/client/others/rust/reqwest/oneOf-reuseRef/src/apis/default_api.rs b/samples/client/others/rust/reqwest/oneOf-reuseRef/src/apis/default_api.rs
index 3287c9177b3e..3dceb3f7d040 100644
--- a/samples/client/others/rust/reqwest/oneOf-reuseRef/src/apis/default_api.rs
+++ b/samples/client/others/rust/reqwest/oneOf-reuseRef/src/apis/default_api.rs
@@ -24,30 +24,26 @@ pub enum GetFruitError {
pub fn get_fruit(configuration: &configuration::Configuration, ) -> Result> {
- let local_var_configuration = configuration;
- let local_var_client = &local_var_configuration.client;
+ let uri_str = format!("{}/example", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
- let local_var_uri_str = format!("{}/example", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- let local_var_content = local_var_resp.text()?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ if !status.is_client_error() && !status.is_server_error() {
+ let content = resp.text()?;
+ serde_json::from_str(&content).map_err(Error::from)
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
diff --git a/samples/client/others/rust/reqwest/oneOf/src/apis/bar_api.rs b/samples/client/others/rust/reqwest/oneOf/src/apis/bar_api.rs
index fc6b75d5ebcd..6af94c62e442 100644
--- a/samples/client/others/rust/reqwest/oneOf/src/apis/bar_api.rs
+++ b/samples/client/others/rust/reqwest/oneOf/src/apis/bar_api.rs
@@ -24,31 +24,29 @@ pub enum CreateBarError {
pub fn create_bar(configuration: &configuration::Configuration, bar_create: models::BarCreate) -> Result> {
- let local_var_configuration = configuration;
+ // add a prefix to parameters to efficiently prevent name collisions
+ let p_bar_create = bar_create;
- let local_var_client = &local_var_configuration.client;
+ let uri_str = format!("{}/bar", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
- let local_var_uri_str = format!("{}/bar", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- local_var_req_builder = local_var_req_builder.json(&bar_create);
+ req_builder = req_builder.json(&p_bar_create);
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- let local_var_content = local_var_resp.text()?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ if !status.is_client_error() && !status.is_server_error() {
+ let content = resp.text()?;
+ serde_json::from_str(&content).map_err(Error::from)
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
diff --git a/samples/client/others/rust/reqwest/oneOf/src/apis/foo_api.rs b/samples/client/others/rust/reqwest/oneOf/src/apis/foo_api.rs
index cdcd1feaf2a5..8fefb3f45904 100644
--- a/samples/client/others/rust/reqwest/oneOf/src/apis/foo_api.rs
+++ b/samples/client/others/rust/reqwest/oneOf/src/apis/foo_api.rs
@@ -31,59 +31,53 @@ pub enum GetAllFoosError {
pub fn create_foo(configuration: &configuration::Configuration, foo: Option) -> Result> {
- let local_var_configuration = configuration;
+ // add a prefix to parameters to efficiently prevent name collisions
+ let p_foo = foo;
- let local_var_client = &local_var_configuration.client;
+ let uri_str = format!("{}/foo", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
- let local_var_uri_str = format!("{}/foo", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- local_var_req_builder = local_var_req_builder.json(&foo);
+ req_builder = req_builder.json(&p_foo);
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- let local_var_content = local_var_resp.text()?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ if !status.is_client_error() && !status.is_server_error() {
+ let content = resp.text()?;
+ serde_json::from_str(&content).map_err(Error::from)
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
pub fn get_all_foos(configuration: &configuration::Configuration, ) -> Result, Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
- let local_var_uri_str = format!("{}/foo", local_var_configuration.base_path);
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
+ let uri_str = format!("{}/foo", configuration.base_path);
+ let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req)?;
+ let req = req_builder.build()?;
+ let resp = configuration.client.execute(req)?;
- let local_var_status = local_var_resp.status();
+ let status = resp.status();
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- let local_var_content = local_var_resp.text()?;
- serde_json::from_str(&local_var_content).map_err(Error::from)
+ if !status.is_client_error() && !status.is_server_error() {
+ let content = resp.text()?;
+ serde_json::from_str(&content).map_err(Error::from)
} else {
- let local_var_content = local_var_resp.text()?;
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
+ let content = resp.text()?;
+ let entity: Option = serde_json::from_str(&content).ok();
+ Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
diff --git a/samples/client/petstore/R-httr2-wrapper/R/api_client.R b/samples/client/petstore/R-httr2-wrapper/R/api_client.R
index f89465e25bbc..954f772e3914 100644
--- a/samples/client/petstore/R-httr2-wrapper/R/api_client.R
+++ b/samples/client/petstore/R-httr2-wrapper/R/api_client.R
@@ -439,7 +439,7 @@ ApiClient <- R6::R6Class(
#'
#' @param local_var_resp The API response
#' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is.
- #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne.
+ #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response.
DeserializeResponse = function(local_var_resp, return_type = NULL) {
text <- local_var_resp$response_as_text()
if (is.na(text)) {
@@ -456,8 +456,8 @@ ApiClient <- R6::R6Class(
#' The function will write out data.
#'
#' 1. If binary data is detected it will use `writeBin`
- #' 2. If the raw response is coercable to text, the text will be written to a file
- #' 3. If the raw response is not coercable to text, the raw response will be written
+ #' 2. If the raw response is coercible to text, the text will be written to a file
+ #' 3. If the raw response is not coercible to text, the raw response will be written
#'
#' @param local_var_resp The API response
#' @param file The name of the data file to save the result
diff --git a/samples/client/petstore/R-httr2/R/api_client.R b/samples/client/petstore/R-httr2/R/api_client.R
index f89465e25bbc..954f772e3914 100644
--- a/samples/client/petstore/R-httr2/R/api_client.R
+++ b/samples/client/petstore/R-httr2/R/api_client.R
@@ -439,7 +439,7 @@ ApiClient <- R6::R6Class(
#'
#' @param local_var_resp The API response
#' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is.
- #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne.
+ #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response.
DeserializeResponse = function(local_var_resp, return_type = NULL) {
text <- local_var_resp$response_as_text()
if (is.na(text)) {
@@ -456,8 +456,8 @@ ApiClient <- R6::R6Class(
#' The function will write out data.
#'
#' 1. If binary data is detected it will use `writeBin`
- #' 2. If the raw response is coercable to text, the text will be written to a file
- #' 3. If the raw response is not coercable to text, the raw response will be written
+ #' 2. If the raw response is coercible to text, the text will be written to a file
+ #' 3. If the raw response is not coercible to text, the raw response will be written
#'
#' @param local_var_resp The API response
#' @param file The name of the data file to save the result
diff --git a/samples/client/petstore/R/R/api_client.R b/samples/client/petstore/R/R/api_client.R
index c9e67c317410..561b7fae7f0e 100644
--- a/samples/client/petstore/R/R/api_client.R
+++ b/samples/client/petstore/R/R/api_client.R
@@ -418,7 +418,7 @@ ApiClient <- R6::R6Class(
#'
#' @param local_var_resp The API response
#' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is.
- #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne.
+ #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response.
DeserializeResponse = function(local_var_resp, return_type = NULL) {
text <- local_var_resp$response_as_text()
if (is.na(text)) {
@@ -435,8 +435,8 @@ ApiClient <- R6::R6Class(
#' The function will write out data.
#'
#' 1. If binary data is detected it will use `writeBin`
- #' 2. If the raw response is coercable to text, the text will be written to a file
- #' 3. If the raw response is not coercable to text, the raw response will be written
+ #' 2. If the raw response is coercible to text, the text will be written to a file
+ #' 3. If the raw response is not coercible to text, the raw response will be written
#'
#' @param local_var_resp The API response
#' @param file The name of the data file to save the result
diff --git a/samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt b/samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt
index cd72ab391660..5ad5652ad3a3 100644
--- a/samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt
+++ b/samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt
@@ -6,25 +6,21 @@ cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
-set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration -Werror=missing-declarations -Werror=int-conversion")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=missing-declarations")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
find_package(OpenSSL)
if (OPENSSL_FOUND)
- message (STATUS "OPENSSL found")
-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL")
if(CMAKE_VERSION VERSION_LESS 3.4)
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIRS})
link_directories(${OPENSSL_LIBRARIES})
endif()
-
- message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
-else()
- message (STATUS "OpenSSL Not found.")
endif()
set(pkgName "openapi_petstore")
@@ -42,8 +38,6 @@ else()
if(CURL_FOUND)
include_directories(${CURL_INCLUDE_DIR})
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
- else(CURL_FOUND)
- message(FATAL_ERROR "Could not find the CURL library and development files.")
endif()
endif()
diff --git a/samples/client/petstore/c-useJsonUnformatted/api/PetAPI.c b/samples/client/petstore/c-useJsonUnformatted/api/PetAPI.c
index c0ac1aa49d3b..5002790c018f 100644
--- a/samples/client/petstore/c-useJsonUnformatted/api/PetAPI.c
+++ b/samples/client/petstore/c-useJsonUnformatted/api/PetAPI.c
@@ -67,9 +67,7 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet");
+ char *localVarPath = strdup("/pet");
@@ -139,14 +137,12 @@ PetAPI_deletePet(apiClient_t *apiClient, long petId, char *api_key)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}");
+ char *localVarPath = strdup("/pet/{petId}");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
@@ -232,9 +228,7 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t *status)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/findByStatus")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/findByStatus");
+ char *localVarPath = strdup("/pet/findByStatus");
@@ -325,9 +319,7 @@ PetAPI_findPetsByTags(apiClient_t *apiClient, list_t *tags)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/findByTags")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/findByTags");
+ char *localVarPath = strdup("/pet/findByTags");
@@ -416,9 +408,7 @@ PetAPI_getDaysWithoutIncident(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/daysWithoutIncident")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/daysWithoutIncident");
+ char *localVarPath = strdup("/store/daysWithoutIncident");
@@ -481,14 +471,12 @@ PetAPI_getPetById(apiClient_t *apiClient, long petId)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}");
+ char *localVarPath = strdup("/pet/{petId}");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
@@ -575,9 +563,7 @@ PetAPI_getPicture(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/picture")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/picture");
+ char *localVarPath = strdup("/pet/picture");
@@ -638,14 +624,12 @@ PetAPI_isPetAvailable(apiClient_t *apiClient, long petId)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}/isAvailable")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}/isAvailable");
+ char *localVarPath = strdup("/pet/{petId}/isAvailable");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
@@ -723,9 +707,7 @@ PetAPI_sharePicture(apiClient_t *apiClient, binary_t* picture)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/picture")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/picture");
+ char *localVarPath = strdup("/pet/picture");
@@ -794,9 +776,7 @@ PetAPI_specialtyPet(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/specialty")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/specialty");
+ char *localVarPath = strdup("/pet/specialty");
@@ -865,9 +845,7 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet");
+ char *localVarPath = strdup("/pet");
@@ -945,14 +923,12 @@ PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId, char *name, char *s
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}");
+ char *localVarPath = strdup("/pet/{petId}");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
@@ -1058,14 +1034,12 @@ PetAPI_uploadFile(apiClient_t *apiClient, long petId, char *additionalMetadata,
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}/uploadImage")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}/uploadImage");
+ char *localVarPath = strdup("/pet/{petId}/uploadImage");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
diff --git a/samples/client/petstore/c-useJsonUnformatted/api/StoreAPI.c b/samples/client/petstore/c-useJsonUnformatted/api/StoreAPI.c
index 2e13582de3bd..426f3b0d73b1 100644
--- a/samples/client/petstore/c-useJsonUnformatted/api/StoreAPI.c
+++ b/samples/client/petstore/c-useJsonUnformatted/api/StoreAPI.c
@@ -78,16 +78,14 @@ StoreAPI_deleteOrder(apiClient_t *apiClient, char *orderId)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/order/{orderId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/order/{orderId}");
+ char *localVarPath = strdup("/store/order/{orderId}");
if(!orderId)
goto end;
// Path Params
- long sizeOfPathParams_orderId = strlen(orderId)+3 + strlen("{ orderId }");
+ long sizeOfPathParams_orderId = strlen(orderId)+3 + sizeof("{ orderId }") - 1;
if(orderId == NULL) {
goto end;
}
@@ -152,9 +150,7 @@ StoreAPI_getInventory(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/inventory")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/inventory");
+ char *localVarPath = strdup("/store/inventory");
@@ -225,14 +221,12 @@ StoreAPI_getOrderById(apiClient_t *apiClient, long orderId)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/order/{orderId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/order/{orderId}");
+ char *localVarPath = strdup("/store/order/{orderId}");
// Path Params
- long sizeOfPathParams_orderId = sizeof(orderId)+3 + strlen("{ orderId }");
+ long sizeOfPathParams_orderId = sizeof(orderId)+3 + sizeof("{ orderId }") - 1;
if(orderId == 0){
goto end;
}
@@ -319,9 +313,7 @@ StoreAPI_placeOrder(apiClient_t *apiClient, order_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/order")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/order");
+ char *localVarPath = strdup("/store/order");
@@ -409,9 +401,7 @@ StoreAPI_sendFeedback(apiClient_t *apiClient, char *feedback)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/feedback")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/feedback");
+ char *localVarPath = strdup("/store/feedback");
@@ -477,16 +467,14 @@ StoreAPI_sendRating(apiClient_t *apiClient, openapi_petstore_sendRating_rating_e
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/rating/{rating}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/rating/{rating}");
+ char *localVarPath = strdup("/store/rating/{rating}");
if(!rating)
goto end;
// Path Params
- long sizeOfPathParams_rating = strlen(sendRating_RATING_ToString(rating))+3 + strlen("{ rating }");
+ long sizeOfPathParams_rating = strlen(sendRating_RATING_ToString(rating))+3 + sizeof("{ rating }") - 1;
if(rating == 0) {
goto end;
}
@@ -553,9 +541,7 @@ StoreAPI_sendRecommend(apiClient_t *apiClient, int *recommend)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/recommend")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/recommend");
+ char *localVarPath = strdup("/store/recommend");
diff --git a/samples/client/petstore/c-useJsonUnformatted/api/UserAPI.c b/samples/client/petstore/c-useJsonUnformatted/api/UserAPI.c
index d5af0312d650..3f20e0114cff 100644
--- a/samples/client/petstore/c-useJsonUnformatted/api/UserAPI.c
+++ b/samples/client/petstore/c-useJsonUnformatted/api/UserAPI.c
@@ -26,9 +26,7 @@ UserAPI_createUser(apiClient_t *apiClient, user_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user");
+ char *localVarPath = strdup("/user");
@@ -96,9 +94,7 @@ UserAPI_createUsersWithArrayInput(apiClient_t *apiClient, list_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/createWithArray")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/createWithArray");
+ char *localVarPath = strdup("/user/createWithArray");
@@ -194,9 +190,7 @@ UserAPI_createUsersWithListInput(apiClient_t *apiClient, list_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/createWithList")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/createWithList");
+ char *localVarPath = strdup("/user/createWithList");
@@ -294,16 +288,14 @@ UserAPI_deleteUser(apiClient_t *apiClient, char *username)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/{username}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/{username}");
+ char *localVarPath = strdup("/user/{username}");
if(!username)
goto end;
// Path Params
- long sizeOfPathParams_username = strlen(username)+3 + strlen("{ username }");
+ long sizeOfPathParams_username = strlen(username)+3 + sizeof("{ username }") - 1;
if(username == NULL) {
goto end;
}
@@ -366,16 +358,14 @@ UserAPI_getUserByName(apiClient_t *apiClient, char *username)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/{username}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/{username}");
+ char *localVarPath = strdup("/user/{username}");
if(!username)
goto end;
// Path Params
- long sizeOfPathParams_username = strlen(username)+3 + strlen("{ username }");
+ long sizeOfPathParams_username = strlen(username)+3 + sizeof("{ username }") - 1;
if(username == NULL) {
goto end;
}
@@ -458,9 +448,7 @@ UserAPI_loginUser(apiClient_t *apiClient, char *username, char *password)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/login")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/login");
+ char *localVarPath = strdup("/user/login");
@@ -574,9 +562,7 @@ UserAPI_logoutUser(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/logout")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/logout");
+ char *localVarPath = strdup("/user/logout");
@@ -631,9 +617,7 @@ UserAPI_testIntAndBool(apiClient_t *apiClient, int *keep, int *keepDay)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/testIntAndBool")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/testIntAndBool");
+ char *localVarPath = strdup("/user/testIntAndBool");
@@ -714,16 +698,14 @@ UserAPI_updateUser(apiClient_t *apiClient, char *username, user_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/{username}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/{username}");
+ char *localVarPath = strdup("/user/{username}");
if(!username)
goto end;
// Path Params
- long sizeOfPathParams_username = strlen(username)+3 + strlen("{ username }");
+ long sizeOfPathParams_username = strlen(username)+3 + sizeof("{ username }") - 1;
if(username == NULL) {
goto end;
}
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/api_response.c b/samples/client/petstore/c-useJsonUnformatted/model/api_response.c
index ccae1f010102..d0169c84f5b2 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/api_response.c
+++ b/samples/client/petstore/c-useJsonUnformatted/model/api_response.c
@@ -5,7 +5,7 @@
-api_response_t *api_response_create(
+static api_response_t *api_response_create_internal(
int code,
char *type,
char *message
@@ -18,14 +18,30 @@ api_response_t *api_response_create(
api_response_local_var->type = type;
api_response_local_var->message = message;
+ api_response_local_var->_library_owned = 1;
return api_response_local_var;
}
+__attribute__((deprecated)) api_response_t *api_response_create(
+ int code,
+ char *type,
+ char *message
+ ) {
+ return api_response_create_internal (
+ code,
+ type,
+ message
+ );
+}
void api_response_free(api_response_t *api_response) {
if(NULL == api_response){
return ;
}
+ if(api_response->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "api_response_free");
+ return ;
+ }
listEntry_t *listEntry;
if (api_response->type) {
free(api_response->type);
@@ -113,7 +129,7 @@ api_response_t *api_response_parseFromJSON(cJSON *api_responseJSON){
}
- api_response_local_var = api_response_create (
+ api_response_local_var = api_response_create_internal (
code ? code->valuedouble : 0,
type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL,
message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/api_response.h b/samples/client/petstore/c-useJsonUnformatted/model/api_response.h
index d64dcbacedd9..3d9eb71ff5d5 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/api_response.h
+++ b/samples/client/petstore/c-useJsonUnformatted/model/api_response.h
@@ -23,9 +23,10 @@ typedef struct api_response_t {
char *type; // string
char *message; // string
+ int _library_owned; // Is the library responsible for freeing this object?
} api_response_t;
-api_response_t *api_response_create(
+__attribute__((deprecated)) api_response_t *api_response_create(
int code,
char *type,
char *message
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/category.c b/samples/client/petstore/c-useJsonUnformatted/model/category.c
index a1ea1a5d5cee..2b060a568015 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/category.c
+++ b/samples/client/petstore/c-useJsonUnformatted/model/category.c
@@ -5,7 +5,7 @@
-category_t *category_create(
+static category_t *category_create_internal(
long id,
char *name
) {
@@ -16,14 +16,28 @@ category_t *category_create(
category_local_var->id = id;
category_local_var->name = name;
+ category_local_var->_library_owned = 1;
return category_local_var;
}
+__attribute__((deprecated)) category_t *category_create(
+ long id,
+ char *name
+ ) {
+ return category_create_internal (
+ id,
+ name
+ );
+}
void category_free(category_t *category) {
if(NULL == category){
return ;
}
+ if(category->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "category_free");
+ return ;
+ }
listEntry_t *listEntry;
if (category->name) {
free(category->name);
@@ -87,7 +101,7 @@ category_t *category_parseFromJSON(cJSON *categoryJSON){
}
- category_local_var = category_create (
+ category_local_var = category_create_internal (
id ? id->valuedouble : 0,
name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL
);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/category.h b/samples/client/petstore/c-useJsonUnformatted/model/category.h
index ec9efd6ccf60..bd27e27e35a3 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/category.h
+++ b/samples/client/petstore/c-useJsonUnformatted/model/category.h
@@ -22,9 +22,10 @@ typedef struct category_t {
long id; //numeric
char *name; // string
+ int _library_owned; // Is the library responsible for freeing this object?
} category_t;
-category_t *category_create(
+__attribute__((deprecated)) category_t *category_create(
long id,
char *name
);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/mapped_model.c b/samples/client/petstore/c-useJsonUnformatted/model/mapped_model.c
index 7423e32eb338..3ab1e861c326 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/mapped_model.c
+++ b/samples/client/petstore/c-useJsonUnformatted/model/mapped_model.c
@@ -5,7 +5,7 @@
-MappedModel_t *MappedModel_create(
+static MappedModel_t *MappedModel_create_internal(
int another_property,
char *uuid_property
) {
@@ -16,14 +16,28 @@ MappedModel_t *MappedModel_create(
MappedModel_local_var->another_property = another_property;
MappedModel_local_var->uuid_property = uuid_property;
+ MappedModel_local_var->_library_owned = 1;
return MappedModel_local_var;
}
+__attribute__((deprecated)) MappedModel_t *MappedModel_create(
+ int another_property,
+ char *uuid_property
+ ) {
+ return MappedModel_create_internal (
+ another_property,
+ uuid_property
+ );
+}
void MappedModel_free(MappedModel_t *MappedModel) {
if(NULL == MappedModel){
return ;
}
+ if(MappedModel->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "MappedModel_free");
+ return ;
+ }
listEntry_t *listEntry;
if (MappedModel->uuid_property) {
free(MappedModel->uuid_property);
@@ -87,7 +101,7 @@ MappedModel_t *MappedModel_parseFromJSON(cJSON *MappedModelJSON){
}
- MappedModel_local_var = MappedModel_create (
+ MappedModel_local_var = MappedModel_create_internal (
another_property ? another_property->valuedouble : 0,
uuid_property && !cJSON_IsNull(uuid_property) ? strdup(uuid_property->valuestring) : NULL
);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/mapped_model.h b/samples/client/petstore/c-useJsonUnformatted/model/mapped_model.h
index 83b1d4581ba6..b962632d647d 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/mapped_model.h
+++ b/samples/client/petstore/c-useJsonUnformatted/model/mapped_model.h
@@ -22,9 +22,10 @@ typedef struct MappedModel_t {
int another_property; //numeric
char *uuid_property; // string
+ int _library_owned; // Is the library responsible for freeing this object?
} MappedModel_t;
-MappedModel_t *MappedModel_create(
+__attribute__((deprecated)) MappedModel_t *MappedModel_create(
int another_property,
char *uuid_property
);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/model_with_set_propertes.c b/samples/client/petstore/c-useJsonUnformatted/model/model_with_set_propertes.c
index d29660fccfcd..934cdd587c85 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/model_with_set_propertes.c
+++ b/samples/client/petstore/c-useJsonUnformatted/model/model_with_set_propertes.c
@@ -5,7 +5,7 @@
-model_with_set_propertes_t *model_with_set_propertes_create(
+static model_with_set_propertes_t *model_with_set_propertes_create_internal(
list_t *tag_set,
list_t *string_set
) {
@@ -16,14 +16,28 @@ model_with_set_propertes_t *model_with_set_propertes_create(
model_with_set_propertes_local_var->tag_set = tag_set;
model_with_set_propertes_local_var->string_set = string_set;
+ model_with_set_propertes_local_var->_library_owned = 1;
return model_with_set_propertes_local_var;
}
+__attribute__((deprecated)) model_with_set_propertes_t *model_with_set_propertes_create(
+ list_t *tag_set,
+ list_t *string_set
+ ) {
+ return model_with_set_propertes_create_internal (
+ tag_set,
+ string_set
+ );
+}
void model_with_set_propertes_free(model_with_set_propertes_t *model_with_set_propertes) {
if(NULL == model_with_set_propertes){
return ;
}
+ if(model_with_set_propertes->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "model_with_set_propertes_free");
+ return ;
+ }
listEntry_t *listEntry;
if (model_with_set_propertes->tag_set) {
list_ForEach(listEntry, model_with_set_propertes->tag_set) {
@@ -74,7 +88,7 @@ cJSON *model_with_set_propertes_convertToJSON(model_with_set_propertes_t *model_
listEntry_t *string_setListEntry;
list_ForEach(string_setListEntry, model_with_set_propertes->string_set) {
- if(cJSON_AddStringToObject(string_set, "", (char*)string_setListEntry->data) == NULL)
+ if(cJSON_AddStringToObject(string_set, "", string_setListEntry->data) == NULL)
{
goto fail;
}
@@ -146,7 +160,7 @@ model_with_set_propertes_t *model_with_set_propertes_parseFromJSON(cJSON *model_
}
- model_with_set_propertes_local_var = model_with_set_propertes_create (
+ model_with_set_propertes_local_var = model_with_set_propertes_create_internal (
tag_set ? tag_setList : NULL,
string_set ? string_setList : NULL
);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/model_with_set_propertes.h b/samples/client/petstore/c-useJsonUnformatted/model/model_with_set_propertes.h
index 537271638b99..aa82893b94bb 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/model_with_set_propertes.h
+++ b/samples/client/petstore/c-useJsonUnformatted/model/model_with_set_propertes.h
@@ -23,9 +23,10 @@ typedef struct model_with_set_propertes_t {
list_t *tag_set; //nonprimitive container
list_t *string_set; //primitive container
+ int _library_owned; // Is the library responsible for freeing this object?
} model_with_set_propertes_t;
-model_with_set_propertes_t *model_with_set_propertes_create(
+__attribute__((deprecated)) model_with_set_propertes_t *model_with_set_propertes_create(
list_t *tag_set,
list_t *string_set
);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/order.c b/samples/client/petstore/c-useJsonUnformatted/model/order.c
index 055dd08a3896..d67d1d47c714 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/order.c
+++ b/samples/client/petstore/c-useJsonUnformatted/model/order.c
@@ -22,7 +22,7 @@ openapi_petstore_order_STATUS_e order_status_FromString(char* status){
return 0;
}
-order_t *order_create(
+static order_t *order_create_internal(
long id,
long pet_id,
int quantity,
@@ -41,14 +41,36 @@ order_t *order_create(
order_local_var->status = status;
order_local_var->complete = complete;
+ order_local_var->_library_owned = 1;
return order_local_var;
}
+__attribute__((deprecated)) order_t *order_create(
+ long id,
+ long pet_id,
+ int quantity,
+ char *ship_date,
+ openapi_petstore_order_STATUS_e status,
+ int complete
+ ) {
+ return order_create_internal (
+ id,
+ pet_id,
+ quantity,
+ ship_date,
+ status,
+ complete
+ );
+}
void order_free(order_t *order) {
if(NULL == order){
return ;
}
+ if(order->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "order_free");
+ return ;
+ }
listEntry_t *listEntry;
if (order->ship_date) {
free(order->ship_date);
@@ -195,7 +217,7 @@ order_t *order_parseFromJSON(cJSON *orderJSON){
}
- order_local_var = order_create (
+ order_local_var = order_create_internal (
id ? id->valuedouble : 0,
pet_id ? pet_id->valuedouble : 0,
quantity ? quantity->valuedouble : 0,
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/order.h b/samples/client/petstore/c-useJsonUnformatted/model/order.h
index 32914a227499..1b0a47b3028e 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/order.h
+++ b/samples/client/petstore/c-useJsonUnformatted/model/order.h
@@ -34,9 +34,10 @@ typedef struct order_t {
openapi_petstore_order_STATUS_e status; //enum
int complete; //boolean
+ int _library_owned; // Is the library responsible for freeing this object?
} order_t;
-order_t *order_create(
+__attribute__((deprecated)) order_t *order_create(
long id,
long pet_id,
int quantity,
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/pet.c b/samples/client/petstore/c-useJsonUnformatted/model/pet.c
index 2472e769095d..b561634cb529 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/pet.c
+++ b/samples/client/petstore/c-useJsonUnformatted/model/pet.c
@@ -22,7 +22,7 @@ openapi_petstore_pet_STATUS_e pet_status_FromString(char* status){
return 0;
}
-pet_t *pet_create(
+static pet_t *pet_create_internal(
long id,
category_t *category,
char *name,
@@ -41,14 +41,36 @@ pet_t *pet_create(
pet_local_var->tags = tags;
pet_local_var->status = status;
+ pet_local_var->_library_owned = 1;
return pet_local_var;
}
+__attribute__((deprecated)) pet_t *pet_create(
+ long id,
+ category_t *category,
+ char *name,
+ list_t *photo_urls,
+ list_t *tags,
+ openapi_petstore_pet_STATUS_e status
+ ) {
+ return pet_create_internal (
+ id,
+ category,
+ name,
+ photo_urls,
+ tags,
+ status
+ );
+}
void pet_free(pet_t *pet) {
if(NULL == pet){
return ;
}
+ if(pet->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "pet_free");
+ return ;
+ }
listEntry_t *listEntry;
if (pet->category) {
category_free(pet->category);
@@ -119,7 +141,7 @@ cJSON *pet_convertToJSON(pet_t *pet) {
listEntry_t *photo_urlsListEntry;
list_ForEach(photo_urlsListEntry, pet->photo_urls) {
- if(cJSON_AddStringToObject(photo_urls, "", (char*)photo_urlsListEntry->data) == NULL)
+ if(cJSON_AddStringToObject(photo_urls, "", photo_urlsListEntry->data) == NULL)
{
goto fail;
}
@@ -275,7 +297,7 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){
}
- pet_local_var = pet_create (
+ pet_local_var = pet_create_internal (
id ? id->valuedouble : 0,
category ? category_local_nonprim : NULL,
strdup(name->valuestring),
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/pet.h b/samples/client/petstore/c-useJsonUnformatted/model/pet.h
index d74025510143..860197e63a53 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/pet.h
+++ b/samples/client/petstore/c-useJsonUnformatted/model/pet.h
@@ -36,9 +36,10 @@ typedef struct pet_t {
list_t *tags; //nonprimitive container
openapi_petstore_pet_STATUS_e status; //enum
+ int _library_owned; // Is the library responsible for freeing this object?
} pet_t;
-pet_t *pet_create(
+__attribute__((deprecated)) pet_t *pet_create(
long id,
category_t *category,
char *name,
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/tag.c b/samples/client/petstore/c-useJsonUnformatted/model/tag.c
index f79d34ef9acd..e4b4f94af53d 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/tag.c
+++ b/samples/client/petstore/c-useJsonUnformatted/model/tag.c
@@ -5,7 +5,7 @@
-tag_t *tag_create(
+static tag_t *tag_create_internal(
long id,
char *name
) {
@@ -16,14 +16,28 @@ tag_t *tag_create(
tag_local_var->id = id;
tag_local_var->name = name;
+ tag_local_var->_library_owned = 1;
return tag_local_var;
}
+__attribute__((deprecated)) tag_t *tag_create(
+ long id,
+ char *name
+ ) {
+ return tag_create_internal (
+ id,
+ name
+ );
+}
void tag_free(tag_t *tag) {
if(NULL == tag){
return ;
}
+ if(tag->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "tag_free");
+ return ;
+ }
listEntry_t *listEntry;
if (tag->name) {
free(tag->name);
@@ -87,7 +101,7 @@ tag_t *tag_parseFromJSON(cJSON *tagJSON){
}
- tag_local_var = tag_create (
+ tag_local_var = tag_create_internal (
id ? id->valuedouble : 0,
name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL
);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/tag.h b/samples/client/petstore/c-useJsonUnformatted/model/tag.h
index 9e7b5d053a9d..d4b29e4d2e04 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/tag.h
+++ b/samples/client/petstore/c-useJsonUnformatted/model/tag.h
@@ -22,9 +22,10 @@ typedef struct tag_t {
long id; //numeric
char *name; // string
+ int _library_owned; // Is the library responsible for freeing this object?
} tag_t;
-tag_t *tag_create(
+__attribute__((deprecated)) tag_t *tag_create(
long id,
char *name
);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/user.c b/samples/client/petstore/c-useJsonUnformatted/model/user.c
index 111bafdc02ad..780347915886 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/user.c
+++ b/samples/client/petstore/c-useJsonUnformatted/model/user.c
@@ -5,7 +5,7 @@
-user_t *user_create(
+static user_t *user_create_internal(
long id,
char *username,
char *first_name,
@@ -32,14 +32,44 @@ user_t *user_create(
user_local_var->extra = extra;
user_local_var->preference = preference;
+ user_local_var->_library_owned = 1;
return user_local_var;
}
+__attribute__((deprecated)) user_t *user_create(
+ long id,
+ char *username,
+ char *first_name,
+ char *last_name,
+ char *email,
+ char *password,
+ char *phone,
+ int user_status,
+ list_t* extra,
+ openapi_petstore_preference__e preference
+ ) {
+ return user_create_internal (
+ id,
+ username,
+ first_name,
+ last_name,
+ email,
+ password,
+ phone,
+ user_status,
+ extra,
+ preference
+ );
+}
void user_free(user_t *user) {
if(NULL == user){
return ;
}
+ if(user->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "user_free");
+ return ;
+ }
listEntry_t *listEntry;
if (user->username) {
free(user->username);
@@ -67,7 +97,7 @@ void user_free(user_t *user) {
}
if (user->extra) {
list_ForEach(listEntry, user->extra) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
+ keyValuePair_t *localKeyValue = listEntry->data;
free (localKeyValue->key);
free (localKeyValue->value);
keyValuePair_free(localKeyValue);
@@ -155,7 +185,7 @@ cJSON *user_convertToJSON(user_t *user) {
listEntry_t *extraListEntry;
if (user->extra) {
list_ForEach(extraListEntry, user->extra) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*)extraListEntry->data;
+ keyValuePair_t *localKeyValue = extraListEntry->data;
}
}
}
@@ -320,7 +350,7 @@ user_t *user_parseFromJSON(cJSON *userJSON){
}
- user_local_var = user_create (
+ user_local_var = user_create_internal (
id ? id->valuedouble : 0,
username && !cJSON_IsNull(username) ? strdup(username->valuestring) : NULL,
first_name && !cJSON_IsNull(first_name) ? strdup(first_name->valuestring) : NULL,
@@ -338,7 +368,7 @@ user_t *user_parseFromJSON(cJSON *userJSON){
if (extraList) {
listEntry_t *listEntry = NULL;
list_ForEach(listEntry, extraList) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
+ keyValuePair_t *localKeyValue = listEntry->data;
free(localKeyValue->key);
localKeyValue->key = NULL;
keyValuePair_free(localKeyValue);
diff --git a/samples/client/petstore/c-useJsonUnformatted/model/user.h b/samples/client/petstore/c-useJsonUnformatted/model/user.h
index badbc747b308..4643e020a5fe 100644
--- a/samples/client/petstore/c-useJsonUnformatted/model/user.h
+++ b/samples/client/petstore/c-useJsonUnformatted/model/user.h
@@ -32,9 +32,10 @@ typedef struct user_t {
list_t* extra; //map
openapi_petstore_preference__e preference; //referenced enum
+ int _library_owned; // Is the library responsible for freeing this object?
} user_t;
-user_t *user_create(
+__attribute__((deprecated)) user_t *user_create(
long id,
char *username,
char *first_name,
diff --git a/samples/client/petstore/c-useJsonUnformatted/src/apiClient.c b/samples/client/petstore/c-useJsonUnformatted/src/apiClient.c
index ad06a341a4bb..9995b93a8934 100644
--- a/samples/client/petstore/c-useJsonUnformatted/src/apiClient.c
+++ b/samples/client/petstore/c-useJsonUnformatted/src/apiClient.c
@@ -116,10 +116,11 @@ void sslConfig_free(sslConfig_t *sslConfig) {
free(sslConfig);
}
-static void replaceSpaceWithPlus(char *stringToProcess) {
- for(int i = 0; i < strlen(stringToProcess); i++) {
- if(stringToProcess[i] == ' ') {
- stringToProcess[i] = '+';
+static void replaceSpaceWithPlus(char *str) {
+ if (str) {
+ for (; *str; str++) {
+ if (*str == ' ')
+ *str = '+';
}
}
}
@@ -229,38 +230,26 @@ void apiClient_invoke(apiClient_t *apiClient,
if(headerType != NULL) {
list_ForEach(listEntry, headerType) {
- if(strstr((char *) listEntry->data,
- "xml") == NULL)
+ if(strstr(listEntry->data, "xml") == NULL)
{
- buffHeader = malloc(strlen(
- "Accept: ") +
- strlen((char *)
- listEntry->
- data) + 1);
- sprintf(buffHeader, "%s%s", "Accept: ",
+ buffHeader = malloc(sizeof("Accept: ") +
+ strlen(listEntry->data));
+ sprintf(buffHeader, "Accept: %s",
(char *) listEntry->data);
- headers = curl_slist_append(headers,
- buffHeader);
+ headers = curl_slist_append(headers, buffHeader);
free(buffHeader);
}
}
}
if(contentType != NULL) {
list_ForEach(listEntry, contentType) {
- if(strstr((char *) listEntry->data,
- "xml") == NULL)
+ if(strstr(listEntry->data, "xml") == NULL)
{
- buffContent =
- malloc(strlen(
- "Content-Type: ") + strlen(
- (char *)
- listEntry->data) +
- 1);
- sprintf(buffContent, "%s%s",
- "Content-Type: ",
+ buffContent = malloc(sizeof("Content-Type: ") +
+ strlen(listEntry->data));
+ sprintf(buffContent, "Content-Type: %s",
(char *) listEntry->data);
- headers = curl_slist_append(headers,
- buffContent);
+ headers = curl_slist_append(headers, buffContent);
free(buffContent);
buffContent = NULL;
}
@@ -475,8 +464,8 @@ void apiClient_invoke(apiClient_t *apiClient,
size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) {
size_t size_this_time = nmemb * size;
- apiClient_t *apiClient = (apiClient_t *)userp;
- apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
+ apiClient_t *apiClient = userp;
+ apiClient->dataReceived = realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
memcpy((char *)apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time);
apiClient->dataReceivedLen += size_this_time;
((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1
diff --git a/samples/client/petstore/c-useJsonUnformatted/src/list.c b/samples/client/petstore/c-useJsonUnformatted/src/list.c
index 786812158a24..7053ff122dfc 100644
--- a/samples/client/petstore/c-useJsonUnformatted/src/list.c
+++ b/samples/client/petstore/c-useJsonUnformatted/src/list.c
@@ -20,7 +20,7 @@ void listEntry_free(listEntry_t *listEntry, void *additionalData) {
}
void listEntry_printAsInt(listEntry_t *listEntry, void *additionalData) {
- printf("%i\n", *((int *) (listEntry->data)));
+ printf("%i\n", *(int *)listEntry->data);
}
list_t *list_createList() {
@@ -176,8 +176,8 @@ char* findStrInStrList(list_t *strList, const char *str)
listEntry_t* listEntry = NULL;
list_ForEach(listEntry, strList) {
- if (strstr((char*)listEntry->data, str) != NULL) {
- return (char*)listEntry->data;
+ if (strstr(listEntry->data, str) != NULL) {
+ return listEntry->data;
}
}
@@ -197,4 +197,4 @@ void clear_and_free_string_list(list_t *list)
list_item = NULL;
}
list_freeList(list);
-}
\ No newline at end of file
+}
diff --git a/samples/client/petstore/c/.openapi-generator-ignore b/samples/client/petstore/c/.openapi-generator-ignore
index f574e0daf8fe..7484ee590a38 100644
--- a/samples/client/petstore/c/.openapi-generator-ignore
+++ b/samples/client/petstore/c/.openapi-generator-ignore
@@ -21,4 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
-CMakeLists.txt
diff --git a/samples/client/petstore/c/.openapi-generator/FILES b/samples/client/petstore/c/.openapi-generator/FILES
index 48d9373c724d..8c91a58b05a0 100644
--- a/samples/client/petstore/c/.openapi-generator/FILES
+++ b/samples/client/petstore/c/.openapi-generator/FILES
@@ -1,3 +1,4 @@
+CMakeLists.txt
Config.cmake.in
Packing.cmake
README.md
diff --git a/samples/client/petstore/c/CMakeLists.txt b/samples/client/petstore/c/CMakeLists.txt
index cca11426642a..5ad5652ad3a3 100644
--- a/samples/client/petstore/c/CMakeLists.txt
+++ b/samples/client/petstore/c/CMakeLists.txt
@@ -1,33 +1,61 @@
-cmake_minimum_required (VERSION 2.6)
-project (CGenerator)
+cmake_minimum_required (VERSION 2.6...3.10.2)
+project (CGenerator C)
cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)
-set(CMAKE_CXX_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
-set(CMAKE_BUILD_TYPE Debug)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=missing-declarations")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")
+
+option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
+
+find_package(OpenSSL)
+
+if (OPENSSL_FOUND)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL")
+ if(CMAKE_VERSION VERSION_LESS 3.4)
+ include_directories(${OPENSSL_INCLUDE_DIR})
+ include_directories(${OPENSSL_INCLUDE_DIRS})
+ link_directories(${OPENSSL_LIBRARIES})
+ endif()
+endif()
set(pkgName "openapi_petstore")
-find_package(CURL 7.58.0 REQUIRED)
-if(CURL_FOUND)
- include_directories(${CURL_INCLUDE_DIR})
- set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
-else(CURL_FOUND)
- message(FATAL_ERROR "Could not find the CURL library and development files.")
+# this default version can be overridden in PreTarget.cmake
+set(PROJECT_VERSION_MAJOR 0)
+set(PROJECT_VERSION_MINOR 0)
+set(PROJECT_VERSION_PATCH 1)
+
+if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES))
+ include_directories(${CURL_INCLUDE_DIR})
+ set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
+else()
+ find_package(CURL 7.58.0 REQUIRED)
+ if(CURL_FOUND)
+ include_directories(${CURL_INCLUDE_DIR})
+ set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
+ endif()
endif()
set(SRCS
src/list.c
src/apiKey.c
src/apiClient.c
+ src/binary.c
external/cJSON.c
model/object.c
+ model/mapped_model.c
model/api_response.c
+ model/bit.c
model/category.c
+ model/model_with_set_propertes.c
model/order.c
model/pet.c
+ model/preference.c
model/tag.c
model/user.c
api/PetAPI.c
@@ -39,13 +67,19 @@ set(SRCS
set(HDRS
include/apiClient.h
include/list.h
+ include/binary.h
include/keyValuePair.h
external/cJSON.h
model/object.h
+ model/any_type.h
+ model/mapped_model.h
model/api_response.h
+ model/bit.h
model/category.h
+ model/model_with_set_propertes.h
model/order.h
model/pet.h
+ model/preference.h
model/tag.h
model/user.h
api/PetAPI.h
@@ -54,12 +88,75 @@ set(HDRS
)
-# Add library with project file with projectname as library name
-add_library(${pkgName} SHARED ${SRCS} ${HDRS})
+include(PreTarget.cmake OPTIONAL)
+
+set(PROJECT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
+
+# Add library with project file with project name as library name
+add_library(${pkgName} ${SRCS} ${HDRS})
# Link dependent libraries
-target_link_libraries(${pkgName} ${CURL_LIBRARIES} )
-#install library to destination
-install(TARGETS ${pkgName} DESTINATION ${CMAKE_INSTALL_PREFIX})
+if(NOT CMAKE_VERSION VERSION_LESS 3.4)
+ target_link_libraries(${pkgName} PRIVATE OpenSSL::SSL OpenSSL::Crypto)
+endif()
+target_link_libraries(${pkgName} PUBLIC ${CURL_LIBRARIES} )
+target_include_directories(
+ ${pkgName} PUBLIC $
+ $
+)
+
+include(PostTarget.cmake OPTIONAL)
+
+# installation of libraries, headers, and config files
+if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in)
+ install(TARGETS ${pkgName} DESTINATION lib)
+else()
+ include(GNUInstallDirs)
+ install(TARGETS ${pkgName} DESTINATION lib EXPORT ${pkgName}Targets)
+
+ foreach(HDR_FILE ${HDRS})
+ get_filename_component(HDR_DIRECTORY ${HDR_FILE} DIRECTORY)
+ get_filename_component(ABSOLUTE_HDR_DIRECTORY ${HDR_DIRECTORY} ABSOLUTE)
+ file(RELATIVE_PATH RELATIVE_HDR_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${ABSOLUTE_HDR_DIRECTORY})
+ install(FILES ${HDR_FILE} DESTINATION include/${pkgName}/${RELATIVE_HDR_PATH})
+ endforeach()
+
+ include(CMakePackageConfigHelpers)
+ write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake"
+ VERSION "${PROJECT_VERSION_STRING}"
+ COMPATIBILITY AnyNewerVersion
+ )
+
+ export(EXPORT ${pkgName}Targets
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Targets.cmake"
+ NAMESPACE ${pkgName}::
+ )
+
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
+ "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Config.cmake"
+ @ONLY
+ )
+
+ set(ConfigPackageLocation lib/cmake/${pkgName})
+ install(EXPORT ${pkgName}Targets
+ FILE
+ ${pkgName}Targets.cmake
+ NAMESPACE
+ ${pkgName}::
+ DESTINATION
+ ${ConfigPackageLocation}
+ )
+ install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake"
+ DESTINATION
+ ${ConfigPackageLocation}
+ )
+endif()
+
+# make installation packages
+include(Packing.cmake OPTIONAL)
# Setting file variables to null
set(SRCS "")
@@ -72,8 +169,7 @@ set(HDRS "")
# unit-tests/manual-PetAPI.c
# unit-tests/manual-StoreAPI.c
# unit-tests/manual-UserAPI.c
-# unit-tests/manual-order.c
-# unit-tests/manual-user.c)
+#)
##set header files
#set(HDRS
@@ -81,7 +177,7 @@ set(HDRS "")
## loop over all files in SRCS variable
#foreach(SOURCE_FILE ${SRCS})
-# # Get only the file name from the file as add_executable doesn't support executable with slash("/")
+# # Get only the file name from the file as add_executable does not support executable with slash("/")
# get_filename_component(FILE_NAME_ONLY ${SOURCE_FILE} NAME_WE)
# # Remove .c from the file name and set it as executable name
# string( REPLACE ".c" "" EXECUTABLE_FILE ${FILE_NAME_ONLY})
diff --git a/samples/client/petstore/c/api/PetAPI.c b/samples/client/petstore/c/api/PetAPI.c
index 90e5c5312f69..0037e2fdcf21 100644
--- a/samples/client/petstore/c/api/PetAPI.c
+++ b/samples/client/petstore/c/api/PetAPI.c
@@ -67,9 +67,7 @@ PetAPI_addPet(apiClient_t *apiClient, pet_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet");
+ char *localVarPath = strdup("/pet");
@@ -139,14 +137,12 @@ PetAPI_deletePet(apiClient_t *apiClient, long petId, char *api_key)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}");
+ char *localVarPath = strdup("/pet/{petId}");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
@@ -232,9 +228,7 @@ PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t *status)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/findByStatus")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/findByStatus");
+ char *localVarPath = strdup("/pet/findByStatus");
@@ -325,9 +319,7 @@ PetAPI_findPetsByTags(apiClient_t *apiClient, list_t *tags)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/findByTags")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/findByTags");
+ char *localVarPath = strdup("/pet/findByTags");
@@ -416,9 +408,7 @@ PetAPI_getDaysWithoutIncident(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/daysWithoutIncident")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/daysWithoutIncident");
+ char *localVarPath = strdup("/store/daysWithoutIncident");
@@ -481,14 +471,12 @@ PetAPI_getPetById(apiClient_t *apiClient, long petId)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}");
+ char *localVarPath = strdup("/pet/{petId}");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
@@ -575,9 +563,7 @@ PetAPI_getPicture(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/picture")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/picture");
+ char *localVarPath = strdup("/pet/picture");
@@ -638,14 +624,12 @@ PetAPI_isPetAvailable(apiClient_t *apiClient, long petId)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}/isAvailable")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}/isAvailable");
+ char *localVarPath = strdup("/pet/{petId}/isAvailable");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
@@ -723,9 +707,7 @@ PetAPI_sharePicture(apiClient_t *apiClient, binary_t* picture)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/picture")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/picture");
+ char *localVarPath = strdup("/pet/picture");
@@ -794,9 +776,7 @@ PetAPI_specialtyPet(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/specialty")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/specialty");
+ char *localVarPath = strdup("/pet/specialty");
@@ -865,9 +845,7 @@ PetAPI_updatePet(apiClient_t *apiClient, pet_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet");
+ char *localVarPath = strdup("/pet");
@@ -945,14 +923,12 @@ PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId, char *name, char *s
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}");
+ char *localVarPath = strdup("/pet/{petId}");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
@@ -1058,14 +1034,12 @@ PetAPI_uploadFile(apiClient_t *apiClient, long petId, char *additionalMetadata,
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/pet/{petId}/uploadImage")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/pet/{petId}/uploadImage");
+ char *localVarPath = strdup("/pet/{petId}/uploadImage");
// Path Params
- long sizeOfPathParams_petId = sizeof(petId)+3 + strlen("{ petId }");
+ long sizeOfPathParams_petId = sizeof(petId)+3 + sizeof("{ petId }") - 1;
if(petId == 0){
goto end;
}
diff --git a/samples/client/petstore/c/api/StoreAPI.c b/samples/client/petstore/c/api/StoreAPI.c
index 843c6bfc47e2..473de05e28c9 100644
--- a/samples/client/petstore/c/api/StoreAPI.c
+++ b/samples/client/petstore/c/api/StoreAPI.c
@@ -78,16 +78,14 @@ StoreAPI_deleteOrder(apiClient_t *apiClient, char *orderId)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/order/{orderId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/order/{orderId}");
+ char *localVarPath = strdup("/store/order/{orderId}");
if(!orderId)
goto end;
// Path Params
- long sizeOfPathParams_orderId = strlen(orderId)+3 + strlen("{ orderId }");
+ long sizeOfPathParams_orderId = strlen(orderId)+3 + sizeof("{ orderId }") - 1;
if(orderId == NULL) {
goto end;
}
@@ -152,9 +150,7 @@ StoreAPI_getInventory(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/inventory")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/inventory");
+ char *localVarPath = strdup("/store/inventory");
@@ -225,14 +221,12 @@ StoreAPI_getOrderById(apiClient_t *apiClient, long orderId)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/order/{orderId}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/order/{orderId}");
+ char *localVarPath = strdup("/store/order/{orderId}");
// Path Params
- long sizeOfPathParams_orderId = sizeof(orderId)+3 + strlen("{ orderId }");
+ long sizeOfPathParams_orderId = sizeof(orderId)+3 + sizeof("{ orderId }") - 1;
if(orderId == 0){
goto end;
}
@@ -319,9 +313,7 @@ StoreAPI_placeOrder(apiClient_t *apiClient, order_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/order")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/order");
+ char *localVarPath = strdup("/store/order");
@@ -409,9 +401,7 @@ StoreAPI_sendFeedback(apiClient_t *apiClient, char *feedback)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/feedback")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/feedback");
+ char *localVarPath = strdup("/store/feedback");
@@ -477,16 +467,14 @@ StoreAPI_sendRating(apiClient_t *apiClient, openapi_petstore_sendRating_rating_e
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/rating/{rating}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/rating/{rating}");
+ char *localVarPath = strdup("/store/rating/{rating}");
if(!rating)
goto end;
// Path Params
- long sizeOfPathParams_rating = strlen(sendRating_RATING_ToString(rating))+3 + strlen("{ rating }");
+ long sizeOfPathParams_rating = strlen(sendRating_RATING_ToString(rating))+3 + sizeof("{ rating }") - 1;
if(rating == 0) {
goto end;
}
@@ -553,9 +541,7 @@ StoreAPI_sendRecommend(apiClient_t *apiClient, int *recommend)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/store/recommend")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/store/recommend");
+ char *localVarPath = strdup("/store/recommend");
diff --git a/samples/client/petstore/c/api/UserAPI.c b/samples/client/petstore/c/api/UserAPI.c
index d27ee87c4fde..62b520c4034d 100644
--- a/samples/client/petstore/c/api/UserAPI.c
+++ b/samples/client/petstore/c/api/UserAPI.c
@@ -26,9 +26,7 @@ UserAPI_createUser(apiClient_t *apiClient, user_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user");
+ char *localVarPath = strdup("/user");
@@ -96,9 +94,7 @@ UserAPI_createUsersWithArrayInput(apiClient_t *apiClient, list_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/createWithArray")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/createWithArray");
+ char *localVarPath = strdup("/user/createWithArray");
@@ -194,9 +190,7 @@ UserAPI_createUsersWithListInput(apiClient_t *apiClient, list_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/createWithList")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/createWithList");
+ char *localVarPath = strdup("/user/createWithList");
@@ -294,16 +288,14 @@ UserAPI_deleteUser(apiClient_t *apiClient, char *username)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/{username}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/{username}");
+ char *localVarPath = strdup("/user/{username}");
if(!username)
goto end;
// Path Params
- long sizeOfPathParams_username = strlen(username)+3 + strlen("{ username }");
+ long sizeOfPathParams_username = strlen(username)+3 + sizeof("{ username }") - 1;
if(username == NULL) {
goto end;
}
@@ -366,16 +358,14 @@ UserAPI_getUserByName(apiClient_t *apiClient, char *username)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/{username}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/{username}");
+ char *localVarPath = strdup("/user/{username}");
if(!username)
goto end;
// Path Params
- long sizeOfPathParams_username = strlen(username)+3 + strlen("{ username }");
+ long sizeOfPathParams_username = strlen(username)+3 + sizeof("{ username }") - 1;
if(username == NULL) {
goto end;
}
@@ -458,9 +448,7 @@ UserAPI_loginUser(apiClient_t *apiClient, char *username, char *password)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/login")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/login");
+ char *localVarPath = strdup("/user/login");
@@ -574,9 +562,7 @@ UserAPI_logoutUser(apiClient_t *apiClient)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/logout")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/logout");
+ char *localVarPath = strdup("/user/logout");
@@ -631,9 +617,7 @@ UserAPI_testIntAndBool(apiClient_t *apiClient, int *keep, int *keepDay)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/testIntAndBool")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/testIntAndBool");
+ char *localVarPath = strdup("/user/testIntAndBool");
@@ -714,16 +698,14 @@ UserAPI_updateUser(apiClient_t *apiClient, char *username, user_t *body)
apiClient->response_code = 0;
// create the path
- long sizeOfPath = strlen("/user/{username}")+1;
- char *localVarPath = malloc(sizeOfPath);
- snprintf(localVarPath, sizeOfPath, "/user/{username}");
+ char *localVarPath = strdup("/user/{username}");
if(!username)
goto end;
// Path Params
- long sizeOfPathParams_username = strlen(username)+3 + strlen("{ username }");
+ long sizeOfPathParams_username = strlen(username)+3 + sizeof("{ username }") - 1;
if(username == NULL) {
goto end;
}
diff --git a/samples/client/petstore/c/model/api_response.c b/samples/client/petstore/c/model/api_response.c
index ccae1f010102..d0169c84f5b2 100644
--- a/samples/client/petstore/c/model/api_response.c
+++ b/samples/client/petstore/c/model/api_response.c
@@ -5,7 +5,7 @@
-api_response_t *api_response_create(
+static api_response_t *api_response_create_internal(
int code,
char *type,
char *message
@@ -18,14 +18,30 @@ api_response_t *api_response_create(
api_response_local_var->type = type;
api_response_local_var->message = message;
+ api_response_local_var->_library_owned = 1;
return api_response_local_var;
}
+__attribute__((deprecated)) api_response_t *api_response_create(
+ int code,
+ char *type,
+ char *message
+ ) {
+ return api_response_create_internal (
+ code,
+ type,
+ message
+ );
+}
void api_response_free(api_response_t *api_response) {
if(NULL == api_response){
return ;
}
+ if(api_response->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "api_response_free");
+ return ;
+ }
listEntry_t *listEntry;
if (api_response->type) {
free(api_response->type);
@@ -113,7 +129,7 @@ api_response_t *api_response_parseFromJSON(cJSON *api_responseJSON){
}
- api_response_local_var = api_response_create (
+ api_response_local_var = api_response_create_internal (
code ? code->valuedouble : 0,
type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL,
message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL
diff --git a/samples/client/petstore/c/model/api_response.h b/samples/client/petstore/c/model/api_response.h
index d64dcbacedd9..3d9eb71ff5d5 100644
--- a/samples/client/petstore/c/model/api_response.h
+++ b/samples/client/petstore/c/model/api_response.h
@@ -23,9 +23,10 @@ typedef struct api_response_t {
char *type; // string
char *message; // string
+ int _library_owned; // Is the library responsible for freeing this object?
} api_response_t;
-api_response_t *api_response_create(
+__attribute__((deprecated)) api_response_t *api_response_create(
int code,
char *type,
char *message
diff --git a/samples/client/petstore/c/model/category.c b/samples/client/petstore/c/model/category.c
index a1ea1a5d5cee..2b060a568015 100644
--- a/samples/client/petstore/c/model/category.c
+++ b/samples/client/petstore/c/model/category.c
@@ -5,7 +5,7 @@
-category_t *category_create(
+static category_t *category_create_internal(
long id,
char *name
) {
@@ -16,14 +16,28 @@ category_t *category_create(
category_local_var->id = id;
category_local_var->name = name;
+ category_local_var->_library_owned = 1;
return category_local_var;
}
+__attribute__((deprecated)) category_t *category_create(
+ long id,
+ char *name
+ ) {
+ return category_create_internal (
+ id,
+ name
+ );
+}
void category_free(category_t *category) {
if(NULL == category){
return ;
}
+ if(category->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "category_free");
+ return ;
+ }
listEntry_t *listEntry;
if (category->name) {
free(category->name);
@@ -87,7 +101,7 @@ category_t *category_parseFromJSON(cJSON *categoryJSON){
}
- category_local_var = category_create (
+ category_local_var = category_create_internal (
id ? id->valuedouble : 0,
name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL
);
diff --git a/samples/client/petstore/c/model/category.h b/samples/client/petstore/c/model/category.h
index ec9efd6ccf60..bd27e27e35a3 100644
--- a/samples/client/petstore/c/model/category.h
+++ b/samples/client/petstore/c/model/category.h
@@ -22,9 +22,10 @@ typedef struct category_t {
long id; //numeric
char *name; // string
+ int _library_owned; // Is the library responsible for freeing this object?
} category_t;
-category_t *category_create(
+__attribute__((deprecated)) category_t *category_create(
long id,
char *name
);
diff --git a/samples/client/petstore/c/model/mapped_model.c b/samples/client/petstore/c/model/mapped_model.c
index 7423e32eb338..3ab1e861c326 100644
--- a/samples/client/petstore/c/model/mapped_model.c
+++ b/samples/client/petstore/c/model/mapped_model.c
@@ -5,7 +5,7 @@
-MappedModel_t *MappedModel_create(
+static MappedModel_t *MappedModel_create_internal(
int another_property,
char *uuid_property
) {
@@ -16,14 +16,28 @@ MappedModel_t *MappedModel_create(
MappedModel_local_var->another_property = another_property;
MappedModel_local_var->uuid_property = uuid_property;
+ MappedModel_local_var->_library_owned = 1;
return MappedModel_local_var;
}
+__attribute__((deprecated)) MappedModel_t *MappedModel_create(
+ int another_property,
+ char *uuid_property
+ ) {
+ return MappedModel_create_internal (
+ another_property,
+ uuid_property
+ );
+}
void MappedModel_free(MappedModel_t *MappedModel) {
if(NULL == MappedModel){
return ;
}
+ if(MappedModel->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "MappedModel_free");
+ return ;
+ }
listEntry_t *listEntry;
if (MappedModel->uuid_property) {
free(MappedModel->uuid_property);
@@ -87,7 +101,7 @@ MappedModel_t *MappedModel_parseFromJSON(cJSON *MappedModelJSON){
}
- MappedModel_local_var = MappedModel_create (
+ MappedModel_local_var = MappedModel_create_internal (
another_property ? another_property->valuedouble : 0,
uuid_property && !cJSON_IsNull(uuid_property) ? strdup(uuid_property->valuestring) : NULL
);
diff --git a/samples/client/petstore/c/model/mapped_model.h b/samples/client/petstore/c/model/mapped_model.h
index 83b1d4581ba6..b962632d647d 100644
--- a/samples/client/petstore/c/model/mapped_model.h
+++ b/samples/client/petstore/c/model/mapped_model.h
@@ -22,9 +22,10 @@ typedef struct MappedModel_t {
int another_property; //numeric
char *uuid_property; // string
+ int _library_owned; // Is the library responsible for freeing this object?
} MappedModel_t;
-MappedModel_t *MappedModel_create(
+__attribute__((deprecated)) MappedModel_t *MappedModel_create(
int another_property,
char *uuid_property
);
diff --git a/samples/client/petstore/c/model/model_with_set_propertes.c b/samples/client/petstore/c/model/model_with_set_propertes.c
index d29660fccfcd..934cdd587c85 100644
--- a/samples/client/petstore/c/model/model_with_set_propertes.c
+++ b/samples/client/petstore/c/model/model_with_set_propertes.c
@@ -5,7 +5,7 @@
-model_with_set_propertes_t *model_with_set_propertes_create(
+static model_with_set_propertes_t *model_with_set_propertes_create_internal(
list_t *tag_set,
list_t *string_set
) {
@@ -16,14 +16,28 @@ model_with_set_propertes_t *model_with_set_propertes_create(
model_with_set_propertes_local_var->tag_set = tag_set;
model_with_set_propertes_local_var->string_set = string_set;
+ model_with_set_propertes_local_var->_library_owned = 1;
return model_with_set_propertes_local_var;
}
+__attribute__((deprecated)) model_with_set_propertes_t *model_with_set_propertes_create(
+ list_t *tag_set,
+ list_t *string_set
+ ) {
+ return model_with_set_propertes_create_internal (
+ tag_set,
+ string_set
+ );
+}
void model_with_set_propertes_free(model_with_set_propertes_t *model_with_set_propertes) {
if(NULL == model_with_set_propertes){
return ;
}
+ if(model_with_set_propertes->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "model_with_set_propertes_free");
+ return ;
+ }
listEntry_t *listEntry;
if (model_with_set_propertes->tag_set) {
list_ForEach(listEntry, model_with_set_propertes->tag_set) {
@@ -74,7 +88,7 @@ cJSON *model_with_set_propertes_convertToJSON(model_with_set_propertes_t *model_
listEntry_t *string_setListEntry;
list_ForEach(string_setListEntry, model_with_set_propertes->string_set) {
- if(cJSON_AddStringToObject(string_set, "", (char*)string_setListEntry->data) == NULL)
+ if(cJSON_AddStringToObject(string_set, "", string_setListEntry->data) == NULL)
{
goto fail;
}
@@ -146,7 +160,7 @@ model_with_set_propertes_t *model_with_set_propertes_parseFromJSON(cJSON *model_
}
- model_with_set_propertes_local_var = model_with_set_propertes_create (
+ model_with_set_propertes_local_var = model_with_set_propertes_create_internal (
tag_set ? tag_setList : NULL,
string_set ? string_setList : NULL
);
diff --git a/samples/client/petstore/c/model/model_with_set_propertes.h b/samples/client/petstore/c/model/model_with_set_propertes.h
index 537271638b99..aa82893b94bb 100644
--- a/samples/client/petstore/c/model/model_with_set_propertes.h
+++ b/samples/client/petstore/c/model/model_with_set_propertes.h
@@ -23,9 +23,10 @@ typedef struct model_with_set_propertes_t {
list_t *tag_set; //nonprimitive container
list_t *string_set; //primitive container
+ int _library_owned; // Is the library responsible for freeing this object?
} model_with_set_propertes_t;
-model_with_set_propertes_t *model_with_set_propertes_create(
+__attribute__((deprecated)) model_with_set_propertes_t *model_with_set_propertes_create(
list_t *tag_set,
list_t *string_set
);
diff --git a/samples/client/petstore/c/model/order.c b/samples/client/petstore/c/model/order.c
index 055dd08a3896..d67d1d47c714 100644
--- a/samples/client/petstore/c/model/order.c
+++ b/samples/client/petstore/c/model/order.c
@@ -22,7 +22,7 @@ openapi_petstore_order_STATUS_e order_status_FromString(char* status){
return 0;
}
-order_t *order_create(
+static order_t *order_create_internal(
long id,
long pet_id,
int quantity,
@@ -41,14 +41,36 @@ order_t *order_create(
order_local_var->status = status;
order_local_var->complete = complete;
+ order_local_var->_library_owned = 1;
return order_local_var;
}
+__attribute__((deprecated)) order_t *order_create(
+ long id,
+ long pet_id,
+ int quantity,
+ char *ship_date,
+ openapi_petstore_order_STATUS_e status,
+ int complete
+ ) {
+ return order_create_internal (
+ id,
+ pet_id,
+ quantity,
+ ship_date,
+ status,
+ complete
+ );
+}
void order_free(order_t *order) {
if(NULL == order){
return ;
}
+ if(order->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "order_free");
+ return ;
+ }
listEntry_t *listEntry;
if (order->ship_date) {
free(order->ship_date);
@@ -195,7 +217,7 @@ order_t *order_parseFromJSON(cJSON *orderJSON){
}
- order_local_var = order_create (
+ order_local_var = order_create_internal (
id ? id->valuedouble : 0,
pet_id ? pet_id->valuedouble : 0,
quantity ? quantity->valuedouble : 0,
diff --git a/samples/client/petstore/c/model/order.h b/samples/client/petstore/c/model/order.h
index 32914a227499..1b0a47b3028e 100644
--- a/samples/client/petstore/c/model/order.h
+++ b/samples/client/petstore/c/model/order.h
@@ -34,9 +34,10 @@ typedef struct order_t {
openapi_petstore_order_STATUS_e status; //enum
int complete; //boolean
+ int _library_owned; // Is the library responsible for freeing this object?
} order_t;
-order_t *order_create(
+__attribute__((deprecated)) order_t *order_create(
long id,
long pet_id,
int quantity,
diff --git a/samples/client/petstore/c/model/pet.c b/samples/client/petstore/c/model/pet.c
index 2472e769095d..b561634cb529 100644
--- a/samples/client/petstore/c/model/pet.c
+++ b/samples/client/petstore/c/model/pet.c
@@ -22,7 +22,7 @@ openapi_petstore_pet_STATUS_e pet_status_FromString(char* status){
return 0;
}
-pet_t *pet_create(
+static pet_t *pet_create_internal(
long id,
category_t *category,
char *name,
@@ -41,14 +41,36 @@ pet_t *pet_create(
pet_local_var->tags = tags;
pet_local_var->status = status;
+ pet_local_var->_library_owned = 1;
return pet_local_var;
}
+__attribute__((deprecated)) pet_t *pet_create(
+ long id,
+ category_t *category,
+ char *name,
+ list_t *photo_urls,
+ list_t *tags,
+ openapi_petstore_pet_STATUS_e status
+ ) {
+ return pet_create_internal (
+ id,
+ category,
+ name,
+ photo_urls,
+ tags,
+ status
+ );
+}
void pet_free(pet_t *pet) {
if(NULL == pet){
return ;
}
+ if(pet->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "pet_free");
+ return ;
+ }
listEntry_t *listEntry;
if (pet->category) {
category_free(pet->category);
@@ -119,7 +141,7 @@ cJSON *pet_convertToJSON(pet_t *pet) {
listEntry_t *photo_urlsListEntry;
list_ForEach(photo_urlsListEntry, pet->photo_urls) {
- if(cJSON_AddStringToObject(photo_urls, "", (char*)photo_urlsListEntry->data) == NULL)
+ if(cJSON_AddStringToObject(photo_urls, "", photo_urlsListEntry->data) == NULL)
{
goto fail;
}
@@ -275,7 +297,7 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){
}
- pet_local_var = pet_create (
+ pet_local_var = pet_create_internal (
id ? id->valuedouble : 0,
category ? category_local_nonprim : NULL,
strdup(name->valuestring),
diff --git a/samples/client/petstore/c/model/pet.h b/samples/client/petstore/c/model/pet.h
index d74025510143..860197e63a53 100644
--- a/samples/client/petstore/c/model/pet.h
+++ b/samples/client/petstore/c/model/pet.h
@@ -36,9 +36,10 @@ typedef struct pet_t {
list_t *tags; //nonprimitive container
openapi_petstore_pet_STATUS_e status; //enum
+ int _library_owned; // Is the library responsible for freeing this object?
} pet_t;
-pet_t *pet_create(
+__attribute__((deprecated)) pet_t *pet_create(
long id,
category_t *category,
char *name,
diff --git a/samples/client/petstore/c/model/tag.c b/samples/client/petstore/c/model/tag.c
index f79d34ef9acd..e4b4f94af53d 100644
--- a/samples/client/petstore/c/model/tag.c
+++ b/samples/client/petstore/c/model/tag.c
@@ -5,7 +5,7 @@
-tag_t *tag_create(
+static tag_t *tag_create_internal(
long id,
char *name
) {
@@ -16,14 +16,28 @@ tag_t *tag_create(
tag_local_var->id = id;
tag_local_var->name = name;
+ tag_local_var->_library_owned = 1;
return tag_local_var;
}
+__attribute__((deprecated)) tag_t *tag_create(
+ long id,
+ char *name
+ ) {
+ return tag_create_internal (
+ id,
+ name
+ );
+}
void tag_free(tag_t *tag) {
if(NULL == tag){
return ;
}
+ if(tag->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "tag_free");
+ return ;
+ }
listEntry_t *listEntry;
if (tag->name) {
free(tag->name);
@@ -87,7 +101,7 @@ tag_t *tag_parseFromJSON(cJSON *tagJSON){
}
- tag_local_var = tag_create (
+ tag_local_var = tag_create_internal (
id ? id->valuedouble : 0,
name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL
);
diff --git a/samples/client/petstore/c/model/tag.h b/samples/client/petstore/c/model/tag.h
index 9e7b5d053a9d..d4b29e4d2e04 100644
--- a/samples/client/petstore/c/model/tag.h
+++ b/samples/client/petstore/c/model/tag.h
@@ -22,9 +22,10 @@ typedef struct tag_t {
long id; //numeric
char *name; // string
+ int _library_owned; // Is the library responsible for freeing this object?
} tag_t;
-tag_t *tag_create(
+__attribute__((deprecated)) tag_t *tag_create(
long id,
char *name
);
diff --git a/samples/client/petstore/c/model/user.c b/samples/client/petstore/c/model/user.c
index 111bafdc02ad..780347915886 100644
--- a/samples/client/petstore/c/model/user.c
+++ b/samples/client/petstore/c/model/user.c
@@ -5,7 +5,7 @@
-user_t *user_create(
+static user_t *user_create_internal(
long id,
char *username,
char *first_name,
@@ -32,14 +32,44 @@ user_t *user_create(
user_local_var->extra = extra;
user_local_var->preference = preference;
+ user_local_var->_library_owned = 1;
return user_local_var;
}
+__attribute__((deprecated)) user_t *user_create(
+ long id,
+ char *username,
+ char *first_name,
+ char *last_name,
+ char *email,
+ char *password,
+ char *phone,
+ int user_status,
+ list_t* extra,
+ openapi_petstore_preference__e preference
+ ) {
+ return user_create_internal (
+ id,
+ username,
+ first_name,
+ last_name,
+ email,
+ password,
+ phone,
+ user_status,
+ extra,
+ preference
+ );
+}
void user_free(user_t *user) {
if(NULL == user){
return ;
}
+ if(user->_library_owned != 1){
+ fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "user_free");
+ return ;
+ }
listEntry_t *listEntry;
if (user->username) {
free(user->username);
@@ -67,7 +97,7 @@ void user_free(user_t *user) {
}
if (user->extra) {
list_ForEach(listEntry, user->extra) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
+ keyValuePair_t *localKeyValue = listEntry->data;
free (localKeyValue->key);
free (localKeyValue->value);
keyValuePair_free(localKeyValue);
@@ -155,7 +185,7 @@ cJSON *user_convertToJSON(user_t *user) {
listEntry_t *extraListEntry;
if (user->extra) {
list_ForEach(extraListEntry, user->extra) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*)extraListEntry->data;
+ keyValuePair_t *localKeyValue = extraListEntry->data;
}
}
}
@@ -320,7 +350,7 @@ user_t *user_parseFromJSON(cJSON *userJSON){
}
- user_local_var = user_create (
+ user_local_var = user_create_internal (
id ? id->valuedouble : 0,
username && !cJSON_IsNull(username) ? strdup(username->valuestring) : NULL,
first_name && !cJSON_IsNull(first_name) ? strdup(first_name->valuestring) : NULL,
@@ -338,7 +368,7 @@ user_t *user_parseFromJSON(cJSON *userJSON){
if (extraList) {
listEntry_t *listEntry = NULL;
list_ForEach(listEntry, extraList) {
- keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
+ keyValuePair_t *localKeyValue = listEntry->data;
free(localKeyValue->key);
localKeyValue->key = NULL;
keyValuePair_free(localKeyValue);
diff --git a/samples/client/petstore/c/model/user.h b/samples/client/petstore/c/model/user.h
index badbc747b308..4643e020a5fe 100644
--- a/samples/client/petstore/c/model/user.h
+++ b/samples/client/petstore/c/model/user.h
@@ -32,9 +32,10 @@ typedef struct user_t {
list_t* extra; //map
openapi_petstore_preference__e preference; //referenced enum
+ int _library_owned; // Is the library responsible for freeing this object?
} user_t;
-user_t *user_create(
+__attribute__((deprecated)) user_t *user_create(
long id,
char *username,
char *first_name,
diff --git a/samples/client/petstore/c/src/apiClient.c b/samples/client/petstore/c/src/apiClient.c
index ad06a341a4bb..9995b93a8934 100644
--- a/samples/client/petstore/c/src/apiClient.c
+++ b/samples/client/petstore/c/src/apiClient.c
@@ -116,10 +116,11 @@ void sslConfig_free(sslConfig_t *sslConfig) {
free(sslConfig);
}
-static void replaceSpaceWithPlus(char *stringToProcess) {
- for(int i = 0; i < strlen(stringToProcess); i++) {
- if(stringToProcess[i] == ' ') {
- stringToProcess[i] = '+';
+static void replaceSpaceWithPlus(char *str) {
+ if (str) {
+ for (; *str; str++) {
+ if (*str == ' ')
+ *str = '+';
}
}
}
@@ -229,38 +230,26 @@ void apiClient_invoke(apiClient_t *apiClient,
if(headerType != NULL) {
list_ForEach(listEntry, headerType) {
- if(strstr((char *) listEntry->data,
- "xml") == NULL)
+ if(strstr(listEntry->data, "xml") == NULL)
{
- buffHeader = malloc(strlen(
- "Accept: ") +
- strlen((char *)
- listEntry->
- data) + 1);
- sprintf(buffHeader, "%s%s", "Accept: ",
+ buffHeader = malloc(sizeof("Accept: ") +
+ strlen(listEntry->data));
+ sprintf(buffHeader, "Accept: %s",
(char *) listEntry->data);
- headers = curl_slist_append(headers,
- buffHeader);
+ headers = curl_slist_append(headers, buffHeader);
free(buffHeader);
}
}
}
if(contentType != NULL) {
list_ForEach(listEntry, contentType) {
- if(strstr((char *) listEntry->data,
- "xml") == NULL)
+ if(strstr(listEntry->data, "xml") == NULL)
{
- buffContent =
- malloc(strlen(
- "Content-Type: ") + strlen(
- (char *)
- listEntry->data) +
- 1);
- sprintf(buffContent, "%s%s",
- "Content-Type: ",
+ buffContent = malloc(sizeof("Content-Type: ") +
+ strlen(listEntry->data));
+ sprintf(buffContent, "Content-Type: %s",
(char *) listEntry->data);
- headers = curl_slist_append(headers,
- buffContent);
+ headers = curl_slist_append(headers, buffContent);
free(buffContent);
buffContent = NULL;
}
@@ -475,8 +464,8 @@ void apiClient_invoke(apiClient_t *apiClient,
size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) {
size_t size_this_time = nmemb * size;
- apiClient_t *apiClient = (apiClient_t *)userp;
- apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
+ apiClient_t *apiClient = userp;
+ apiClient->dataReceived = realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1);
memcpy((char *)apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time);
apiClient->dataReceivedLen += size_this_time;
((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1
diff --git a/samples/client/petstore/c/src/list.c b/samples/client/petstore/c/src/list.c
index 786812158a24..7053ff122dfc 100644
--- a/samples/client/petstore/c/src/list.c
+++ b/samples/client/petstore/c/src/list.c
@@ -20,7 +20,7 @@ void listEntry_free(listEntry_t *listEntry, void *additionalData) {
}
void listEntry_printAsInt(listEntry_t *listEntry, void *additionalData) {
- printf("%i\n", *((int *) (listEntry->data)));
+ printf("%i\n", *(int *)listEntry->data);
}
list_t *list_createList() {
@@ -176,8 +176,8 @@ char* findStrInStrList(list_t *strList, const char *str)
listEntry_t* listEntry = NULL;
list_ForEach(listEntry, strList) {
- if (strstr((char*)listEntry->data, str) != NULL) {
- return (char*)listEntry->data;
+ if (strstr(listEntry->data, str) != NULL) {
+ return listEntry->data;
}
}
@@ -197,4 +197,4 @@ void clear_and_free_string_list(list_t *list)
list_item = NULL;
}
list_freeList(list);
-}
\ No newline at end of file
+}
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/.gitignore b/samples/client/petstore/csharp/httpclient/net9/Petstore/.gitignore
new file mode 100644
index 000000000000..1ee53850b84c
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/.gitignore
@@ -0,0 +1,362 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator-ignore b/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator-ignore
new file mode 100644
index 000000000000..7484ee590a38
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/.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/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/FILES b/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/FILES
new file mode 100644
index 000000000000..2d32d3d7d05e
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/FILES
@@ -0,0 +1,233 @@
+.gitignore
+Org.OpenAPITools.sln
+README.md
+api/openapi.yaml
+appveyor.yml
+docs/Activity.md
+docs/ActivityOutputElementRepresentation.md
+docs/AdditionalPropertiesClass.md
+docs/Animal.md
+docs/AnotherFakeApi.md
+docs/ApiResponse.md
+docs/Apple.md
+docs/AppleReq.md
+docs/ArrayOfArrayOfNumberOnly.md
+docs/ArrayOfNumberOnly.md
+docs/ArrayTest.md
+docs/Banana.md
+docs/BananaReq.md
+docs/BasquePig.md
+docs/Capitalization.md
+docs/Cat.md
+docs/Category.md
+docs/ChildCat.md
+docs/ClassModel.md
+docs/ComplexQuadrilateral.md
+docs/DanishPig.md
+docs/DateOnlyClass.md
+docs/DefaultApi.md
+docs/DeprecatedObject.md
+docs/Dog.md
+docs/Drawing.md
+docs/EnumArrays.md
+docs/EnumClass.md
+docs/EnumTest.md
+docs/EquilateralTriangle.md
+docs/FakeApi.md
+docs/FakeClassnameTags123Api.md
+docs/File.md
+docs/FileSchemaTestClass.md
+docs/Foo.md
+docs/FooGetDefaultResponse.md
+docs/FormatTest.md
+docs/Fruit.md
+docs/FruitReq.md
+docs/GmFruit.md
+docs/GrandparentAnimal.md
+docs/HasOnlyReadOnly.md
+docs/HealthCheckResult.md
+docs/IsoscelesTriangle.md
+docs/List.md
+docs/LiteralStringClass.md
+docs/Mammal.md
+docs/MapTest.md
+docs/MixLog.md
+docs/MixedAnyOf.md
+docs/MixedAnyOfContent.md
+docs/MixedOneOf.md
+docs/MixedOneOfContent.md
+docs/MixedPropertiesAndAdditionalPropertiesClass.md
+docs/MixedSubId.md
+docs/Model200Response.md
+docs/ModelClient.md
+docs/Name.md
+docs/NotificationtestGetElementsV1ResponseMPayload.md
+docs/NullableClass.md
+docs/NullableGuidClass.md
+docs/NullableShape.md
+docs/NumberOnly.md
+docs/ObjectWithDeprecatedFields.md
+docs/OneOfString.md
+docs/Order.md
+docs/OuterComposite.md
+docs/OuterEnum.md
+docs/OuterEnumDefaultValue.md
+docs/OuterEnumInteger.md
+docs/OuterEnumIntegerDefaultValue.md
+docs/OuterEnumTest.md
+docs/ParentPet.md
+docs/Pet.md
+docs/PetApi.md
+docs/Pig.md
+docs/PolymorphicProperty.md
+docs/Quadrilateral.md
+docs/QuadrilateralInterface.md
+docs/ReadOnlyFirst.md
+docs/RequiredClass.md
+docs/Return.md
+docs/RolesReportsHash.md
+docs/RolesReportsHashRole.md
+docs/ScaleneTriangle.md
+docs/Shape.md
+docs/ShapeInterface.md
+docs/ShapeOrNull.md
+docs/SimpleQuadrilateral.md
+docs/SpecialModelName.md
+docs/StoreApi.md
+docs/Tag.md
+docs/TestCollectionEndingWithWordList.md
+docs/TestCollectionEndingWithWordListObject.md
+docs/TestInlineFreeformAdditionalPropertiesRequest.md
+docs/Triangle.md
+docs/TriangleInterface.md
+docs/User.md
+docs/UserApi.md
+docs/Whale.md
+docs/Zebra.md
+docs/ZeroBasedEnum.md
+docs/ZeroBasedEnumClass.md
+git_push.sh
+src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+src/Org.OpenAPITools/Api/AnotherFakeApi.cs
+src/Org.OpenAPITools/Api/DefaultApi.cs
+src/Org.OpenAPITools/Api/FakeApi.cs
+src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs
+src/Org.OpenAPITools/Api/PetApi.cs
+src/Org.OpenAPITools/Api/StoreApi.cs
+src/Org.OpenAPITools/Api/UserApi.cs
+src/Org.OpenAPITools/Client/ApiClient.cs
+src/Org.OpenAPITools/Client/ApiException.cs
+src/Org.OpenAPITools/Client/ApiResponse.cs
+src/Org.OpenAPITools/Client/ClientUtils.cs
+src/Org.OpenAPITools/Client/Configuration.cs
+src/Org.OpenAPITools/Client/ExceptionFactory.cs
+src/Org.OpenAPITools/Client/FileParameter.cs
+src/Org.OpenAPITools/Client/GlobalConfiguration.cs
+src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs
+src/Org.OpenAPITools/Client/IApiAccessor.cs
+src/Org.OpenAPITools/Client/IAsynchronousClient.cs
+src/Org.OpenAPITools/Client/IReadableConfiguration.cs
+src/Org.OpenAPITools/Client/ISynchronousClient.cs
+src/Org.OpenAPITools/Client/Multimap.cs
+src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs
+src/Org.OpenAPITools/Client/RequestOptions.cs
+src/Org.OpenAPITools/Client/RetryConfiguration.cs
+src/Org.OpenAPITools/Client/WebRequestPathBuilder.cs
+src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs
+src/Org.OpenAPITools/Model/Activity.cs
+src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs
+src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs
+src/Org.OpenAPITools/Model/Animal.cs
+src/Org.OpenAPITools/Model/ApiResponse.cs
+src/Org.OpenAPITools/Model/Apple.cs
+src/Org.OpenAPITools/Model/AppleReq.cs
+src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs
+src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs
+src/Org.OpenAPITools/Model/ArrayTest.cs
+src/Org.OpenAPITools/Model/Banana.cs
+src/Org.OpenAPITools/Model/BananaReq.cs
+src/Org.OpenAPITools/Model/BasquePig.cs
+src/Org.OpenAPITools/Model/Capitalization.cs
+src/Org.OpenAPITools/Model/Cat.cs
+src/Org.OpenAPITools/Model/Category.cs
+src/Org.OpenAPITools/Model/ChildCat.cs
+src/Org.OpenAPITools/Model/ClassModel.cs
+src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs
+src/Org.OpenAPITools/Model/DanishPig.cs
+src/Org.OpenAPITools/Model/DateOnlyClass.cs
+src/Org.OpenAPITools/Model/DeprecatedObject.cs
+src/Org.OpenAPITools/Model/Dog.cs
+src/Org.OpenAPITools/Model/Drawing.cs
+src/Org.OpenAPITools/Model/EnumArrays.cs
+src/Org.OpenAPITools/Model/EnumClass.cs
+src/Org.OpenAPITools/Model/EnumTest.cs
+src/Org.OpenAPITools/Model/EquilateralTriangle.cs
+src/Org.OpenAPITools/Model/File.cs
+src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
+src/Org.OpenAPITools/Model/Foo.cs
+src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
+src/Org.OpenAPITools/Model/FormatTest.cs
+src/Org.OpenAPITools/Model/Fruit.cs
+src/Org.OpenAPITools/Model/FruitReq.cs
+src/Org.OpenAPITools/Model/GmFruit.cs
+src/Org.OpenAPITools/Model/GrandparentAnimal.cs
+src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
+src/Org.OpenAPITools/Model/HealthCheckResult.cs
+src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
+src/Org.OpenAPITools/Model/List.cs
+src/Org.OpenAPITools/Model/LiteralStringClass.cs
+src/Org.OpenAPITools/Model/Mammal.cs
+src/Org.OpenAPITools/Model/MapTest.cs
+src/Org.OpenAPITools/Model/MixLog.cs
+src/Org.OpenAPITools/Model/MixedAnyOf.cs
+src/Org.OpenAPITools/Model/MixedAnyOfContent.cs
+src/Org.OpenAPITools/Model/MixedOneOf.cs
+src/Org.OpenAPITools/Model/MixedOneOfContent.cs
+src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
+src/Org.OpenAPITools/Model/MixedSubId.cs
+src/Org.OpenAPITools/Model/Model200Response.cs
+src/Org.OpenAPITools/Model/ModelClient.cs
+src/Org.OpenAPITools/Model/Name.cs
+src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs
+src/Org.OpenAPITools/Model/NullableClass.cs
+src/Org.OpenAPITools/Model/NullableGuidClass.cs
+src/Org.OpenAPITools/Model/NullableShape.cs
+src/Org.OpenAPITools/Model/NumberOnly.cs
+src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
+src/Org.OpenAPITools/Model/OneOfString.cs
+src/Org.OpenAPITools/Model/Order.cs
+src/Org.OpenAPITools/Model/OuterComposite.cs
+src/Org.OpenAPITools/Model/OuterEnum.cs
+src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs
+src/Org.OpenAPITools/Model/OuterEnumInteger.cs
+src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs
+src/Org.OpenAPITools/Model/OuterEnumTest.cs
+src/Org.OpenAPITools/Model/ParentPet.cs
+src/Org.OpenAPITools/Model/Pet.cs
+src/Org.OpenAPITools/Model/Pig.cs
+src/Org.OpenAPITools/Model/PolymorphicProperty.cs
+src/Org.OpenAPITools/Model/Quadrilateral.cs
+src/Org.OpenAPITools/Model/QuadrilateralInterface.cs
+src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
+src/Org.OpenAPITools/Model/RequiredClass.cs
+src/Org.OpenAPITools/Model/Return.cs
+src/Org.OpenAPITools/Model/RolesReportsHash.cs
+src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
+src/Org.OpenAPITools/Model/ScaleneTriangle.cs
+src/Org.OpenAPITools/Model/Shape.cs
+src/Org.OpenAPITools/Model/ShapeInterface.cs
+src/Org.OpenAPITools/Model/ShapeOrNull.cs
+src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs
+src/Org.OpenAPITools/Model/SpecialModelName.cs
+src/Org.OpenAPITools/Model/Tag.cs
+src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs
+src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs
+src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
+src/Org.OpenAPITools/Model/Triangle.cs
+src/Org.OpenAPITools/Model/TriangleInterface.cs
+src/Org.OpenAPITools/Model/User.cs
+src/Org.OpenAPITools/Model/Whale.cs
+src/Org.OpenAPITools/Model/Zebra.cs
+src/Org.OpenAPITools/Model/ZeroBasedEnum.cs
+src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs
+src/Org.OpenAPITools/Org.OpenAPITools.csproj
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/VERSION b/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/VERSION
new file mode 100644
index 000000000000..884119126398
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.11.0-SNAPSHOT
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/Org.OpenAPITools.sln b/samples/client/petstore/csharp/httpclient/net9/Petstore/Org.OpenAPITools.sln
new file mode 100644
index 000000000000..5b15451c9dcf
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/Org.OpenAPITools.sln
@@ -0,0 +1,27 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+VisualStudioVersion = 12.0.0.0
+MinimumVisualStudioVersion = 10.0.0.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools.Test", "src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
\ No newline at end of file
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/README.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/README.md
new file mode 100644
index 000000000000..3e028cf280d8
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/README.md
@@ -0,0 +1,338 @@
+# Org.OpenAPITools - the C# library for the 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: \" \\
+
+This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: 1.0.0
+- SDK version: 1.0.0
+- Generator version: 7.11.0-SNAPSHOT
+- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
+
+
+## Frameworks supported
+
+
+## Dependencies
+
+- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later
+- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later
+- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later
+- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later
+
+The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
+```
+Install-Package Newtonsoft.Json
+Install-Package JsonSubTypes
+Install-Package System.ComponentModel.Annotations
+Install-Package CompareNETObjects
+```
+
+## Installation
+Run the following command to generate the DLL
+- [Mac/Linux] `/bin/sh build.sh`
+- [Windows] `build.bat`
+
+Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces:
+```csharp
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+```
+
+## Packaging
+
+A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages.
+
+This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly:
+
+```
+nuget pack -Build -OutputDirectory out Org.OpenAPITools.csproj
+```
+
+Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual.
+
+
+## Usage
+
+To use the API client with a HTTP proxy, setup a `System.Net.WebProxy`
+```csharp
+Configuration c = new Configuration();
+System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
+webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
+c.Proxy = webProxy;
+```
+
+### Connections
+Each ApiClass (properly the ApiClient inside it) will create an instance of HttpClient. It will use that for the entire lifecycle and dispose it when called the Dispose method.
+
+To better manager the connections it's a common practice to reuse the HttpClient and HttpClientHandler (see [here](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#issues-with-the-original-httpclient-class-available-in-net) for details). To use your own HttpClient instance just pass it to the ApiClass constructor.
+
+```csharp
+HttpClientHandler yourHandler = new HttpClientHandler();
+HttpClient yourHttpClient = new HttpClient(yourHandler);
+var api = new YourApiClass(yourHttpClient, yourHandler);
+```
+
+If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory.
+
+```csharp
+HttpClient yourHttpClient = new HttpClient();
+var api = new YourApiClass(yourHttpClient);
+```
+You'll loose some configuration settings, the features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. You need to either manually handle those in your setup of the HttpClient or they won't be available.
+
+Here an example of DI setup in a sample web project:
+
+```csharp
+services.AddHttpClient(httpClient =>
+ new PetApi(httpClient));
+```
+
+
+
+## Getting Started
+
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class Example
+ {
+ public static void Main()
+ {
+
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new AnotherFakeApi(httpClient, config, httpClientHandler);
+ var modelClient = new ModelClient(); // ModelClient | client model
+
+ try
+ {
+ // To test special tags
+ ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+
+ }
+ }
+}
+```
+
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
+*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
+*DefaultApi* | [**GetCountry**](docs/DefaultApi.md#getcountry) | **POST** /country |
+*DefaultApi* | [**Hello**](docs/DefaultApi.md#hello) | **GET** /hello | Hello
+*DefaultApi* | [**RolesReportGet**](docs/DefaultApi.md#rolesreportget) | **GET** /roles/report |
+*DefaultApi* | [**Test**](docs/DefaultApi.md#test) | **GET** /test | Retrieve an existing Notificationtest's Elements
+*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
+*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
+*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
+*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
+*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
+*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
+*FakeApi* | [**GetMixedAnyOf**](docs/FakeApi.md#getmixedanyof) | **GET** /fake/mixed/anyOf | Test mixed type anyOf deserialization
+*FakeApi* | [**GetMixedOneOf**](docs/FakeApi.md#getmixedoneof) | **GET** /fake/mixed/oneOf | Test mixed type oneOf deserialization
+*FakeApi* | [**TestAdditionalPropertiesReference**](docs/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
+*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
+*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
+*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
+*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
+*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+*FakeApi* | [**TestInlineFreeformAdditionalProperties**](docs/FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
+*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
+*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
+*FakeApi* | [**TestStringMapReference**](docs/FakeApi.md#teststringmapreference) | **POST** /fake/stringMap-reference | test referenced string map
+*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
+*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
+*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
+*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
+*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
+*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
+*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
+*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
+*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
+*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID
+*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
+*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user
+*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
+*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
+*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
+*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
+*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
+*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
+*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
+
+
+
+## Documentation for Models
+
+ - [Model.Activity](docs/Activity.md)
+ - [Model.ActivityOutputElementRepresentation](docs/ActivityOutputElementRepresentation.md)
+ - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
+ - [Model.Animal](docs/Animal.md)
+ - [Model.ApiResponse](docs/ApiResponse.md)
+ - [Model.Apple](docs/Apple.md)
+ - [Model.AppleReq](docs/AppleReq.md)
+ - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
+ - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
+ - [Model.ArrayTest](docs/ArrayTest.md)
+ - [Model.Banana](docs/Banana.md)
+ - [Model.BananaReq](docs/BananaReq.md)
+ - [Model.BasquePig](docs/BasquePig.md)
+ - [Model.Capitalization](docs/Capitalization.md)
+ - [Model.Cat](docs/Cat.md)
+ - [Model.Category](docs/Category.md)
+ - [Model.ChildCat](docs/ChildCat.md)
+ - [Model.ClassModel](docs/ClassModel.md)
+ - [Model.ComplexQuadrilateral](docs/ComplexQuadrilateral.md)
+ - [Model.DanishPig](docs/DanishPig.md)
+ - [Model.DateOnlyClass](docs/DateOnlyClass.md)
+ - [Model.DeprecatedObject](docs/DeprecatedObject.md)
+ - [Model.Dog](docs/Dog.md)
+ - [Model.Drawing](docs/Drawing.md)
+ - [Model.EnumArrays](docs/EnumArrays.md)
+ - [Model.EnumClass](docs/EnumClass.md)
+ - [Model.EnumTest](docs/EnumTest.md)
+ - [Model.EquilateralTriangle](docs/EquilateralTriangle.md)
+ - [Model.File](docs/File.md)
+ - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
+ - [Model.Foo](docs/Foo.md)
+ - [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
+ - [Model.FormatTest](docs/FormatTest.md)
+ - [Model.Fruit](docs/Fruit.md)
+ - [Model.FruitReq](docs/FruitReq.md)
+ - [Model.GmFruit](docs/GmFruit.md)
+ - [Model.GrandparentAnimal](docs/GrandparentAnimal.md)
+ - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
+ - [Model.HealthCheckResult](docs/HealthCheckResult.md)
+ - [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md)
+ - [Model.List](docs/List.md)
+ - [Model.LiteralStringClass](docs/LiteralStringClass.md)
+ - [Model.Mammal](docs/Mammal.md)
+ - [Model.MapTest](docs/MapTest.md)
+ - [Model.MixLog](docs/MixLog.md)
+ - [Model.MixedAnyOf](docs/MixedAnyOf.md)
+ - [Model.MixedAnyOfContent](docs/MixedAnyOfContent.md)
+ - [Model.MixedOneOf](docs/MixedOneOf.md)
+ - [Model.MixedOneOfContent](docs/MixedOneOfContent.md)
+ - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
+ - [Model.MixedSubId](docs/MixedSubId.md)
+ - [Model.Model200Response](docs/Model200Response.md)
+ - [Model.ModelClient](docs/ModelClient.md)
+ - [Model.Name](docs/Name.md)
+ - [Model.NotificationtestGetElementsV1ResponseMPayload](docs/NotificationtestGetElementsV1ResponseMPayload.md)
+ - [Model.NullableClass](docs/NullableClass.md)
+ - [Model.NullableGuidClass](docs/NullableGuidClass.md)
+ - [Model.NullableShape](docs/NullableShape.md)
+ - [Model.NumberOnly](docs/NumberOnly.md)
+ - [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
+ - [Model.OneOfString](docs/OneOfString.md)
+ - [Model.Order](docs/Order.md)
+ - [Model.OuterComposite](docs/OuterComposite.md)
+ - [Model.OuterEnum](docs/OuterEnum.md)
+ - [Model.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
+ - [Model.OuterEnumInteger](docs/OuterEnumInteger.md)
+ - [Model.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
+ - [Model.OuterEnumTest](docs/OuterEnumTest.md)
+ - [Model.ParentPet](docs/ParentPet.md)
+ - [Model.Pet](docs/Pet.md)
+ - [Model.Pig](docs/Pig.md)
+ - [Model.PolymorphicProperty](docs/PolymorphicProperty.md)
+ - [Model.Quadrilateral](docs/Quadrilateral.md)
+ - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md)
+ - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
+ - [Model.RequiredClass](docs/RequiredClass.md)
+ - [Model.Return](docs/Return.md)
+ - [Model.RolesReportsHash](docs/RolesReportsHash.md)
+ - [Model.RolesReportsHashRole](docs/RolesReportsHashRole.md)
+ - [Model.ScaleneTriangle](docs/ScaleneTriangle.md)
+ - [Model.Shape](docs/Shape.md)
+ - [Model.ShapeInterface](docs/ShapeInterface.md)
+ - [Model.ShapeOrNull](docs/ShapeOrNull.md)
+ - [Model.SimpleQuadrilateral](docs/SimpleQuadrilateral.md)
+ - [Model.SpecialModelName](docs/SpecialModelName.md)
+ - [Model.Tag](docs/Tag.md)
+ - [Model.TestCollectionEndingWithWordList](docs/TestCollectionEndingWithWordList.md)
+ - [Model.TestCollectionEndingWithWordListObject](docs/TestCollectionEndingWithWordListObject.md)
+ - [Model.TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
+ - [Model.Triangle](docs/Triangle.md)
+ - [Model.TriangleInterface](docs/TriangleInterface.md)
+ - [Model.User](docs/User.md)
+ - [Model.Whale](docs/Whale.md)
+ - [Model.Zebra](docs/Zebra.md)
+ - [Model.ZeroBasedEnum](docs/ZeroBasedEnum.md)
+ - [Model.ZeroBasedEnumClass](docs/ZeroBasedEnumClass.md)
+
+
+
+## Documentation for Authorization
+
+
+Authentication schemes defined for the API:
+
+### petstore_auth
+
+- **Type**: OAuth
+- **Flow**: implicit
+- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
+- **Scopes**:
+ - write:pets: modify pets in your account
+ - read:pets: read your pets
+
+
+### api_key
+
+- **Type**: API key
+- **API key parameter name**: api-key
+- **Location**: HTTP header
+
+
+### api_key_query
+
+- **Type**: API key
+- **API key parameter name**: api_key_query
+- **Location**: URL query string
+
+
+### http_basic_test
+
+- **Type**: HTTP basic authentication
+
+
+### bearer_test
+
+- **Type**: Bearer Authentication
+
+
+### http_signature_test
+
+- **Type**: HTTP signature authentication
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml
new file mode 100644
index 000000000000..780d21e19bfa
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml
@@ -0,0 +1,3088 @@
+openapi: 3.0.0
+info:
+ description: "This spec is mainly for testing Petstore server and contains fake\
+ \ endpoints, models. Please do not use this for any other purpose. Special characters:\
+ \ \" \\"
+ license:
+ name: Apache-2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+ title: OpenAPI Petstore
+ version: 1.0.0
+servers:
+- description: petstore server
+ url: "http://{server}.swagger.io:{port}/v2"
+ variables:
+ server:
+ default: petstore
+ enum:
+ - petstore
+ - qa-petstore
+ - dev-petstore
+ port:
+ default: "80"
+ enum:
+ - "80"
+ - "8080"
+- description: The local server
+ url: "https://localhost:8080/{version}"
+ variables:
+ version:
+ default: v2
+ enum:
+ - v1
+ - v2
+- description: The local server without variables
+ url: https://127.0.0.1/no_variable
+tags:
+- description: Everything about your Pets
+ name: pet
+- description: Access to Petstore orders
+ name: store
+- description: Operations about user
+ name: user
+paths:
+ /roles/report:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/RolesReport'
+ type: array
+ description: returns report
+ /hello:
+ get:
+ description: Hello
+ operationId: Hello
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ items:
+ format: uuid
+ type: string
+ type: array
+ description: UUIDs
+ summary: Hello
+ /foo:
+ get:
+ responses:
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/_foo_get_default_response'
+ description: response
+ /pet:
+ post:
+ description: ""
+ operationId: addPet
+ requestBody:
+ $ref: '#/components/requestBodies/Pet'
+ responses:
+ "405":
+ description: Invalid input
+ security:
+ - http_signature_test: []
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Add a new pet to the store
+ tags:
+ - pet
+ put:
+ description: ""
+ operationId: updatePet
+ requestBody:
+ $ref: '#/components/requestBodies/Pet'
+ responses:
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Pet not found
+ "405":
+ description: Validation exception
+ security:
+ - http_signature_test: []
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Update an existing pet
+ tags:
+ - pet
+ servers:
+ - url: http://petstore.swagger.io/v2
+ - url: http://path-server-test.petstore.local/v2
+ /pet/findByStatus:
+ get:
+ description: Multiple status values can be provided with comma separated strings
+ operationId: findPetsByStatus
+ parameters:
+ - deprecated: true
+ description: Status values that need to be considered for filter
+ explode: false
+ in: query
+ name: status
+ required: true
+ schema:
+ items:
+ default: available
+ enum:
+ - available
+ - pending
+ - sold
+ type: string
+ type: array
+ style: form
+ responses:
+ "2XX":
+ description: Anything within 200-299
+ "200":
+ content:
+ application/xml:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ description: successful operation
+ "400":
+ description: Invalid status value
+ "4XX":
+ description: Anything within 400-499
+ security:
+ - http_signature_test: []
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Finds Pets by status
+ tags:
+ - pet
+ /pet/findByTags:
+ get:
+ deprecated: true
+ description: "Multiple tags can be provided with comma separated strings. Use\
+ \ tag1, tag2, tag3 for testing."
+ operationId: findPetsByTags
+ parameters:
+ - description: Tags to filter by
+ explode: false
+ in: query
+ name: tags
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ description: successful operation
+ "400":
+ description: Invalid tag value
+ security:
+ - http_signature_test: []
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Finds Pets by tags
+ tags:
+ - pet
+ /pet/{petId}:
+ delete:
+ description: ""
+ operationId: deletePet
+ parameters:
+ - explode: false
+ in: header
+ name: api_key
+ required: false
+ schema:
+ type: string
+ style: simple
+ - description: Pet id to delete
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ responses:
+ "400":
+ description: Invalid pet value
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Deletes a pet
+ tags:
+ - pet
+ get:
+ description: Returns a single pet
+ operationId: getPetById
+ parameters:
+ - description: ID of pet to return
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: successful operation
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Pet not found
+ security:
+ - api_key: []
+ - api_key_query: []
+ summary: Find pet by ID
+ tags:
+ - pet
+ post:
+ description: ""
+ operationId: updatePetWithForm
+ parameters:
+ - description: ID of pet that needs to be updated
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/updatePetWithForm_request'
+ responses:
+ "405":
+ description: Invalid input
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Updates a pet in the store with form data
+ tags:
+ - pet
+ /pet/{petId}/uploadImage:
+ post:
+ description: ""
+ operationId: uploadFile
+ parameters:
+ - description: ID of pet to update
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/uploadFile_request'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image
+ tags:
+ - pet
+ /store/inventory:
+ get:
+ description: Returns a map of status codes to quantities
+ operationId: getInventory
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ format: int32
+ type: integer
+ type: object
+ description: successful operation
+ security:
+ - api_key: []
+ summary: Returns pet inventories by status
+ tags:
+ - store
+ /store/order:
+ post:
+ description: ""
+ operationId: placeOrder
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: order placed for purchasing the pet
+ required: true
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Order'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: successful operation
+ "400":
+ description: Invalid Order
+ summary: Place an order for a pet
+ tags:
+ - store
+ /store/order/{order_id}:
+ delete:
+ description: For valid response try integer IDs with value < 1000. Anything
+ above 1000 or nonintegers will generate API errors
+ operationId: deleteOrder
+ parameters:
+ - description: ID of the order that needs to be deleted
+ explode: false
+ in: path
+ name: order_id
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Order not found
+ summary: Delete purchase order by ID
+ tags:
+ - store
+ get:
+ description: For valid response try integer IDs with value <= 5 or > 10. Other
+ values will generate exceptions
+ operationId: getOrderById
+ parameters:
+ - description: ID of pet that needs to be fetched
+ explode: false
+ in: path
+ name: order_id
+ required: true
+ schema:
+ format: int64
+ maximum: 5
+ minimum: 1
+ type: integer
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Order'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: successful operation
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Order not found
+ summary: Find purchase order by ID
+ tags:
+ - store
+ /user:
+ post:
+ description: This can only be done by the logged in user.
+ operationId: createUser
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ description: Created user object
+ required: true
+ responses:
+ default:
+ description: successful operation
+ summary: Create user
+ tags:
+ - user
+ /user/createWithArray:
+ post:
+ description: ""
+ operationId: createUsersWithArrayInput
+ requestBody:
+ $ref: '#/components/requestBodies/UserArray'
+ responses:
+ default:
+ description: successful operation
+ summary: Creates list of users with given input array
+ tags:
+ - user
+ /user/createWithList:
+ post:
+ description: ""
+ operationId: createUsersWithListInput
+ requestBody:
+ $ref: '#/components/requestBodies/UserArray'
+ responses:
+ default:
+ description: successful operation
+ summary: Creates list of users with given input array
+ tags:
+ - user
+ /user/login:
+ get:
+ description: ""
+ operationId: loginUser
+ parameters:
+ - description: The user name for login
+ explode: true
+ in: query
+ name: username
+ required: true
+ schema:
+ type: string
+ style: form
+ - description: The password for login in clear text
+ explode: true
+ in: query
+ name: password
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ type: string
+ application/json:
+ schema:
+ type: string
+ description: successful operation
+ headers:
+ Set-Cookie:
+ description: Cookie authentication key for use with the `api_key` apiKey
+ authentication.
+ explode: false
+ schema:
+ example: AUTH_KEY=abcde12345; Path=/; HttpOnly
+ type: string
+ style: simple
+ X-Rate-Limit:
+ description: calls per hour allowed by the user
+ explode: false
+ schema:
+ format: int32
+ type: integer
+ style: simple
+ X-Expires-After:
+ description: date in UTC when token expires
+ explode: false
+ schema:
+ format: date-time
+ type: string
+ style: simple
+ "400":
+ description: Invalid username/password supplied
+ summary: Logs user into the system
+ tags:
+ - user
+ /user/logout:
+ get:
+ description: ""
+ operationId: logoutUser
+ responses:
+ default:
+ description: successful operation
+ summary: Logs out current logged in user session
+ tags:
+ - user
+ /user/{username}:
+ delete:
+ description: This can only be done by the logged in user.
+ operationId: deleteUser
+ parameters:
+ - description: The name that needs to be deleted
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ summary: Delete user
+ tags:
+ - user
+ get:
+ description: ""
+ operationId: getUserByName
+ parameters:
+ - description: The name that needs to be fetched. Use user1 for testing.
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/User'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ description: successful operation
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ "598":
+ description: Not a real HTTP status code
+ "599":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ description: Not a real HTTP status code with a return object
+ summary: Get user by user name
+ tags:
+ - user
+ put:
+ description: This can only be done by the logged in user.
+ operationId: updateUser
+ parameters:
+ - description: name that need to be deleted
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ description: Updated user object
+ required: true
+ responses:
+ "400":
+ description: Invalid user supplied
+ "404":
+ description: User not found
+ summary: Updated user
+ tags:
+ - user
+ /fake_classname_test:
+ patch:
+ description: To test class name in snake case
+ operationId: testClassname
+ requestBody:
+ $ref: '#/components/requestBodies/Client'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ security:
+ - api_key_query: []
+ summary: To test class name in snake case
+ tags:
+ - fake_classname_tags 123#$%^
+ /fake:
+ delete:
+ description: Fake endpoint to test group parameters (optional)
+ operationId: testGroupParameters
+ parameters:
+ - description: Required String in group parameters
+ explode: true
+ in: query
+ name: required_string_group
+ required: true
+ schema:
+ type: integer
+ style: form
+ - description: Required Boolean in group parameters
+ explode: false
+ in: header
+ name: required_boolean_group
+ required: true
+ schema:
+ type: boolean
+ style: simple
+ - description: Required Integer in group parameters
+ explode: true
+ in: query
+ name: required_int64_group
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: form
+ - description: String in group parameters
+ explode: true
+ in: query
+ name: string_group
+ required: false
+ schema:
+ type: integer
+ style: form
+ - description: Boolean in group parameters
+ explode: false
+ in: header
+ name: boolean_group
+ required: false
+ schema:
+ type: boolean
+ style: simple
+ - description: Integer in group parameters
+ explode: true
+ in: query
+ name: int64_group
+ required: false
+ schema:
+ format: int64
+ type: integer
+ style: form
+ responses:
+ "400":
+ description: Something wrong
+ security:
+ - bearer_test: []
+ summary: Fake endpoint to test group parameters (optional)
+ tags:
+ - fake
+ x-group-parameters: true
+ get:
+ description: To test enum parameters
+ operationId: testEnumParameters
+ parameters:
+ - description: Header parameter enum test (string array)
+ explode: false
+ in: header
+ name: enum_header_string_array
+ required: false
+ schema:
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ style: simple
+ - description: Header parameter enum test (string)
+ explode: false
+ in: header
+ name: enum_header_string
+ required: false
+ schema:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ style: simple
+ - description: Query parameter enum test (string array)
+ explode: true
+ in: query
+ name: enum_query_string_array
+ required: false
+ schema:
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ style: form
+ - description: Query parameter enum test (string)
+ explode: true
+ in: query
+ name: enum_query_string
+ required: false
+ schema:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ style: form
+ - description: Query parameter enum test (double)
+ explode: true
+ in: query
+ name: enum_query_integer
+ required: false
+ schema:
+ enum:
+ - 1
+ - -2
+ format: int32
+ type: integer
+ style: form
+ - description: Query parameter enum test (double)
+ explode: true
+ in: query
+ name: enum_query_double
+ required: false
+ schema:
+ enum:
+ - 1.1
+ - -1.2
+ format: double
+ type: number
+ style: form
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/testEnumParameters_request'
+ responses:
+ "400":
+ description: Invalid request
+ "404":
+ description: Not found
+ summary: To test enum parameters
+ tags:
+ - fake
+ patch:
+ description: To test "client" model
+ operationId: testClientModel
+ requestBody:
+ $ref: '#/components/requestBodies/Client'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ summary: To test "client" model
+ tags:
+ - fake
+ post:
+ description: |
+ Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ operationId: testEndpointParameters
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/testEndpointParameters_request'
+ responses:
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ security:
+ - http_basic_test: []
+ summary: |
+ Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ tags:
+ - fake
+ /fake/outer/number:
+ post:
+ description: Test serialization of outer number types
+ operationId: fakeOuterNumberSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OuterNumber'
+ description: Input number as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterNumber'
+ description: Output number
+ tags:
+ - fake
+ /fake/outer/string:
+ post:
+ description: Test serialization of outer string types
+ operationId: fakeOuterStringSerialize
+ parameters:
+ - description: Required UUID String
+ explode: true
+ in: query
+ name: required_string_uuid
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: form
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OuterString'
+ description: Input string as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterString'
+ description: Output string
+ tags:
+ - fake
+ /fake/outer/boolean:
+ post:
+ description: Test serialization of outer boolean types
+ operationId: fakeOuterBooleanSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OuterBoolean'
+ description: Input boolean as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterBoolean'
+ description: Output boolean
+ tags:
+ - fake
+ /fake/outer/composite:
+ post:
+ description: Test serialization of object with outer number type
+ operationId: fakeOuterCompositeSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OuterComposite'
+ description: Input composite as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterComposite'
+ description: Output composite
+ tags:
+ - fake
+ /fake/jsonFormData:
+ get:
+ description: ""
+ operationId: testJsonFormData
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/testJsonFormData_request'
+ responses:
+ "200":
+ description: successful operation
+ summary: test json serialization of form data
+ tags:
+ - fake
+ /fake/additionalProperties-reference:
+ post:
+ description: ""
+ operationId: testAdditionalPropertiesReference
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FreeFormObject'
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test referenced additionalProperties
+ tags:
+ - fake
+ /fake/stringMap-reference:
+ post:
+ description: ""
+ operationId: testStringMapReference
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MapOfString'
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test referenced string map
+ tags:
+ - fake
+ /fake/inline-additionalProperties:
+ post:
+ description: ""
+ operationId: testInlineAdditionalProperties
+ requestBody:
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ type: string
+ type: object
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test inline additionalProperties
+ tags:
+ - fake
+ /fake/inline-freeform-additionalProperties:
+ post:
+ description: ""
+ operationId: testInlineFreeformAdditionalProperties
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request'
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test inline free-form additionalProperties
+ tags:
+ - fake
+ /fake/body-with-query-params:
+ put:
+ operationId: testBodyWithQueryParams
+ parameters:
+ - explode: true
+ in: query
+ name: query
+ required: true
+ schema:
+ type: string
+ style: form
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ required: true
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ /another-fake/dummy:
+ patch:
+ description: To test special tags and operation ID starting with number
+ operationId: 123_test_@#$%_special_tags
+ requestBody:
+ $ref: '#/components/requestBodies/Client'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ summary: To test special tags
+ tags:
+ - $another-fake?
+ /fake/body-with-file-schema:
+ put:
+ description: "For this test, the body for this request much reference a schema\
+ \ named `File`."
+ operationId: testBodyWithFileSchema
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FileSchemaTestClass'
+ required: true
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ /fake/test-query-parameters:
+ put:
+ description: To test the collection format in query parameters
+ operationId: testQueryParameterCollectionFormat
+ parameters:
+ - explode: true
+ in: query
+ name: pipe
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: false
+ in: query
+ name: ioutil
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: false
+ in: query
+ name: http
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: spaceDelimited
+ - explode: false
+ in: query
+ name: url
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: true
+ in: query
+ name: context
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: true
+ in: query
+ name: requiredNotNullable
+ required: true
+ schema:
+ nullable: false
+ type: string
+ style: form
+ - explode: true
+ in: query
+ name: requiredNullable
+ required: true
+ schema:
+ nullable: true
+ type: string
+ style: form
+ - explode: true
+ in: query
+ name: notRequiredNotNullable
+ required: false
+ schema:
+ nullable: false
+ type: string
+ style: form
+ - explode: true
+ in: query
+ name: notRequiredNullable
+ required: false
+ schema:
+ nullable: true
+ type: string
+ style: form
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ description: ""
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/uploadFileWithRequiredFile_request'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image (required)
+ tags:
+ - pet
+ /fake/health:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HealthCheckResult'
+ description: The instance started successfully
+ summary: Health check endpoint
+ tags:
+ - fake
+ /fake/array-of-enums:
+ get:
+ operationId: getArrayOfEnums
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfEnums'
+ description: Got named array of enums
+ summary: Array of Enums
+ tags:
+ - fake
+ /fake/mixed/anyOf:
+ get:
+ operationId: getMixedAnyOf
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MixedAnyOf'
+ description: Got mixed anyOf
+ summary: Test mixed type anyOf deserialization
+ tags:
+ - fake
+ /fake/mixed/oneOf:
+ get:
+ operationId: getMixedOneOf
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MixedOneOf'
+ description: Got mixed oneOf
+ summary: Test mixed type oneOf deserialization
+ tags:
+ - fake
+ /country:
+ post:
+ operationId: getCountry
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/getCountry_request'
+ responses:
+ "200":
+ description: OK
+ /test:
+ get:
+ operationId: Test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/notificationtest-getElements-v1-Response-mPayload'
+ description: Successful response
+ summary: Retrieve an existing Notificationtest's Elements
+components:
+ requestBodies:
+ UserArray:
+ content:
+ application/json:
+ examples:
+ simple-list:
+ description: Should not get into code examples
+ summary: Simple list example
+ value:
+ - username: foo
+ - username: bar
+ schema:
+ items:
+ $ref: '#/components/schemas/User'
+ type: array
+ description: List of user object
+ required: true
+ Client:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: client model
+ required: true
+ Pet:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: Pet object that needs to be added to the store
+ required: true
+ schemas:
+ RolesReport:
+ description: Roles report
+ items:
+ $ref: '#/components/schemas/RolesReportsHash'
+ type: array
+ RolesReportsHash:
+ description: Role report Hash
+ example:
+ role:
+ name: name
+ role_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
+ properties:
+ role_uuid:
+ format: uuid
+ type: string
+ role:
+ $ref: '#/components/schemas/RolesReportsHash_role'
+ type: object
+ Foo:
+ example:
+ bar: bar
+ properties:
+ bar:
+ default: bar
+ type: string
+ type: object
+ Bar:
+ default: bar
+ type: string
+ Order:
+ example:
+ petId: 6
+ quantity: 1
+ id: 0
+ shipDate: 2020-02-02T20:20:20.000222Z
+ complete: false
+ status: placed
+ properties:
+ id:
+ format: int64
+ type: integer
+ petId:
+ format: int64
+ type: integer
+ quantity:
+ format: int32
+ type: integer
+ shipDate:
+ example: 2020-02-02T20:20:20.000222Z
+ format: date-time
+ type: string
+ status:
+ description: Order Status
+ enum:
+ - placed
+ - approved
+ - delivered
+ type: string
+ complete:
+ default: false
+ type: boolean
+ type: object
+ xml:
+ name: Order
+ Category:
+ example:
+ name: default-name
+ id: 6
+ properties:
+ id:
+ format: int64
+ type: integer
+ name:
+ default: default-name
+ type: string
+ required:
+ - name
+ type: object
+ xml:
+ name: Category
+ User:
+ example:
+ firstName: firstName
+ lastName: lastName
+ password: password
+ userStatus: 6
+ objectWithNoDeclaredPropsNullable: "{}"
+ phone: phone
+ objectWithNoDeclaredProps: "{}"
+ id: 0
+ anyTypePropNullable: ""
+ email: email
+ anyTypeProp: ""
+ username: username
+ properties:
+ id:
+ format: int64
+ type: integer
+ x-is-unique: true
+ username:
+ type: string
+ firstName:
+ type: string
+ lastName:
+ type: string
+ email:
+ type: string
+ password:
+ type: string
+ phone:
+ type: string
+ userStatus:
+ description: User Status
+ format: int32
+ type: integer
+ objectWithNoDeclaredProps:
+ description: test code generation for objects Value must be a map of strings
+ to values. It cannot be the 'null' value.
+ type: object
+ objectWithNoDeclaredPropsNullable:
+ description: test code generation for nullable objects. Value must be a
+ map of strings to values or the 'null' value.
+ nullable: true
+ type: object
+ anyTypeProp:
+ description: "test code generation for any type Here the 'type' attribute\
+ \ is not specified, which means the value can be anything, including the\
+ \ null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389"
+ anyTypePropNullable:
+ description: "test code generation for any type Here the 'type' attribute\
+ \ is not specified, which means the value can be anything, including the\
+ \ null value, string, number, boolean, array or object. The 'nullable'\
+ \ attribute does not change the allowed values."
+ nullable: true
+ type: object
+ xml:
+ name: User
+ Tag:
+ example:
+ name: name
+ id: 1
+ properties:
+ id:
+ format: int64
+ type: integer
+ name:
+ type: string
+ type: object
+ xml:
+ name: Tag
+ Pet:
+ example:
+ photoUrls:
+ - photoUrls
+ - photoUrls
+ name: doggie
+ id: 0
+ category:
+ name: default-name
+ id: 6
+ tags:
+ - name: name
+ id: 1
+ - name: name
+ id: 1
+ status: available
+ properties:
+ id:
+ format: int64
+ type: integer
+ x-is-unique: true
+ category:
+ $ref: '#/components/schemas/Category'
+ name:
+ example: doggie
+ type: string
+ photoUrls:
+ items:
+ type: string
+ type: array
+ xml:
+ name: photoUrl
+ wrapped: true
+ tags:
+ items:
+ $ref: '#/components/schemas/Tag'
+ type: array
+ xml:
+ name: tag
+ wrapped: true
+ status:
+ description: pet status in the store
+ enum:
+ - available
+ - pending
+ - sold
+ type: string
+ required:
+ - name
+ - photoUrls
+ type: object
+ xml:
+ name: Pet
+ ApiResponse:
+ example:
+ code: 0
+ type: type
+ message: message
+ properties:
+ code:
+ format: int32
+ type: integer
+ type:
+ type: string
+ message:
+ type: string
+ type: object
+ Return:
+ description: Model for testing reserved words
+ properties:
+ return:
+ format: int32
+ type: integer
+ lock:
+ type: string
+ abstract:
+ nullable: true
+ type: string
+ unsafe:
+ type: string
+ required:
+ - abstract
+ - lock
+ xml:
+ name: Return
+ Name:
+ description: Model for testing model name same as property name
+ properties:
+ name:
+ format: int32
+ type: integer
+ snake_case:
+ format: int32
+ readOnly: true
+ type: integer
+ property:
+ type: string
+ "123Number":
+ readOnly: true
+ type: integer
+ required:
+ - name
+ xml:
+ name: Name
+ "200_response":
+ description: Model for testing model name starting with number
+ properties:
+ name:
+ format: int32
+ type: integer
+ class:
+ type: string
+ xml:
+ name: Name
+ ClassModel:
+ description: Model for testing model with "_class" property
+ properties:
+ _class:
+ type: string
+ Dog:
+ allOf:
+ - $ref: '#/components/schemas/Animal'
+ - properties:
+ breed:
+ type: string
+ type: object
+ Cat:
+ allOf:
+ - $ref: '#/components/schemas/Animal'
+ - $ref: '#/components/schemas/Address'
+ - properties:
+ declawed:
+ type: boolean
+ type: object
+ Address:
+ additionalProperties:
+ type: integer
+ type: object
+ Animal:
+ discriminator:
+ propertyName: className
+ properties:
+ className:
+ type: string
+ color:
+ default: red
+ type: string
+ required:
+ - className
+ type: object
+ AnimalFarm:
+ items:
+ $ref: '#/components/schemas/Animal'
+ type: array
+ format_test:
+ properties:
+ integer:
+ maximum: 100
+ minimum: 10
+ multipleOf: 2
+ type: integer
+ int32:
+ format: int32
+ maximum: 200
+ minimum: 20
+ type: integer
+ int32Range:
+ maximum: 2147483647
+ minimum: -2147483648
+ type: integer
+ int64Positive:
+ minimum: 2147483648
+ type: integer
+ int64Negative:
+ maximum: -2147483649
+ type: integer
+ int64PositiveExclusive:
+ exclusiveMinimum: true
+ minimum: 2147483647
+ type: integer
+ int64NegativeExclusive:
+ exclusiveMaximum: true
+ maximum: -2147483648
+ type: integer
+ unsigned_integer:
+ format: int32
+ maximum: 200
+ minimum: 20
+ type: integer
+ x-unsigned: true
+ int64:
+ format: int64
+ type: integer
+ unsigned_long:
+ format: int64
+ type: integer
+ x-unsigned: true
+ number:
+ maximum: 543.2
+ minimum: 32.1
+ multipleOf: 32.5
+ type: number
+ float:
+ format: float
+ maximum: 987.6
+ minimum: 54.3
+ type: number
+ double:
+ format: double
+ maximum: 123.4
+ minimum: 67.8
+ type: number
+ decimal:
+ format: number
+ type: string
+ string:
+ pattern: "/[a-z]/i"
+ type: string
+ byte:
+ format: byte
+ type: string
+ binary:
+ format: binary
+ type: string
+ date:
+ example: 2020-02-02
+ format: date
+ type: string
+ dateTime:
+ example: 2007-12-03T10:15:30+01:00
+ format: date-time
+ type: string
+ uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ type: string
+ password:
+ format: password
+ maxLength: 64
+ minLength: 10
+ type: string
+ pattern_with_digits:
+ description: A string that is a 10 digit number. Can have leading zeros.
+ pattern: "^\\d{10}$"
+ type: string
+ pattern_with_digits_and_delimiter:
+ description: A string starting with 'image_' (case insensitive) and one
+ to three digits following i.e. Image_01.
+ pattern: "/^image_\\d{1,3}$/i"
+ type: string
+ pattern_with_backslash:
+ description: None
+ pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\\
+ /([0-9]|[1-2][0-9]|3[0-2]))$"
+ type: string
+ required:
+ - byte
+ - date
+ - number
+ - password
+ type: object
+ EnumClass:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ Outer_Enum_Test:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ type: string
+ Enum_Test:
+ properties:
+ enum_string:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ type: string
+ enum_string_required:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ type: string
+ enum_integer:
+ enum:
+ - 1
+ - -1
+ format: int32
+ type: integer
+ enum_integer_only:
+ enum:
+ - 2
+ - -2
+ type: integer
+ enum_number:
+ enum:
+ - 1.1
+ - -1.2
+ format: double
+ type: number
+ outerEnum:
+ $ref: '#/components/schemas/OuterEnum'
+ outerEnumInteger:
+ $ref: '#/components/schemas/OuterEnumInteger'
+ outerEnumDefaultValue:
+ $ref: '#/components/schemas/OuterEnumDefaultValue'
+ outerEnumIntegerDefaultValue:
+ $ref: '#/components/schemas/OuterEnumIntegerDefaultValue'
+ required:
+ - enum_string_required
+ type: object
+ AdditionalPropertiesClass:
+ properties:
+ map_property:
+ additionalProperties:
+ type: string
+ type: object
+ map_of_map_property:
+ additionalProperties:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ anytype_1: {}
+ map_with_undeclared_properties_anytype_1:
+ type: object
+ map_with_undeclared_properties_anytype_2:
+ properties: {}
+ type: object
+ map_with_undeclared_properties_anytype_3:
+ additionalProperties: true
+ type: object
+ empty_map:
+ additionalProperties: false
+ description: "an object with no declared properties and no undeclared properties,\
+ \ hence it's an empty map."
+ type: object
+ map_with_undeclared_properties_string:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ MixedPropertiesAndAdditionalPropertiesClass:
+ properties:
+ uuid_with_pattern:
+ format: uuid
+ pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
+ type: string
+ uuid:
+ format: uuid
+ type: string
+ dateTime:
+ format: date-time
+ type: string
+ map:
+ additionalProperties:
+ $ref: '#/components/schemas/Animal'
+ type: object
+ type: object
+ List:
+ properties:
+ "123-list":
+ type: string
+ type: object
+ Client:
+ example:
+ client: client
+ properties:
+ client:
+ type: string
+ type: object
+ ReadOnlyFirst:
+ properties:
+ bar:
+ readOnly: true
+ type: string
+ baz:
+ type: string
+ type: object
+ hasOnlyReadOnly:
+ properties:
+ bar:
+ readOnly: true
+ type: string
+ foo:
+ readOnly: true
+ type: string
+ type: object
+ Capitalization:
+ properties:
+ smallCamel:
+ type: string
+ CapitalCamel:
+ type: string
+ small_Snake:
+ type: string
+ Capital_Snake:
+ type: string
+ SCA_ETH_Flow_Points:
+ type: string
+ ATT_NAME:
+ description: |
+ Name of the pet
+ type: string
+ type: object
+ MapTest:
+ properties:
+ map_map_of_string:
+ additionalProperties:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ map_of_enum_string:
+ additionalProperties:
+ enum:
+ - UPPER
+ - lower
+ type: string
+ type: object
+ direct_map:
+ additionalProperties:
+ type: boolean
+ type: object
+ indirect_map:
+ additionalProperties:
+ type: boolean
+ type: object
+ type: object
+ ArrayTest:
+ properties:
+ array_of_string:
+ items:
+ type: string
+ type: array
+ array_array_of_integer:
+ items:
+ items:
+ format: int64
+ type: integer
+ type: array
+ type: array
+ array_array_of_model:
+ items:
+ items:
+ $ref: '#/components/schemas/ReadOnlyFirst'
+ type: array
+ type: array
+ type: object
+ NumberOnly:
+ properties:
+ JustNumber:
+ type: number
+ type: object
+ x-cls-compliant: true
+ x-com-visible: true
+ ArrayOfNumberOnly:
+ properties:
+ ArrayNumber:
+ items:
+ type: number
+ type: array
+ type: object
+ ArrayOfArrayOfNumberOnly:
+ properties:
+ ArrayArrayNumber:
+ items:
+ items:
+ type: number
+ type: array
+ type: array
+ type: object
+ EnumArrays:
+ properties:
+ just_symbol:
+ enum:
+ - '>='
+ - $
+ type: string
+ array_enum:
+ items:
+ enum:
+ - fish
+ - crab
+ type: string
+ type: array
+ type: object
+ FreeFormObject:
+ additionalProperties: true
+ description: A schema consisting only of additional properties
+ type: object
+ MapOfString:
+ additionalProperties:
+ type: string
+ description: A schema consisting only of additional properties of type string
+ type: object
+ OuterEnum:
+ enum:
+ - placed
+ - approved
+ - delivered
+ nullable: true
+ type: string
+ OuterEnumInteger:
+ enum:
+ - 0
+ - 1
+ - 2
+ type: integer
+ OuterEnumDefaultValue:
+ default: placed
+ enum:
+ - placed
+ - approved
+ - delivered
+ type: string
+ OuterEnumIntegerDefaultValue:
+ default: 0
+ enum:
+ - 0
+ - 1
+ - 2
+ type: integer
+ OuterComposite:
+ example:
+ my_string: my_string
+ my_number: 0.8008281904610115
+ my_boolean: true
+ properties:
+ my_number:
+ type: number
+ my_string:
+ type: string
+ my_boolean:
+ type: boolean
+ x-codegen-body-parameter-name: boolean_post_body
+ type: object
+ OuterNumber:
+ type: number
+ OuterString:
+ type: string
+ OuterBoolean:
+ type: boolean
+ x-codegen-body-parameter-name: boolean_post_body
+ StringBooleanMap:
+ additionalProperties:
+ type: boolean
+ type: object
+ FileSchemaTestClass:
+ example:
+ file:
+ sourceURI: sourceURI
+ files:
+ - sourceURI: sourceURI
+ - sourceURI: sourceURI
+ properties:
+ file:
+ $ref: '#/components/schemas/File'
+ files:
+ items:
+ $ref: '#/components/schemas/File'
+ type: array
+ type: object
+ File:
+ description: Must be named `File` for test.
+ example:
+ sourceURI: sourceURI
+ properties:
+ sourceURI:
+ description: Test capitalization
+ type: string
+ type: object
+ _special_model.name_:
+ properties:
+ $special[property.name]:
+ format: int64
+ type: integer
+ _special_model.name_:
+ type: string
+ xml:
+ name: "$special[model.name]"
+ HealthCheckResult:
+ description: Just a string to inform instance is up and running. Make it nullable
+ in hope to get it as pointer in generated model.
+ example:
+ NullableMessage: NullableMessage
+ properties:
+ NullableMessage:
+ nullable: true
+ type: string
+ type: object
+ RequiredClass:
+ properties:
+ required_nullable_integer_prop:
+ nullable: true
+ type: integer
+ required_notnullableinteger_prop:
+ nullable: false
+ type: integer
+ not_required_nullable_integer_prop:
+ nullable: true
+ type: integer
+ not_required_notnullableinteger_prop:
+ nullable: false
+ type: integer
+ required_nullable_string_prop:
+ nullable: true
+ type: string
+ required_notnullable_string_prop:
+ nullable: false
+ type: string
+ notrequired_nullable_string_prop:
+ nullable: true
+ type: string
+ notrequired_notnullable_string_prop:
+ nullable: false
+ type: string
+ required_nullable_boolean_prop:
+ nullable: true
+ type: boolean
+ required_notnullable_boolean_prop:
+ nullable: false
+ type: boolean
+ notrequired_nullable_boolean_prop:
+ nullable: true
+ type: boolean
+ notrequired_notnullable_boolean_prop:
+ nullable: false
+ type: boolean
+ required_nullable_date_prop:
+ format: date
+ nullable: true
+ type: string
+ required_not_nullable_date_prop:
+ format: date
+ nullable: false
+ type: string
+ not_required_nullable_date_prop:
+ format: date
+ nullable: true
+ type: string
+ not_required_notnullable_date_prop:
+ format: date
+ nullable: false
+ type: string
+ required_notnullable_datetime_prop:
+ format: date-time
+ nullable: false
+ type: string
+ required_nullable_datetime_prop:
+ format: date-time
+ nullable: true
+ type: string
+ notrequired_nullable_datetime_prop:
+ format: date-time
+ nullable: true
+ type: string
+ notrequired_notnullable_datetime_prop:
+ format: date-time
+ nullable: false
+ type: string
+ required_nullable_enum_integer:
+ enum:
+ - 1
+ - -1
+ format: int32
+ nullable: true
+ type: integer
+ required_notnullable_enum_integer:
+ enum:
+ - 1
+ - -1
+ format: int32
+ nullable: false
+ type: integer
+ notrequired_nullable_enum_integer:
+ enum:
+ - 1
+ - -1
+ format: int32
+ nullable: true
+ type: integer
+ notrequired_notnullable_enum_integer:
+ enum:
+ - 1
+ - -1
+ format: int32
+ nullable: false
+ type: integer
+ required_nullable_enum_integer_only:
+ enum:
+ - 2
+ - -2
+ nullable: true
+ type: integer
+ required_notnullable_enum_integer_only:
+ enum:
+ - 2
+ - -2
+ nullable: false
+ type: integer
+ notrequired_nullable_enum_integer_only:
+ enum:
+ - 2
+ - -2
+ nullable: true
+ type: integer
+ notrequired_notnullable_enum_integer_only:
+ enum:
+ - 2
+ - -2
+ nullable: false
+ type: integer
+ required_notnullable_enum_string:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ nullable: false
+ type: string
+ required_nullable_enum_string:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ nullable: true
+ type: string
+ notrequired_nullable_enum_string:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ nullable: true
+ type: string
+ notrequired_notnullable_enum_string:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ nullable: false
+ type: string
+ required_nullable_outerEnumDefaultValue:
+ allOf:
+ - $ref: '#/components/schemas/OuterEnumDefaultValue'
+ nullable: true
+ required_notnullable_outerEnumDefaultValue:
+ allOf:
+ - $ref: '#/components/schemas/OuterEnumDefaultValue'
+ nullable: false
+ notrequired_nullable_outerEnumDefaultValue:
+ allOf:
+ - $ref: '#/components/schemas/OuterEnumDefaultValue'
+ nullable: true
+ notrequired_notnullable_outerEnumDefaultValue:
+ allOf:
+ - $ref: '#/components/schemas/OuterEnumDefaultValue'
+ nullable: false
+ required_nullable_uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ nullable: true
+ type: string
+ required_notnullable_uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ nullable: false
+ type: string
+ notrequired_nullable_uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ nullable: true
+ type: string
+ notrequired_notnullable_uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ nullable: false
+ type: string
+ required_nullable_array_of_string:
+ items:
+ type: string
+ nullable: true
+ type: array
+ required_notnullable_array_of_string:
+ items:
+ type: string
+ nullable: false
+ type: array
+ notrequired_nullable_array_of_string:
+ items:
+ type: string
+ nullable: true
+ type: array
+ notrequired_notnullable_array_of_string:
+ items:
+ type: string
+ nullable: false
+ type: array
+ required:
+ - required_not_nullable_date_prop
+ - required_notnullable_array_of_string
+ - required_notnullable_boolean_prop
+ - required_notnullable_datetime_prop
+ - required_notnullable_enum_integer
+ - required_notnullable_enum_integer_only
+ - required_notnullable_enum_string
+ - required_notnullable_outerEnumDefaultValue
+ - required_notnullable_string_prop
+ - required_notnullable_uuid
+ - required_notnullableinteger_prop
+ - required_nullable_array_of_string
+ - required_nullable_boolean_prop
+ - required_nullable_date_prop
+ - required_nullable_datetime_prop
+ - required_nullable_enum_integer
+ - required_nullable_enum_integer_only
+ - required_nullable_enum_string
+ - required_nullable_integer_prop
+ - required_nullable_outerEnumDefaultValue
+ - required_nullable_string_prop
+ - required_nullable_uuid
+ type: object
+ NullableClass:
+ additionalProperties:
+ nullable: true
+ type: object
+ properties:
+ integer_prop:
+ nullable: true
+ type: integer
+ number_prop:
+ nullable: true
+ type: number
+ boolean_prop:
+ nullable: true
+ type: boolean
+ string_prop:
+ nullable: true
+ type: string
+ date_prop:
+ format: date
+ nullable: true
+ type: string
+ datetime_prop:
+ format: date-time
+ nullable: true
+ type: string
+ array_nullable_prop:
+ items:
+ type: object
+ nullable: true
+ type: array
+ array_and_items_nullable_prop:
+ items:
+ nullable: true
+ type: object
+ nullable: true
+ type: array
+ array_items_nullable:
+ items:
+ nullable: true
+ type: object
+ type: array
+ object_nullable_prop:
+ additionalProperties:
+ type: object
+ nullable: true
+ type: object
+ object_and_items_nullable_prop:
+ additionalProperties:
+ nullable: true
+ type: object
+ nullable: true
+ type: object
+ object_items_nullable:
+ additionalProperties:
+ nullable: true
+ type: object
+ type: object
+ type: object
+ fruit:
+ additionalProperties: false
+ oneOf:
+ - $ref: '#/components/schemas/apple'
+ - $ref: '#/components/schemas/banana'
+ properties:
+ color:
+ type: string
+ apple:
+ nullable: true
+ properties:
+ cultivar:
+ pattern: "^[a-zA-Z\\s]*$"
+ type: string
+ origin:
+ pattern: "/^[A-Z\\s]*$/i"
+ type: string
+ color_code:
+ pattern: "^#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})$"
+ type: string
+ type: object
+ banana:
+ properties:
+ lengthCm:
+ type: number
+ type: object
+ mammal:
+ discriminator:
+ propertyName: className
+ oneOf:
+ - $ref: '#/components/schemas/whale'
+ - $ref: '#/components/schemas/zebra'
+ - $ref: '#/components/schemas/Pig'
+ whale:
+ properties:
+ hasBaleen:
+ type: boolean
+ hasTeeth:
+ type: boolean
+ className:
+ type: string
+ required:
+ - className
+ type: object
+ zebra:
+ additionalProperties: true
+ properties:
+ type:
+ enum:
+ - plains
+ - mountain
+ - grevys
+ type: string
+ className:
+ type: string
+ required:
+ - className
+ type: object
+ Pig:
+ discriminator:
+ propertyName: className
+ oneOf:
+ - $ref: '#/components/schemas/BasquePig'
+ - $ref: '#/components/schemas/DanishPig'
+ BasquePig:
+ properties:
+ className:
+ type: string
+ required:
+ - className
+ type: object
+ DanishPig:
+ properties:
+ className:
+ type: string
+ required:
+ - className
+ type: object
+ gmFruit:
+ additionalProperties: false
+ anyOf:
+ - $ref: '#/components/schemas/apple'
+ - $ref: '#/components/schemas/banana'
+ properties:
+ color:
+ type: string
+ fruitReq:
+ additionalProperties: false
+ nullable: true
+ oneOf:
+ - $ref: '#/components/schemas/appleReq'
+ - $ref: '#/components/schemas/bananaReq'
+ appleReq:
+ additionalProperties: false
+ properties:
+ cultivar:
+ type: string
+ mealy:
+ type: boolean
+ required:
+ - cultivar
+ type: object
+ bananaReq:
+ additionalProperties: false
+ properties:
+ lengthCm:
+ type: number
+ sweet:
+ type: boolean
+ required:
+ - lengthCm
+ type: object
+ Drawing:
+ additionalProperties:
+ $ref: '#/components/schemas/fruit'
+ properties:
+ mainShape:
+ $ref: '#/components/schemas/Shape'
+ shapeOrNull:
+ $ref: '#/components/schemas/ShapeOrNull'
+ nullableShape:
+ $ref: '#/components/schemas/NullableShape'
+ shapes:
+ items:
+ $ref: '#/components/schemas/Shape'
+ type: array
+ type: object
+ Shape:
+ discriminator:
+ propertyName: shapeType
+ oneOf:
+ - $ref: '#/components/schemas/Triangle'
+ - $ref: '#/components/schemas/Quadrilateral'
+ ShapeOrNull:
+ description: The value may be a shape or the 'null' value. This is introduced
+ in OAS schema >= 3.1.
+ discriminator:
+ propertyName: shapeType
+ nullable: true
+ oneOf:
+ - $ref: '#/components/schemas/Triangle'
+ - $ref: '#/components/schemas/Quadrilateral'
+ NullableShape:
+ description: The value may be a shape or the 'null' value. The 'nullable' attribute
+ was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema
+ >= 3.1.
+ discriminator:
+ propertyName: shapeType
+ nullable: true
+ oneOf:
+ - $ref: '#/components/schemas/Triangle'
+ - $ref: '#/components/schemas/Quadrilateral'
+ ShapeInterface:
+ properties:
+ shapeType:
+ type: string
+ required:
+ - shapeType
+ TriangleInterface:
+ properties:
+ triangleType:
+ type: string
+ required:
+ - triangleType
+ Triangle:
+ discriminator:
+ propertyName: triangleType
+ oneOf:
+ - $ref: '#/components/schemas/EquilateralTriangle'
+ - $ref: '#/components/schemas/IsoscelesTriangle'
+ - $ref: '#/components/schemas/ScaleneTriangle'
+ EquilateralTriangle:
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/TriangleInterface'
+ IsoscelesTriangle:
+ additionalProperties: false
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/TriangleInterface'
+ ScaleneTriangle:
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/TriangleInterface'
+ QuadrilateralInterface:
+ properties:
+ quadrilateralType:
+ type: string
+ required:
+ - quadrilateralType
+ Quadrilateral:
+ discriminator:
+ propertyName: quadrilateralType
+ oneOf:
+ - $ref: '#/components/schemas/SimpleQuadrilateral'
+ - $ref: '#/components/schemas/ComplexQuadrilateral'
+ SimpleQuadrilateral:
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/QuadrilateralInterface'
+ ComplexQuadrilateral:
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/QuadrilateralInterface'
+ GrandparentAnimal:
+ discriminator:
+ propertyName: pet_type
+ properties:
+ pet_type:
+ type: string
+ required:
+ - pet_type
+ type: object
+ ParentPet:
+ allOf:
+ - $ref: '#/components/schemas/GrandparentAnimal'
+ type: object
+ ChildCat:
+ allOf:
+ - $ref: '#/components/schemas/ParentPet'
+ - properties:
+ name:
+ type: string
+ pet_type:
+ default: ChildCat
+ enum:
+ - ChildCat
+ type: string
+ x-enum-as-string: true
+ required:
+ - pet_type
+ type: object
+ ArrayOfEnums:
+ items:
+ $ref: '#/components/schemas/OuterEnum'
+ type: array
+ DateTimeTest:
+ default: 2010-01-01T10:10:10.000111+01:00
+ example: 2010-01-01T10:10:10.000111+01:00
+ format: date-time
+ type: string
+ DeprecatedObject:
+ deprecated: true
+ properties:
+ name:
+ type: string
+ type: object
+ ObjectWithDeprecatedFields:
+ properties:
+ uuid:
+ type: string
+ id:
+ deprecated: true
+ type: number
+ deprecatedRef:
+ $ref: '#/components/schemas/DeprecatedObject'
+ bars:
+ deprecated: true
+ items:
+ $ref: '#/components/schemas/Bar'
+ type: array
+ type: object
+ PolymorphicProperty:
+ oneOf:
+ - type: boolean
+ - type: string
+ - type: object
+ - items:
+ $ref: '#/components/schemas/StringArrayItem'
+ type: array
+ StringArrayItem:
+ format: string
+ type: string
+ Activity:
+ description: test map of maps
+ properties:
+ activity_outputs:
+ additionalProperties:
+ $ref: '#/components/schemas/ActivityOutputRepresentation'
+ type: object
+ type: object
+ ActivityOutputRepresentation:
+ items:
+ $ref: '#/components/schemas/ActivityOutputElementRepresentation'
+ type: array
+ ActivityOutputElementRepresentation:
+ properties:
+ prop1:
+ type: string
+ prop2:
+ type: object
+ type: object
+ NullableGuidClass:
+ properties:
+ uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ nullable: true
+ type: string
+ type: object
+ DateOnlyClass:
+ properties:
+ dateOnlyProperty:
+ example: 2017-07-21
+ format: date
+ type: string
+ type: object
+ TestCollectionEndingWithWordListObject:
+ properties:
+ TestCollectionEndingWithWordList:
+ items:
+ $ref: '#/components/schemas/TestCollectionEndingWithWordList'
+ type: array
+ type: object
+ TestCollectionEndingWithWordList:
+ properties:
+ value:
+ type: string
+ type: object
+ LiteralStringClass:
+ properties:
+ escapedLiteralString:
+ default: C:\\Users\\username
+ type: string
+ unescapedLiteralString:
+ default: C:\Users\username
+ type: string
+ type: object
+ OneOfString:
+ oneOf:
+ - pattern: ^a
+ type: string
+ - pattern: ^b
+ type: string
+ ZeroBasedEnum:
+ enum:
+ - unknown
+ - notUnknown
+ type: string
+ ZeroBasedEnumClass:
+ properties:
+ ZeroBasedEnum:
+ enum:
+ - unknown
+ - notUnknown
+ type: string
+ type: object
+ Custom-Variableobject-Response:
+ additionalProperties: true
+ description: A Variable object without predefined property names
+ type: object
+ Field-pkiNotificationtestID:
+ type: integer
+ notificationtest-getElements-v1-Response-mPayload:
+ example:
+ a_objVariableobject:
+ - null
+ - null
+ pkiNotificationtestID: 0
+ properties:
+ pkiNotificationtestID:
+ type: integer
+ a_objVariableobject:
+ items:
+ $ref: '#/components/schemas/Custom-Variableobject-Response'
+ type: array
+ required:
+ - a_objVariableobject
+ - pkiNotificationtestID
+ type: object
+ MixedOneOf:
+ example:
+ content: MixedOneOf_content
+ properties:
+ content:
+ $ref: '#/components/schemas/MixedOneOf_content'
+ MixedAnyOf:
+ example:
+ content: MixedAnyOf_content
+ properties:
+ content:
+ $ref: '#/components/schemas/MixedAnyOf_content'
+ MixedSubId:
+ properties:
+ id:
+ type: string
+ MixLog:
+ properties:
+ id:
+ format: uuid
+ type: string
+ description:
+ type: string
+ mixDate:
+ format: date-time
+ type: string
+ shopId:
+ format: uuid
+ type: string
+ totalPrice:
+ format: float
+ nullable: true
+ type: number
+ totalRecalculations:
+ format: int32
+ type: integer
+ totalOverPoors:
+ format: int32
+ type: integer
+ totalSkips:
+ format: int32
+ type: integer
+ totalUnderPours:
+ format: int32
+ type: integer
+ formulaVersionDate:
+ format: date-time
+ type: string
+ someCode:
+ description: SomeCode is only required for color mixes
+ nullable: true
+ type: string
+ batchNumber:
+ type: string
+ brandCode:
+ description: BrandCode is only required for non-color mixes
+ type: string
+ brandId:
+ description: BrandId is only required for color mixes
+ type: string
+ brandName:
+ description: BrandName is only required for color mixes
+ type: string
+ categoryCode:
+ description: CategoryCode is not used anymore
+ type: string
+ color:
+ description: Color is only required for color mixes
+ type: string
+ colorDescription:
+ type: string
+ comment:
+ type: string
+ commercialProductCode:
+ type: string
+ productLineCode:
+ description: ProductLineCode is only required for color mixes
+ type: string
+ country:
+ type: string
+ createdBy:
+ type: string
+ createdByFirstName:
+ type: string
+ createdByLastName:
+ type: string
+ deltaECalculationRepaired:
+ type: string
+ deltaECalculationSprayout:
+ type: string
+ ownColorVariantNumber:
+ format: int32
+ nullable: true
+ type: integer
+ primerProductId:
+ type: string
+ productId:
+ description: ProductId is only required for color mixes
+ type: string
+ productName:
+ description: ProductName is only required for color mixes
+ type: string
+ selectedVersionIndex:
+ format: int32
+ type: integer
+ required:
+ - description
+ - formulaVersionDate
+ - id
+ - mixDate
+ - totalOverPoors
+ - totalRecalculations
+ - totalSkips
+ - totalUnderPours
+ type: object
+ uuid:
+ format: uuid
+ type: string
+ _foo_get_default_response:
+ example:
+ string:
+ bar: bar
+ properties:
+ string:
+ $ref: '#/components/schemas/Foo'
+ type: object
+ updatePetWithForm_request:
+ properties:
+ name:
+ description: Updated name of the pet
+ type: string
+ status:
+ description: Updated status of the pet
+ type: string
+ type: object
+ uploadFile_request:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ type: object
+ testEnumParameters_request:
+ properties:
+ enum_form_string_array:
+ description: Form parameter enum test (string array)
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ enum_form_string:
+ default: -efg
+ description: Form parameter enum test (string)
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ type: object
+ testEndpointParameters_request:
+ properties:
+ integer:
+ description: None
+ maximum: 100
+ minimum: 10
+ type: integer
+ int32:
+ description: None
+ format: int32
+ maximum: 200
+ minimum: 20
+ type: integer
+ int64:
+ description: None
+ format: int64
+ type: integer
+ number:
+ description: None
+ maximum: 543.2
+ minimum: 32.1
+ type: number
+ float:
+ description: None
+ format: float
+ maximum: 987.6
+ type: number
+ double:
+ description: None
+ format: double
+ maximum: 123.4
+ minimum: 67.8
+ type: number
+ string:
+ description: None
+ pattern: "/[a-z]/i"
+ type: string
+ pattern_without_delimiter:
+ description: None
+ pattern: "^[A-Z].*"
+ type: string
+ byte:
+ description: None
+ format: byte
+ type: string
+ binary:
+ description: None
+ format: binary
+ type: string
+ date:
+ description: None
+ format: date
+ type: string
+ dateTime:
+ default: 2010-02-01T10:20:10.11111+01:00
+ description: None
+ example: 2020-02-02T20:20:20.22222Z
+ format: date-time
+ type: string
+ password:
+ description: None
+ format: password
+ maxLength: 64
+ minLength: 10
+ type: string
+ callback:
+ description: None
+ type: string
+ required:
+ - byte
+ - double
+ - number
+ - pattern_without_delimiter
+ type: object
+ testJsonFormData_request:
+ properties:
+ param:
+ description: field1
+ type: string
+ param2:
+ description: field2
+ type: string
+ required:
+ - param
+ - param2
+ type: object
+ testInlineFreeformAdditionalProperties_request:
+ additionalProperties: true
+ properties:
+ someProperty:
+ type: string
+ type: object
+ uploadFileWithRequiredFile_request:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ requiredFile:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - requiredFile
+ type: object
+ getCountry_request:
+ allOf:
+ - properties:
+ country:
+ type: string
+ required:
+ - country
+ type: object
+ RolesReportsHash_role:
+ example:
+ name: name
+ properties:
+ name:
+ type: string
+ type: object
+ MixedOneOf_content:
+ description: Mixed oneOf types for testing
+ oneOf:
+ - type: string
+ - type: boolean
+ - format: uint8
+ type: integer
+ - format: float32
+ type: number
+ - $ref: '#/components/schemas/MixedSubId'
+ MixedAnyOf_content:
+ anyOf:
+ - type: string
+ - type: boolean
+ - format: uint8
+ type: integer
+ - format: float32
+ type: number
+ - $ref: '#/components/schemas/MixedSubId'
+ description: Mixed anyOf types for testing
+ securitySchemes:
+ petstore_auth:
+ flows:
+ implicit:
+ authorizationUrl: http://petstore.swagger.io/api/oauth/dialog
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ type: oauth2
+ api_key:
+ in: header
+ name: api-key
+ type: apiKey
+ api_key_query:
+ in: query
+ name: api_key_query
+ type: apiKey
+ http_basic_test:
+ scheme: basic
+ type: http
+ bearer_test:
+ bearerFormat: JWT
+ scheme: bearer
+ type: http
+ http_signature_test:
+ scheme: signature
+ type: http
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/appveyor.yml b/samples/client/petstore/csharp/httpclient/net9/Petstore/appveyor.yml
new file mode 100644
index 000000000000..f76f63cee506
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/appveyor.yml
@@ -0,0 +1,9 @@
+# auto-generated by OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator)
+#
+image: Visual Studio 2019
+clone_depth: 1
+build_script:
+- dotnet build -c Release
+- dotnet test -c Release
+after_build:
+- dotnet pack .\src\Org.OpenAPITools\Org.OpenAPITools.csproj -o ../../output -c Release --no-build
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Activity.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Activity.md
new file mode 100644
index 000000000000..27a4e4571997
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Activity.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Activity
+test map of maps
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ActivityOutputElementRepresentation.md
new file mode 100644
index 000000000000..21f226b39525
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ActivityOutputElementRepresentation.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.ActivityOutputElementRepresentation
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Prop1** | **string** | | [optional]
+**Prop2** | **Object** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AdditionalPropertiesClass.md
new file mode 100644
index 000000000000..c40cd0f8accb
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AdditionalPropertiesClass.md
@@ -0,0 +1,17 @@
+# Org.OpenAPITools.Model.AdditionalPropertiesClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**MapProperty** | **Dictionary<string, string>** | | [optional]
+**MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
+**Anytype1** | **Object** | | [optional]
+**MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional]
+**MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional]
+**MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional]
+**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional]
+**MapWithUndeclaredPropertiesString** | **Dictionary<string, string>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Animal.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Animal.md
new file mode 100644
index 000000000000..f14b7a3ae4e7
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Animal.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Animal
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to "red"]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AnotherFakeApi.md
new file mode 100644
index 000000000000..7522f6e75e93
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AnotherFakeApi.md
@@ -0,0 +1,103 @@
+# Org.OpenAPITools.Api.AnotherFakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags |
+
+
+# **Call123TestSpecialTags**
+> ModelClient Call123TestSpecialTags (ModelClient modelClient)
+
+To test special tags
+
+To test special tags and operation ID starting with number
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class Call123TestSpecialTagsExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new AnotherFakeApi(httpClient, config, httpClientHandler);
+ var modelClient = new ModelClient(); // ModelClient | client model
+
+ try
+ {
+ // To test special tags
+ ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the Call123TestSpecialTagsWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // To test special tags
+ ApiResponse response = apiInstance.Call123TestSpecialTagsWithHttpInfo(modelClient);
+ 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 AnotherFakeApi.Call123TestSpecialTagsWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **modelClient** | [**ModelClient**](ModelClient.md) | client model | |
+
+### Return type
+
+[**ModelClient**](ModelClient.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 | - |
+
+[[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/petstore/csharp/httpclient/net9/Petstore/docs/ApiResponse.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ApiResponse.md
new file mode 100644
index 000000000000..bb723d2baa13
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ApiResponse.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.ApiResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Code** | **int** | | [optional]
+**Type** | **string** | | [optional]
+**Message** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Apple.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Apple.md
new file mode 100644
index 000000000000..6261194e4800
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Apple.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.Apple
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Cultivar** | **string** | | [optional]
+**Origin** | **string** | | [optional]
+**ColorCode** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AppleReq.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AppleReq.md
new file mode 100644
index 000000000000..005b8f8058a4
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/AppleReq.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.AppleReq
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Cultivar** | **string** | |
+**Mealy** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayOfArrayOfNumberOnly.md
new file mode 100644
index 000000000000..4764c0ff80c5
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayOfArrayOfNumberOnly.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.ArrayOfArrayOfNumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayArrayNumber** | **List<List<decimal>>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayOfNumberOnly.md
new file mode 100644
index 000000000000..d93717103b8b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayOfNumberOnly.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.ArrayOfNumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayNumber** | **List<decimal>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayTest.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayTest.md
new file mode 100644
index 000000000000..d74d11bae77d
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ArrayTest.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.ArrayTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayOfString** | **List<string>** | | [optional]
+**ArrayArrayOfInteger** | **List<List<long>>** | | [optional]
+**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Banana.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Banana.md
new file mode 100644
index 000000000000..226952d1cecb
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Banana.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.Banana
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**LengthCm** | **decimal** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/BananaReq.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/BananaReq.md
new file mode 100644
index 000000000000..f99aab99e387
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/BananaReq.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.BananaReq
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**LengthCm** | **decimal** | |
+**Sweet** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/BasquePig.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/BasquePig.md
new file mode 100644
index 000000000000..681be0bc7e30
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/BasquePig.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.BasquePig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Capitalization.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Capitalization.md
new file mode 100644
index 000000000000..1b1352d918f4
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Capitalization.md
@@ -0,0 +1,15 @@
+# Org.OpenAPITools.Model.Capitalization
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**SmallCamel** | **string** | | [optional]
+**CapitalCamel** | **string** | | [optional]
+**SmallSnake** | **string** | | [optional]
+**CapitalSnake** | **string** | | [optional]
+**SCAETHFlowPoints** | **string** | | [optional]
+**ATT_NAME** | **string** | Name of the pet | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Cat.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Cat.md
new file mode 100644
index 000000000000..aa1ac17604eb
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Cat.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.Cat
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to "red"]
+**Declawed** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Category.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Category.md
new file mode 100644
index 000000000000..032a1faeb3ff
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Category.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Category
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**Name** | **string** | | [default to "default-name"]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ChildCat.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ChildCat.md
new file mode 100644
index 000000000000..8ce6449e5f22
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ChildCat.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.ChildCat
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **string** | | [optional]
+**PetType** | **string** | | [default to PetTypeEnum.ChildCat]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ClassModel.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ClassModel.md
new file mode 100644
index 000000000000..f39982657c89
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ClassModel.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.ClassModel
+Model for testing model with \"_class\" property
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Class** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ComplexQuadrilateral.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ComplexQuadrilateral.md
new file mode 100644
index 000000000000..65a6097ce3fe
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ComplexQuadrilateral.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.ComplexQuadrilateral
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DanishPig.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DanishPig.md
new file mode 100644
index 000000000000..d9cf6527a3f6
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DanishPig.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.DanishPig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DateOnlyClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DateOnlyClass.md
new file mode 100644
index 000000000000..8291b9cb6d78
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DateOnlyClass.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.DateOnlyClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DateOnlyProperty** | **DateOnly** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DefaultApi.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DefaultApi.md
new file mode 100644
index 000000000000..13db7cec8ee1
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DefaultApi.md
@@ -0,0 +1,449 @@
+# Org.OpenAPITools.Api.DefaultApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
+| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
+| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
+| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
+| [**Test**](DefaultApi.md#test) | **GET** /test | Retrieve an existing Notificationtest's Elements |
+
+
+# **FooGet**
+> FooGetDefaultResponse FooGet ()
+
+
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class FooGetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new DefaultApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ FooGetDefaultResponse result = apiInstance.FooGet();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.FooGet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FooGetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FooGetWithHttpInfo();
+ 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 DefaultApi.FooGetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | response | - |
+
+[[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)
+
+
+# **GetCountry**
+> void GetCountry (string country)
+
+
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class GetCountryExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new DefaultApi(httpClient, config, httpClientHandler);
+ var country = "country_example"; // string |
+
+ try
+ {
+ apiInstance.GetCountry(country);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.GetCountry: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetCountryWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ apiInstance.GetCountryWithHttpInfo(country);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling DefaultApi.GetCountryWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **country** | **string** | | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+
+[[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)
+
+
+# **Hello**
+> List<Guid> Hello ()
+
+Hello
+
+Hello
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class HelloExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new DefaultApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ // Hello
+ List result = apiInstance.Hello();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.Hello: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the HelloWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Hello
+ ApiResponse> response = apiInstance.HelloWithHttpInfo();
+ 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 DefaultApi.HelloWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+**List**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | UUIDs | - |
+
+[[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)
+
+
+# **RolesReportGet**
+> List<List<RolesReportsHash>> RolesReportGet ()
+
+
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class RolesReportGetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new DefaultApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ List> result = apiInstance.RolesReportGet();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the RolesReportGetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse>> response = apiInstance.RolesReportGetWithHttpInfo();
+ 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 DefaultApi.RolesReportGetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+**List>**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | returns report | - |
+
+[[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**
+> NotificationtestGetElementsV1ResponseMPayload Test ()
+
+Retrieve an existing Notificationtest's Elements
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new DefaultApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ // Retrieve an existing Notificationtest's Elements
+ NotificationtestGetElementsV1ResponseMPayload result = apiInstance.Test();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.Test: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Retrieve an existing Notificationtest's Elements
+ ApiResponse response = apiInstance.TestWithHttpInfo();
+ 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 DefaultApi.TestWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**NotificationtestGetElementsV1ResponseMPayload**](NotificationtestGetElementsV1ResponseMPayload.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Successful response | - |
+
+[[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/petstore/csharp/httpclient/net9/Petstore/docs/DeprecatedObject.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DeprecatedObject.md
new file mode 100644
index 000000000000..bb7824a3d640
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/DeprecatedObject.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.DeprecatedObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Dog.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Dog.md
new file mode 100644
index 000000000000..3aa00144e9aa
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Dog.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.Dog
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to "red"]
+**Breed** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Drawing.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Drawing.md
new file mode 100644
index 000000000000..6b7122940afa
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Drawing.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.Drawing
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**MainShape** | [**Shape**](Shape.md) | | [optional]
+**ShapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional]
+**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional]
+**Shapes** | [**List<Shape>**](Shape.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumArrays.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumArrays.md
new file mode 100644
index 000000000000..62e34f03dbc3
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumArrays.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.EnumArrays
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**JustSymbol** | **string** | | [optional]
+**ArrayEnum** | **List<EnumArrays.ArrayEnumEnum>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumClass.md
new file mode 100644
index 000000000000..38f309437db3
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumClass.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.EnumClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumTest.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumTest.md
new file mode 100644
index 000000000000..5ce3c4addd9b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EnumTest.md
@@ -0,0 +1,18 @@
+# Org.OpenAPITools.Model.EnumTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**EnumString** | **string** | | [optional]
+**EnumStringRequired** | **string** | |
+**EnumInteger** | **int** | | [optional]
+**EnumIntegerOnly** | **int** | | [optional]
+**EnumNumber** | **double** | | [optional]
+**OuterEnum** | **OuterEnum** | | [optional]
+**OuterEnumInteger** | **OuterEnumInteger** | | [optional]
+**OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional]
+**OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EquilateralTriangle.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EquilateralTriangle.md
new file mode 100644
index 000000000000..ab06d96ca30b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/EquilateralTriangle.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.EquilateralTriangle
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FakeApi.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FakeApi.md
new file mode 100644
index 000000000000..1edf19ba55b0
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FakeApi.md
@@ -0,0 +1,1910 @@
+# Org.OpenAPITools.Api.FakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint |
+| [**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | |
+| [**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | |
+| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
+| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
+| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
+| [**GetMixedAnyOf**](FakeApi.md#getmixedanyof) | **GET** /fake/mixed/anyOf | Test mixed type anyOf deserialization |
+| [**GetMixedOneOf**](FakeApi.md#getmixedoneof) | **GET** /fake/mixed/oneOf | Test mixed type oneOf deserialization |
+| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
+| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
+| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
+| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
+| [**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 |
+| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
+| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
+| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
+| [**TestInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
+| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
+| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
+| [**TestStringMapReference**](FakeApi.md#teststringmapreference) | **POST** /fake/stringMap-reference | test referenced string map |
+
+
+# **FakeHealthGet**
+> HealthCheckResult FakeHealthGet ()
+
+Health check endpoint
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class FakeHealthGetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ // Health check endpoint
+ HealthCheckResult result = apiInstance.FakeHealthGet();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeHealthGet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeHealthGetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Health check endpoint
+ ApiResponse response = apiInstance.FakeHealthGetWithHttpInfo();
+ 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 FakeApi.FakeHealthGetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**HealthCheckResult**](HealthCheckResult.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | The instance started successfully | - |
+
+[[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)
+
+
+# **FakeOuterBooleanSerialize**
+> bool FakeOuterBooleanSerialize (bool? body = null)
+
+
+
+Test serialization of outer boolean types
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class FakeOuterBooleanSerializeExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var body = true; // bool? | Input boolean as post body (optional)
+
+ try
+ {
+ bool result = apiInstance.FakeOuterBooleanSerialize(body);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeOuterBooleanSerializeWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FakeOuterBooleanSerializeWithHttpInfo(body);
+ 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 FakeApi.FakeOuterBooleanSerializeWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **body** | **bool?** | Input boolean as post body | [optional] |
+
+### Return type
+
+**bool**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output boolean | - |
+
+[[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)
+
+
+# **FakeOuterCompositeSerialize**
+> OuterComposite FakeOuterCompositeSerialize (OuterComposite? outerComposite = null)
+
+
+
+Test serialization of object with outer number type
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class FakeOuterCompositeSerializeExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var outerComposite = new OuterComposite?(); // OuterComposite? | Input composite as post body (optional)
+
+ try
+ {
+ OuterComposite result = apiInstance.FakeOuterCompositeSerialize(outerComposite);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeOuterCompositeSerializeWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FakeOuterCompositeSerializeWithHttpInfo(outerComposite);
+ 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 FakeApi.FakeOuterCompositeSerializeWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **outerComposite** | [**OuterComposite?**](OuterComposite?.md) | Input composite as post body | [optional] |
+
+### Return type
+
+[**OuterComposite**](OuterComposite.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output composite | - |
+
+[[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)
+
+
+# **FakeOuterNumberSerialize**
+> decimal FakeOuterNumberSerialize (decimal? body = null)
+
+
+
+Test serialization of outer number types
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class FakeOuterNumberSerializeExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var body = 8.14D; // decimal? | Input number as post body (optional)
+
+ try
+ {
+ decimal result = apiInstance.FakeOuterNumberSerialize(body);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeOuterNumberSerializeWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FakeOuterNumberSerializeWithHttpInfo(body);
+ 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 FakeApi.FakeOuterNumberSerializeWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **body** | **decimal?** | Input number as post body | [optional] |
+
+### Return type
+
+**decimal**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output number | - |
+
+[[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)
+
+
+# **FakeOuterStringSerialize**
+> string FakeOuterStringSerialize (Guid requiredStringUuid, string? body = null)
+
+
+
+Test serialization of outer string types
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class FakeOuterStringSerializeExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var requiredStringUuid = "requiredStringUuid_example"; // Guid | Required UUID String
+ var body = "body_example"; // string? | Input string as post body (optional)
+
+ try
+ {
+ string result = apiInstance.FakeOuterStringSerialize(requiredStringUuid, body);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeOuterStringSerializeWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, body);
+ 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 FakeApi.FakeOuterStringSerializeWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requiredStringUuid** | **Guid** | Required UUID String | |
+| **body** | **string?** | Input string as post body | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output string | - |
+
+[[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)
+
+
+# **GetArrayOfEnums**
+> List<OuterEnum> GetArrayOfEnums ()
+
+Array of Enums
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class GetArrayOfEnumsExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ // Array of Enums
+ List result = apiInstance.GetArrayOfEnums();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.GetArrayOfEnums: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetArrayOfEnumsWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Array of Enums
+ ApiResponse> response = apiInstance.GetArrayOfEnumsWithHttpInfo();
+ 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 FakeApi.GetArrayOfEnumsWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**List<OuterEnum>**](OuterEnum.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Got named array of enums | - |
+
+[[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)
+
+
+# **GetMixedAnyOf**
+> MixedAnyOf GetMixedAnyOf ()
+
+Test mixed type anyOf deserialization
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class GetMixedAnyOfExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ // Test mixed type anyOf deserialization
+ MixedAnyOf result = apiInstance.GetMixedAnyOf();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.GetMixedAnyOf: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetMixedAnyOfWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test mixed type anyOf deserialization
+ ApiResponse response = apiInstance.GetMixedAnyOfWithHttpInfo();
+ 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 FakeApi.GetMixedAnyOfWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**MixedAnyOf**](MixedAnyOf.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Got mixed anyOf | - |
+
+[[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)
+
+
+# **GetMixedOneOf**
+> MixedOneOf GetMixedOneOf ()
+
+Test mixed type oneOf deserialization
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class GetMixedOneOfExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ // Test mixed type oneOf deserialization
+ MixedOneOf result = apiInstance.GetMixedOneOf();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.GetMixedOneOf: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetMixedOneOfWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test mixed type oneOf deserialization
+ ApiResponse response = apiInstance.GetMixedOneOfWithHttpInfo();
+ 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 FakeApi.GetMixedOneOfWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**MixedOneOf**](MixedOneOf.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Got mixed oneOf | - |
+
+[[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)
+
+
+# **TestAdditionalPropertiesReference**
+> void TestAdditionalPropertiesReference (Dictionary requestBody)
+
+test referenced additionalProperties
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestAdditionalPropertiesReferenceExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var requestBody = new Dictionary(); // Dictionary | request body
+
+ try
+ {
+ // test referenced additionalProperties
+ apiInstance.TestAdditionalPropertiesReference(requestBody);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // test referenced additionalProperties
+ apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### 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)
+
+
+# **TestBodyWithFileSchema**
+> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestBodyWithFileSchemaExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass |
+
+ try
+ {
+ apiInstance.TestBodyWithFileSchema(fileSchemaTestClass);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestBodyWithFileSchemaWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ apiInstance.TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchemaWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+[[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)
+
+
+# **TestBodyWithQueryParams**
+> void TestBodyWithQueryParams (string query, User user)
+
+
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestBodyWithQueryParamsExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var query = "query_example"; // string |
+ var user = new User(); // User |
+
+ try
+ {
+ apiInstance.TestBodyWithQueryParams(query, user);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestBodyWithQueryParamsWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ apiInstance.TestBodyWithQueryParamsWithHttpInfo(query, user);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParamsWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **query** | **string** | | |
+| **user** | [**User**](User.md) | | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+[[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)
+
+
+# **TestClientModel**
+> ModelClient TestClientModel (ModelClient modelClient)
+
+To test \"client\" model
+
+To test \"client\" model
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestClientModelExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var modelClient = new ModelClient(); // ModelClient | client model
+
+ try
+ {
+ // To test \"client\" model
+ ModelClient result = apiInstance.TestClientModel(modelClient);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestClientModelWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // To test \"client\" model
+ ApiResponse response = apiInstance.TestClientModelWithHttpInfo(modelClient);
+ 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 FakeApi.TestClientModelWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **modelClient** | [**ModelClient**](ModelClient.md) | client model | |
+
+### Return type
+
+[**ModelClient**](ModelClient.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 | - |
+
+[[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)
+
+
+# **TestEndpointParameters**
+> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string? varString = null, FileParameter? binary = null, DateOnly? date = null, DateTime? dateTime = null, string? password = null, string? callback = null)
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestEndpointParametersExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure HTTP basic authorization: http_basic_test
+ config.Username = "YOUR_USERNAME";
+ config.Password = "YOUR_PASSWORD";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var number = 8.14D; // decimal | None
+ var varDouble = 1.2D; // double | None
+ var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None
+ var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None
+ var integer = 56; // int? | None (optional)
+ var int32 = 56; // int? | None (optional)
+ var int64 = 789L; // long? | None (optional)
+ var varFloat = 3.4F; // float? | None (optional)
+ var varString = "varString_example"; // string? | None (optional)
+ var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter? | None (optional)
+ var date = DateOnly.Parse("2013-10-20"); // DateOnly? | None (optional)
+ var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00")
+ var password = "password_example"; // string? | None (optional)
+ var callback = "callback_example"; // string? | None (optional)
+
+ try
+ {
+ // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEndpointParametersWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestEndpointParametersWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **number** | **decimal** | None | |
+| **varDouble** | **double** | None | |
+| **patternWithoutDelimiter** | **string** | None | |
+| **varByte** | **byte[]** | None | |
+| **integer** | **int?** | None | [optional] |
+| **int32** | **int?** | None | [optional] |
+| **int64** | **long?** | None | [optional] |
+| **varFloat** | **float?** | None | [optional] |
+| **varString** | **string?** | None | [optional] |
+| **binary** | **FileParameter?****FileParameter?** | None | [optional] |
+| **date** | **DateOnly?** | None | [optional] |
+| **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] |
+| **password** | **string?** | None | [optional] |
+| **callback** | **string?** | None | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[http_basic_test](../README.md#http_basic_test)
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+[[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)
+
+
+# **TestEnumParameters**
+> void TestEnumParameters (List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null)
+
+To test enum parameters
+
+To test enum parameters
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestEnumParametersExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var enumHeaderStringArray = new List?(); // List? | Header parameter enum test (string array) (optional)
+ var enumHeaderString = "_abc"; // string? | Header parameter enum test (string) (optional) (default to -efg)
+ var enumQueryStringArray = new List?(); // List? | Query parameter enum test (string array) (optional)
+ var enumQueryString = "_abc"; // string? | Query parameter enum test (string) (optional) (default to -efg)
+ var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional)
+ var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional)
+ var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to $)
+ var enumFormString = "_abc"; // string? | Form parameter enum test (string) (optional) (default to -efg)
+
+ try
+ {
+ // To test enum parameters
+ apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEnumParametersWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // To test enum parameters
+ apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestEnumParametersWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **enumHeaderStringArray** | [**List<string>?**](string.md) | Header parameter enum test (string array) | [optional] |
+| **enumHeaderString** | **string?** | Header parameter enum test (string) | [optional] [default to -efg] |
+| **enumQueryStringArray** | [**List<string>?**](string.md) | Query parameter enum test (string array) | [optional] |
+| **enumQueryString** | **string?** | Query parameter enum test (string) | [optional] [default to -efg] |
+| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] |
+| **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] |
+| **enumFormStringArray** | [**List<string>?**](string.md) | Form parameter enum test (string array) | [optional] [default to $] |
+| **enumFormString** | **string?** | Form parameter enum test (string) | [optional] [default to -efg] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid request | - |
+| **404** | Not found | - |
+
+[[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)
+
+
+# **TestGroupParameters**
+> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null)
+
+Fake endpoint to test group parameters (optional)
+
+Fake endpoint to test group parameters (optional)
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestGroupParametersExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure Bearer token for authorization: bearer_test
+ config.AccessToken = "YOUR_BEARER_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var requiredStringGroup = 56; // int | Required String in group parameters
+ var requiredBooleanGroup = true; // bool | Required Boolean in group parameters
+ var requiredInt64Group = 789L; // long | Required Integer in group parameters
+ var stringGroup = 56; // int? | String in group parameters (optional)
+ var booleanGroup = true; // bool? | Boolean in group parameters (optional)
+ var int64Group = 789L; // long? | Integer in group parameters (optional)
+
+ try
+ {
+ // Fake endpoint to test group parameters (optional)
+ apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestGroupParametersWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Fake endpoint to test group parameters (optional)
+ apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestGroupParametersWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requiredStringGroup** | **int** | Required String in group parameters | |
+| **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | |
+| **requiredInt64Group** | **long** | Required Integer in group parameters | |
+| **stringGroup** | **int?** | String in group parameters | [optional] |
+| **booleanGroup** | **bool?** | Boolean in group parameters | [optional] |
+| **int64Group** | **long?** | Integer in group parameters | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[bearer_test](../README.md#bearer_test)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Something wrong | - |
+
+[[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)
+
+
+# **TestInlineAdditionalProperties**
+> void TestInlineAdditionalProperties (Dictionary requestBody)
+
+test inline additionalProperties
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestInlineAdditionalPropertiesExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var requestBody = new Dictionary(); // Dictionary | request body
+
+ try
+ {
+ // test inline additionalProperties
+ apiInstance.TestInlineAdditionalProperties(requestBody);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestInlineAdditionalPropertiesWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // test inline additionalProperties
+ apiInstance.TestInlineAdditionalPropertiesWithHttpInfo(requestBody);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestInlineAdditionalPropertiesWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requestBody** | [**Dictionary<string, string>**](string.md) | request body | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### 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)
+
+
+# **TestInlineFreeformAdditionalProperties**
+> void TestInlineFreeformAdditionalProperties (TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest)
+
+test inline free-form additionalProperties
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestInlineFreeformAdditionalPropertiesExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
+
+ try
+ {
+ // test inline free-form additionalProperties
+ apiInstance.TestInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalProperties: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestInlineFreeformAdditionalPropertiesWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // test inline free-form additionalProperties
+ apiInstance.TestInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestInlineFreeformAdditionalPropertiesWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md) | request body | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### 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)
+
+
+# **TestJsonFormData**
+> void TestJsonFormData (string param, string param2)
+
+test json serialization of form data
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestJsonFormDataExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var param = "param_example"; // string | field1
+ var param2 = "param2_example"; // string | field2
+
+ try
+ {
+ // test json serialization of form data
+ apiInstance.TestJsonFormData(param, param2);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestJsonFormDataWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // test json serialization of form data
+ apiInstance.TestJsonFormDataWithHttpInfo(param, param2);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestJsonFormDataWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **param** | **string** | field1 | |
+| **param2** | **string** | field2 | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### 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)
+
+
+# **TestQueryParameterCollectionFormat**
+> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string? notRequiredNotNullable = null, string? notRequiredNullable = null)
+
+
+
+To test the collection format in query parameters
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestQueryParameterCollectionFormatExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var pipe = new List(); // List |
+ var ioutil = new List(); // List |
+ var http = new List(); // List |
+ var url = new List(); // List |
+ var context = new List(); // List |
+ var requiredNotNullable = "requiredNotNullable_example"; // string |
+ var requiredNullable = "requiredNullable_example"; // string |
+ var notRequiredNotNullable = "notRequiredNotNullable_example"; // string? | (optional)
+ var notRequiredNullable = "notRequiredNullable_example"; // string? | (optional)
+
+ try
+ {
+ apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryParameterCollectionFormatWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormatWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **pipe** | [**List<string>**](string.md) | | |
+| **ioutil** | [**List<string>**](string.md) | | |
+| **http** | [**List<string>**](string.md) | | |
+| **url** | [**List<string>**](string.md) | | |
+| **context** | [**List<string>**](string.md) | | |
+| **requiredNotNullable** | **string** | | |
+| **requiredNullable** | **string** | | |
+| **notRequiredNotNullable** | **string?** | | [optional] |
+| **notRequiredNullable** | **string?** | | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+[[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)
+
+
+# **TestStringMapReference**
+> void TestStringMapReference (Dictionary requestBody)
+
+test referenced string map
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestStringMapReferenceExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
+ var requestBody = new Dictionary(); // Dictionary | request body
+
+ try
+ {
+ // test referenced string map
+ apiInstance.TestStringMapReference(requestBody);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestStringMapReference: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestStringMapReferenceWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // test referenced string map
+ apiInstance.TestStringMapReferenceWithHttpInfo(requestBody);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestStringMapReferenceWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requestBody** | [**Dictionary<string, string>**](string.md) | request body | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### 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/petstore/csharp/httpclient/net9/Petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FakeClassnameTags123Api.md
new file mode 100644
index 000000000000..ad5d0d58dd56
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FakeClassnameTags123Api.md
@@ -0,0 +1,108 @@
+# Org.OpenAPITools.Api.FakeClassnameTags123Api
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case |
+
+
+# **TestClassname**
+> ModelClient TestClassname (ModelClient modelClient)
+
+To test class name in snake case
+
+To test class name in snake case
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class TestClassnameExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure API key authorization: api_key_query
+ config.AddApiKey("api_key_query", "YOUR_API_KEY");
+ // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+ // config.AddApiKeyPrefix("api_key_query", "Bearer");
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new FakeClassnameTags123Api(httpClient, config, httpClientHandler);
+ var modelClient = new ModelClient(); // ModelClient | client model
+
+ try
+ {
+ // To test class name in snake case
+ ModelClient result = apiInstance.TestClassname(modelClient);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestClassnameWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // To test class name in snake case
+ ApiResponse response = apiInstance.TestClassnameWithHttpInfo(modelClient);
+ 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 FakeClassnameTags123Api.TestClassnameWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **modelClient** | [**ModelClient**](ModelClient.md) | client model | |
+
+### Return type
+
+[**ModelClient**](ModelClient.md)
+
+### Authorization
+
+[api_key_query](../README.md#api_key_query)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+### 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/petstore/csharp/httpclient/net9/Petstore/docs/File.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/File.md
new file mode 100644
index 000000000000..28959feda088
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/File.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.File
+Must be named `File` for test.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**SourceURI** | **string** | Test capitalization | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..0ce4be56cc72
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FileSchemaTestClass.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.FileSchemaTestClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**File** | [**File**](File.md) | | [optional]
+**Files** | [**List<File>**](File.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Foo.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Foo.md
new file mode 100644
index 000000000000..92cf45723210
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Foo.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.Foo
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Bar** | **string** | | [optional] [default to "bar"]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FooGetDefaultResponse.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FooGetDefaultResponse.md
new file mode 100644
index 000000000000..dde9b9729b93
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FooGetDefaultResponse.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.FooGetDefaultResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**String** | [**Foo**](Foo.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FormatTest.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FormatTest.md
new file mode 100644
index 000000000000..7f34f02b4aea
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FormatTest.md
@@ -0,0 +1,33 @@
+# Org.OpenAPITools.Model.FormatTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Integer** | **int** | | [optional]
+**Int32** | **int** | | [optional]
+**Int32Range** | **int** | | [optional]
+**Int64Positive** | **long** | | [optional]
+**Int64Negative** | **long** | | [optional]
+**Int64PositiveExclusive** | **long** | | [optional]
+**Int64NegativeExclusive** | **long** | | [optional]
+**UnsignedInteger** | **uint** | | [optional]
+**Int64** | **long** | | [optional]
+**UnsignedLong** | **ulong** | | [optional]
+**Number** | **decimal** | |
+**Float** | **float** | | [optional]
+**Double** | **double** | | [optional]
+**Decimal** | **decimal** | | [optional]
+**String** | **string** | | [optional]
+**Byte** | **byte[]** | |
+**Binary** | [**FileParameter**](FileParameter.md) | | [optional]
+**Date** | **DateOnly** | |
+**DateTime** | **DateTime** | | [optional]
+**Uuid** | **Guid** | | [optional]
+**Password** | **string** | |
+**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
+**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
+**PatternWithBackslash** | **string** | None | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Fruit.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Fruit.md
new file mode 100644
index 000000000000..40df92d7c9b1
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Fruit.md
@@ -0,0 +1,14 @@
+# Org.OpenAPITools.Model.Fruit
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Color** | **string** | | [optional]
+**Cultivar** | **string** | | [optional]
+**Origin** | **string** | | [optional]
+**ColorCode** | **string** | | [optional]
+**LengthCm** | **decimal** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FruitReq.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FruitReq.md
new file mode 100644
index 000000000000..5db6b0e2d1d8
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/FruitReq.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.FruitReq
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Cultivar** | **string** | |
+**Mealy** | **bool** | | [optional]
+**LengthCm** | **decimal** | |
+**Sweet** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/GmFruit.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/GmFruit.md
new file mode 100644
index 000000000000..da7b3a6ccf9f
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/GmFruit.md
@@ -0,0 +1,14 @@
+# Org.OpenAPITools.Model.GmFruit
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Color** | **string** | | [optional]
+**Cultivar** | **string** | | [optional]
+**Origin** | **string** | | [optional]
+**ColorCode** | **string** | | [optional]
+**LengthCm** | **decimal** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/GrandparentAnimal.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/GrandparentAnimal.md
new file mode 100644
index 000000000000..461ebfe34c2c
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/GrandparentAnimal.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.GrandparentAnimal
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**PetType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/HasOnlyReadOnly.md
new file mode 100644
index 000000000000..64549c18b0a1
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/HasOnlyReadOnly.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.HasOnlyReadOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Bar** | **string** | | [optional] [readonly]
+**Foo** | **string** | | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/HealthCheckResult.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/HealthCheckResult.md
new file mode 100644
index 000000000000..f7d1a7eb6886
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/HealthCheckResult.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.HealthCheckResult
+Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**NullableMessage** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/IsoscelesTriangle.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/IsoscelesTriangle.md
new file mode 100644
index 000000000000..f0eef14fabba
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/IsoscelesTriangle.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.IsoscelesTriangle
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/List.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/List.md
new file mode 100644
index 000000000000..c00ef31e6e25
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/List.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.List
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Var123List** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/LiteralStringClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/LiteralStringClass.md
new file mode 100644
index 000000000000..6d3e0d50c1f6
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/LiteralStringClass.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.LiteralStringClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**EscapedLiteralString** | **string** | | [optional] [default to "C:\\Users\\username"]
+**UnescapedLiteralString** | **string** | | [optional] [default to "C:\Users\username"]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Mammal.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Mammal.md
new file mode 100644
index 000000000000..aab8f4db9c75
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Mammal.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.Mammal
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**HasBaleen** | **bool** | | [optional]
+**HasTeeth** | **bool** | | [optional]
+**ClassName** | **string** | |
+**Type** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MapTest.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MapTest.md
new file mode 100644
index 000000000000..516f9d4fd37e
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MapTest.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.MapTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
+**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional]
+**DirectMap** | **Dictionary<string, bool>** | | [optional]
+**IndirectMap** | **Dictionary<string, bool>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixLog.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixLog.md
new file mode 100644
index 000000000000..1872e30daaa3
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixLog.md
@@ -0,0 +1,41 @@
+# Org.OpenAPITools.Model.MixLog
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **Guid** | |
+**Description** | **string** | |
+**MixDate** | **DateTime** | |
+**ShopId** | **Guid** | | [optional]
+**TotalPrice** | **float?** | | [optional]
+**TotalRecalculations** | **int** | |
+**TotalOverPoors** | **int** | |
+**TotalSkips** | **int** | |
+**TotalUnderPours** | **int** | |
+**FormulaVersionDate** | **DateTime** | |
+**SomeCode** | **string** | SomeCode is only required for color mixes | [optional]
+**BatchNumber** | **string** | | [optional]
+**BrandCode** | **string** | BrandCode is only required for non-color mixes | [optional]
+**BrandId** | **string** | BrandId is only required for color mixes | [optional]
+**BrandName** | **string** | BrandName is only required for color mixes | [optional]
+**CategoryCode** | **string** | CategoryCode is not used anymore | [optional]
+**Color** | **string** | Color is only required for color mixes | [optional]
+**ColorDescription** | **string** | | [optional]
+**Comment** | **string** | | [optional]
+**CommercialProductCode** | **string** | | [optional]
+**ProductLineCode** | **string** | ProductLineCode is only required for color mixes | [optional]
+**Country** | **string** | | [optional]
+**CreatedBy** | **string** | | [optional]
+**CreatedByFirstName** | **string** | | [optional]
+**CreatedByLastName** | **string** | | [optional]
+**DeltaECalculationRepaired** | **string** | | [optional]
+**DeltaECalculationSprayout** | **string** | | [optional]
+**OwnColorVariantNumber** | **int?** | | [optional]
+**PrimerProductId** | **string** | | [optional]
+**ProductId** | **string** | ProductId is only required for color mixes | [optional]
+**ProductName** | **string** | ProductName is only required for color mixes | [optional]
+**SelectedVersionIndex** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedAnyOf.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedAnyOf.md
new file mode 100644
index 000000000000..6a6aa093bebe
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedAnyOf.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.MixedAnyOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Content** | [**MixedAnyOfContent**](MixedAnyOfContent.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedAnyOfContent.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedAnyOfContent.md
new file mode 100644
index 000000000000..9af972f3219f
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedAnyOfContent.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.MixedAnyOfContent
+Mixed anyOf types for testing
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedOneOf.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedOneOf.md
new file mode 100644
index 000000000000..dc9650a8e3a0
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedOneOf.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.MixedOneOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Content** | [**MixedOneOfContent**](MixedOneOfContent.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedOneOfContent.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedOneOfContent.md
new file mode 100644
index 000000000000..8468f9024f73
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedOneOfContent.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.MixedOneOfContent
+Mixed oneOf types for testing
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md
new file mode 100644
index 000000000000..050210a3e371
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.MixedPropertiesAndAdditionalPropertiesClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**UuidWithPattern** | **Guid** | | [optional]
+**Uuid** | **Guid** | | [optional]
+**DateTime** | **DateTime** | | [optional]
+**Map** | [**Dictionary<string, Animal>**](Animal.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedSubId.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedSubId.md
new file mode 100644
index 000000000000..b9268e37cba6
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/MixedSubId.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.MixedSubId
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Model200Response.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Model200Response.md
new file mode 100644
index 000000000000..31f4d86fe43d
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Model200Response.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.Model200Response
+Model for testing model name starting with number
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **int** | | [optional]
+**Class** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ModelClient.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ModelClient.md
new file mode 100644
index 000000000000..1d8afe3e1a7a
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ModelClient.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.ModelClient
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarClient** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Name.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Name.md
new file mode 100644
index 000000000000..3e19db154a80
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Name.md
@@ -0,0 +1,14 @@
+# Org.OpenAPITools.Model.Name
+Model for testing model name same as property name
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarName** | **int** | |
+**SnakeCase** | **int** | | [optional] [readonly]
+**Property** | **string** | | [optional]
+**Var123Number** | **int** | | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NotificationtestGetElementsV1ResponseMPayload.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NotificationtestGetElementsV1ResponseMPayload.md
new file mode 100644
index 000000000000..e6e3d9fdb0bc
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NotificationtestGetElementsV1ResponseMPayload.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.NotificationtestGetElementsV1ResponseMPayload
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**PkiNotificationtestID** | **int** | |
+**AObjVariableobject** | **List<Dictionary<string, Object>>** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableClass.md
new file mode 100644
index 000000000000..2d238d6a80cb
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableClass.md
@@ -0,0 +1,21 @@
+# Org.OpenAPITools.Model.NullableClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**IntegerProp** | **int?** | | [optional]
+**NumberProp** | **decimal?** | | [optional]
+**BooleanProp** | **bool?** | | [optional]
+**StringProp** | **string** | | [optional]
+**DateProp** | **DateOnly?** | | [optional]
+**DatetimeProp** | **DateTime?** | | [optional]
+**ArrayNullableProp** | **List<Object>** | | [optional]
+**ArrayAndItemsNullableProp** | **List<Object>** | | [optional]
+**ArrayItemsNullable** | **List<Object>** | | [optional]
+**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional]
+**ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional]
+**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableGuidClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableGuidClass.md
new file mode 100644
index 000000000000..5ada17b4db87
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableGuidClass.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.NullableGuidClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Uuid** | **Guid?** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableShape.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableShape.md
new file mode 100644
index 000000000000..f8fb004da806
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NullableShape.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.NullableShape
+The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NumberOnly.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NumberOnly.md
new file mode 100644
index 000000000000..14a7c0f1071b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/NumberOnly.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.NumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**JustNumber** | **decimal** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ObjectWithDeprecatedFields.md
new file mode 100644
index 000000000000..7a335d446f4b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ObjectWithDeprecatedFields.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.ObjectWithDeprecatedFields
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Uuid** | **string** | | [optional]
+**Id** | **decimal** | | [optional]
+**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional]
+**Bars** | **List<string>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OneOfString.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OneOfString.md
new file mode 100644
index 000000000000..d2a686fe5636
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OneOfString.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.OneOfString
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Order.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Order.md
new file mode 100644
index 000000000000..66c55c3b4737
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Order.md
@@ -0,0 +1,15 @@
+# Org.OpenAPITools.Model.Order
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**PetId** | **long** | | [optional]
+**Quantity** | **int** | | [optional]
+**ShipDate** | **DateTime** | | [optional]
+**Status** | **string** | Order Status | [optional]
+**Complete** | **bool** | | [optional] [default to false]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterComposite.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterComposite.md
new file mode 100644
index 000000000000..eb42bcc1aaa4
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterComposite.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.OuterComposite
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**MyNumber** | **decimal** | | [optional]
+**MyString** | **string** | | [optional]
+**MyBoolean** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnum.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnum.md
new file mode 100644
index 000000000000..245765c78452
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnum.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.OuterEnum
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumDefaultValue.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumDefaultValue.md
new file mode 100644
index 000000000000..3ffaa1086a64
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumDefaultValue.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.OuterEnumDefaultValue
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumInteger.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumInteger.md
new file mode 100644
index 000000000000..567858392db3
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumInteger.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.OuterEnumInteger
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumIntegerDefaultValue.md
new file mode 100644
index 000000000000..35c75a44372b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumIntegerDefaultValue.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.OuterEnumIntegerDefaultValue
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumTest.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumTest.md
new file mode 100644
index 000000000000..667c11ba6a2f
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/OuterEnumTest.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.OuterEnumTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ParentPet.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ParentPet.md
new file mode 100644
index 000000000000..0e18ba6d591d
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ParentPet.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.ParentPet
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**PetType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Pet.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Pet.md
new file mode 100644
index 000000000000..c7224764e2d4
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Pet.md
@@ -0,0 +1,15 @@
+# Org.OpenAPITools.Model.Pet
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**Category** | [**Category**](Category.md) | | [optional]
+**Name** | **string** | |
+**PhotoUrls** | **List<string>** | |
+**Tags** | [**List<Tag>**](Tag.md) | | [optional]
+**Status** | **string** | pet status in the store | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/PetApi.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/PetApi.md
new file mode 100644
index 000000000000..e8c203c040bd
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/PetApi.md
@@ -0,0 +1,898 @@
+# Org.OpenAPITools.Api.PetApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store |
+| [**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet |
+| [**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status |
+| [**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags |
+| [**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID |
+| [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet |
+| [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data |
+| [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image |
+| [**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) |
+
+
+# **AddPet**
+> void AddPet (Pet pet)
+
+Add a new pet to the store
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class AddPetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var pet = new Pet(); // Pet | Pet object that needs to be added to the store
+
+ try
+ {
+ // Add a new pet to the store
+ apiInstance.AddPet(pet);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.AddPet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the AddPetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Add a new pet to the store
+ apiInstance.AddPetWithHttpInfo(pet);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PetApi.AddPetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/xml
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
+[[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)
+
+
+# **DeletePet**
+> void DeletePet (long petId, string? apiKey = null)
+
+Deletes a pet
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class DeletePetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var petId = 789L; // long | Pet id to delete
+ var apiKey = "apiKey_example"; // string? | (optional)
+
+ try
+ {
+ // Deletes a pet
+ apiInstance.DeletePet(petId, apiKey);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the DeletePetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Deletes a pet
+ apiInstance.DeletePetWithHttpInfo(petId, apiKey);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PetApi.DeletePetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | Pet id to delete | |
+| **apiKey** | **string?** | | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid pet value | - |
+
+[[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)
+
+
+# **FindPetsByStatus**
+> List<Pet> FindPetsByStatus (List status)
+
+Finds Pets by status
+
+Multiple status values can be provided with comma separated strings
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class FindPetsByStatusExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var status = new List(); // List | Status values that need to be considered for filter
+
+ try
+ {
+ // Finds Pets by status
+ List result = apiInstance.FindPetsByStatus(status);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FindPetsByStatusWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Finds Pets by status
+ ApiResponse> response = apiInstance.FindPetsByStatusWithHttpInfo(status);
+ 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 PetApi.FindPetsByStatusWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **status** | [**List<string>**](string.md) | Status values that need to be considered for filter | |
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+| **2XX** | Anything within 200-299 | - |
+| **4XX** | Anything within 400-499 | - |
+
+[[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)
+
+
+# **FindPetsByTags**
+> List<Pet> FindPetsByTags (List tags)
+
+Finds Pets by tags
+
+Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class FindPetsByTagsExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var tags = new List(); // List | Tags to filter by
+
+ try
+ {
+ // Finds Pets by tags
+ List result = apiInstance.FindPetsByTags(tags);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FindPetsByTagsWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Finds Pets by tags
+ ApiResponse> response = apiInstance.FindPetsByTagsWithHttpInfo(tags);
+ 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 PetApi.FindPetsByTagsWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **tags** | [**List<string>**](string.md) | Tags to filter by | |
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid tag value | - |
+
+[[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)
+
+
+# **GetPetById**
+> Pet GetPetById (long petId)
+
+Find pet by ID
+
+Returns a single pet
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class GetPetByIdExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure API key authorization: api_key
+ config.AddApiKey("api-key", "YOUR_API_KEY");
+ // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+ // config.AddApiKeyPrefix("api-key", "Bearer");
+ // Configure API key authorization: api_key_query
+ config.AddApiKey("api_key_query", "YOUR_API_KEY");
+ // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+ // config.AddApiKeyPrefix("api_key_query", "Bearer");
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var petId = 789L; // long | ID of pet to return
+
+ try
+ {
+ // Find pet by ID
+ Pet result = apiInstance.GetPetById(petId);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetPetByIdWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Find pet by ID
+ ApiResponse response = apiInstance.GetPetByIdWithHttpInfo(petId);
+ 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 PetApi.GetPetByIdWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | ID of pet to return | |
+
+### Return type
+
+[**Pet**](Pet.md)
+
+### Authorization
+
+[api_key](../README.md#api_key), [api_key_query](../README.md#api_key_query)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+
+[[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)
+
+
+# **UpdatePet**
+> void UpdatePet (Pet pet)
+
+Update an existing pet
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class UpdatePetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var pet = new Pet(); // Pet | Pet object that needs to be added to the store
+
+ try
+ {
+ // Update an existing pet
+ apiInstance.UpdatePet(pet);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UpdatePetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Update an existing pet
+ apiInstance.UpdatePetWithHttpInfo(pet);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PetApi.UpdatePetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/xml
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+| **405** | Validation exception | - |
+
+[[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)
+
+
+# **UpdatePetWithForm**
+> void UpdatePetWithForm (long petId, string? name = null, string? status = null)
+
+Updates a pet in the store with form data
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class UpdatePetWithFormExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var petId = 789L; // long | ID of pet that needs to be updated
+ var name = "name_example"; // string? | Updated name of the pet (optional)
+ var status = "status_example"; // string? | Updated status of the pet (optional)
+
+ try
+ {
+ // Updates a pet in the store with form data
+ apiInstance.UpdatePetWithForm(petId, name, status);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UpdatePetWithFormWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Updates a pet in the store with form data
+ apiInstance.UpdatePetWithFormWithHttpInfo(petId, name, status);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PetApi.UpdatePetWithFormWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | ID of pet that needs to be updated | |
+| **name** | **string?** | Updated name of the pet | [optional] |
+| **status** | **string?** | Updated status of the pet | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
+[[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)
+
+
+# **UploadFile**
+> ApiResponse UploadFile (long petId, string? additionalMetadata = null, FileParameter? file = null)
+
+uploads an image
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class UploadFileExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var petId = 789L; // long | ID of pet to update
+ var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional)
+ var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter? | file to upload (optional)
+
+ try
+ {
+ // uploads an image
+ ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UploadFileWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // uploads an image
+ ApiResponse response = apiInstance.UploadFileWithHttpInfo(petId, additionalMetadata, file);
+ 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 PetApi.UploadFileWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | ID of pet to update | |
+| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] |
+| **file** | **FileParameter?****FileParameter?** | file to upload | [optional] |
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+
+### 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)
+
+
+# **UploadFileWithRequiredFile**
+> ApiResponse UploadFileWithRequiredFile (long petId, FileParameter requiredFile, string? additionalMetadata = null)
+
+uploads an image (required)
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class UploadFileWithRequiredFileExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new PetApi(httpClient, config, httpClientHandler);
+ var petId = 789L; // long | ID of pet to update
+ var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | file to upload
+ var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional)
+
+ try
+ {
+ // uploads an image (required)
+ ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UploadFileWithRequiredFileWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // uploads an image (required)
+ ApiResponse response = apiInstance.UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata);
+ 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 PetApi.UploadFileWithRequiredFileWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | ID of pet to update | |
+| **requiredFile** | **FileParameter****FileParameter** | file to upload | |
+| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] |
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+
+
+### 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/petstore/csharp/httpclient/net9/Petstore/docs/Pig.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Pig.md
new file mode 100644
index 000000000000..6e86d0760d5b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Pig.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.Pig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/PolymorphicProperty.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/PolymorphicProperty.md
new file mode 100644
index 000000000000..8262a41c50d5
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/PolymorphicProperty.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.PolymorphicProperty
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Quadrilateral.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Quadrilateral.md
new file mode 100644
index 000000000000..0165ddcc0e4b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Quadrilateral.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Quadrilateral
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/QuadrilateralInterface.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/QuadrilateralInterface.md
new file mode 100644
index 000000000000..6daf340a1415
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/QuadrilateralInterface.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.QuadrilateralInterface
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ReadOnlyFirst.md
new file mode 100644
index 000000000000..b3f4a17ea34e
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ReadOnlyFirst.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.ReadOnlyFirst
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Bar** | **string** | | [optional] [readonly]
+**Baz** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RequiredClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RequiredClass.md
new file mode 100644
index 000000000000..7f734db8a618
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RequiredClass.md
@@ -0,0 +1,53 @@
+# Org.OpenAPITools.Model.RequiredClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**RequiredNullableIntegerProp** | **int?** | |
+**RequiredNotnullableintegerProp** | **int** | |
+**NotRequiredNullableIntegerProp** | **int?** | | [optional]
+**NotRequiredNotnullableintegerProp** | **int** | | [optional]
+**RequiredNullableStringProp** | **string** | |
+**RequiredNotnullableStringProp** | **string** | |
+**NotrequiredNullableStringProp** | **string** | | [optional]
+**NotrequiredNotnullableStringProp** | **string** | | [optional]
+**RequiredNullableBooleanProp** | **bool?** | |
+**RequiredNotnullableBooleanProp** | **bool** | |
+**NotrequiredNullableBooleanProp** | **bool?** | | [optional]
+**NotrequiredNotnullableBooleanProp** | **bool** | | [optional]
+**RequiredNullableDateProp** | **DateOnly?** | |
+**RequiredNotNullableDateProp** | **DateOnly** | |
+**NotRequiredNullableDateProp** | **DateOnly?** | | [optional]
+**NotRequiredNotnullableDateProp** | **DateOnly** | | [optional]
+**RequiredNotnullableDatetimeProp** | **DateTime** | |
+**RequiredNullableDatetimeProp** | **DateTime?** | |
+**NotrequiredNullableDatetimeProp** | **DateTime?** | | [optional]
+**NotrequiredNotnullableDatetimeProp** | **DateTime** | | [optional]
+**RequiredNullableEnumInteger** | **int?** | |
+**RequiredNotnullableEnumInteger** | **int** | |
+**NotrequiredNullableEnumInteger** | **int?** | | [optional]
+**NotrequiredNotnullableEnumInteger** | **int** | | [optional]
+**RequiredNullableEnumIntegerOnly** | **int?** | |
+**RequiredNotnullableEnumIntegerOnly** | **int** | |
+**NotrequiredNullableEnumIntegerOnly** | **int?** | | [optional]
+**NotrequiredNotnullableEnumIntegerOnly** | **int** | | [optional]
+**RequiredNotnullableEnumString** | **string** | |
+**RequiredNullableEnumString** | **string** | |
+**NotrequiredNullableEnumString** | **string** | | [optional]
+**NotrequiredNotnullableEnumString** | **string** | | [optional]
+**RequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | |
+**RequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | |
+**NotrequiredNullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional]
+**NotrequiredNotnullableOuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional]
+**RequiredNullableUuid** | **Guid?** | |
+**RequiredNotnullableUuid** | **Guid** | |
+**NotrequiredNullableUuid** | **Guid?** | | [optional]
+**NotrequiredNotnullableUuid** | **Guid** | | [optional]
+**RequiredNullableArrayOfString** | **List<string>** | |
+**RequiredNotnullableArrayOfString** | **List<string>** | |
+**NotrequiredNullableArrayOfString** | **List<string>** | | [optional]
+**NotrequiredNotnullableArrayOfString** | **List<string>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Return.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Return.md
new file mode 100644
index 000000000000..a10daf95cf1d
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Return.md
@@ -0,0 +1,14 @@
+# Org.OpenAPITools.Model.Return
+Model for testing reserved words
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarReturn** | **int** | | [optional]
+**Lock** | **string** | |
+**Abstract** | **string** | |
+**Unsafe** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RolesReportsHash.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RolesReportsHash.md
new file mode 100644
index 000000000000..309b0c02615c
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RolesReportsHash.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.RolesReportsHash
+Role report Hash
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**RoleUuid** | **Guid** | | [optional]
+**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RolesReportsHashRole.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RolesReportsHashRole.md
new file mode 100644
index 000000000000..6f9affc24032
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/RolesReportsHashRole.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.RolesReportsHashRole
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ScaleneTriangle.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ScaleneTriangle.md
new file mode 100644
index 000000000000..76da8f1de817
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ScaleneTriangle.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.ScaleneTriangle
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Shape.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Shape.md
new file mode 100644
index 000000000000..9a54628cd411
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Shape.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Shape
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ShapeInterface.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ShapeInterface.md
new file mode 100644
index 000000000000..57456d6793fe
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ShapeInterface.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.ShapeInterface
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ShapeOrNull.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ShapeOrNull.md
new file mode 100644
index 000000000000..cbf61ebe77a6
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ShapeOrNull.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.ShapeOrNull
+The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/SimpleQuadrilateral.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/SimpleQuadrilateral.md
new file mode 100644
index 000000000000..c329495425d1
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/SimpleQuadrilateral.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.SimpleQuadrilateral
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/SpecialModelName.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/SpecialModelName.md
new file mode 100644
index 000000000000..7f8ffca34fa1
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/SpecialModelName.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.SpecialModelName
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**SpecialPropertyName** | **long** | | [optional]
+**VarSpecialModelName** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/StoreApi.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/StoreApi.md
new file mode 100644
index 000000000000..906dd878740b
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/StoreApi.md
@@ -0,0 +1,389 @@
+# Org.OpenAPITools.Api.StoreApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID |
+| [**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status |
+| [**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID |
+| [**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet |
+
+
+# **DeleteOrder**
+> void DeleteOrder (string orderId)
+
+Delete purchase order by ID
+
+For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class DeleteOrderExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new StoreApi(httpClient, config, httpClientHandler);
+ var orderId = "orderId_example"; // string | ID of the order that needs to be deleted
+
+ try
+ {
+ // Delete purchase order by ID
+ apiInstance.DeleteOrder(orderId);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the DeleteOrderWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Delete purchase order by ID
+ apiInstance.DeleteOrderWithHttpInfo(orderId);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling StoreApi.DeleteOrderWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **orderId** | **string** | ID of the order that needs to be deleted | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+[[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)
+
+
+# **GetInventory**
+> Dictionary<string, int> GetInventory ()
+
+Returns pet inventories by status
+
+Returns a map of status codes to quantities
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class GetInventoryExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure API key authorization: api_key
+ config.AddApiKey("api-key", "YOUR_API_KEY");
+ // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+ // config.AddApiKeyPrefix("api-key", "Bearer");
+
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new StoreApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ // Returns pet inventories by status
+ Dictionary result = apiInstance.GetInventory();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetInventoryWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Returns pet inventories by status
+ ApiResponse> response = apiInstance.GetInventoryWithHttpInfo();
+ 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 StoreApi.GetInventoryWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+**Dictionary**
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### 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)
+
+
+# **GetOrderById**
+> Order GetOrderById (long orderId)
+
+Find purchase order by ID
+
+For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class GetOrderByIdExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new StoreApi(httpClient, config, httpClientHandler);
+ var orderId = 789L; // long | ID of pet that needs to be fetched
+
+ try
+ {
+ // Find purchase order by ID
+ Order result = apiInstance.GetOrderById(orderId);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetOrderByIdWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Find purchase order by ID
+ ApiResponse response = apiInstance.GetOrderByIdWithHttpInfo(orderId);
+ 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 StoreApi.GetOrderByIdWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **orderId** | **long** | ID of pet that needs to be fetched | |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+[[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)
+
+
+# **PlaceOrder**
+> Order PlaceOrder (Order order)
+
+Place an order for a pet
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class PlaceOrderExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new StoreApi(httpClient, config, httpClientHandler);
+ var order = new Order(); // Order | order placed for purchasing the pet
+
+ try
+ {
+ // Place an order for a pet
+ Order result = apiInstance.PlaceOrder(order);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the PlaceOrderWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Place an order for a pet
+ ApiResponse response = apiInstance.PlaceOrderWithHttpInfo(order);
+ 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 StoreApi.PlaceOrderWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **order** | [**Order**](Order.md) | order placed for purchasing the pet | |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid Order | - |
+
+[[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/petstore/csharp/httpclient/net9/Petstore/docs/Tag.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Tag.md
new file mode 100644
index 000000000000..fdd22eb31fdd
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Tag.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Tag
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**Name** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestCollectionEndingWithWordList.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestCollectionEndingWithWordList.md
new file mode 100644
index 000000000000..0e5568637b89
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestCollectionEndingWithWordList.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.TestCollectionEndingWithWordList
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Value** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestCollectionEndingWithWordListObject.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestCollectionEndingWithWordListObject.md
new file mode 100644
index 000000000000..7213b3ca8d94
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestCollectionEndingWithWordListObject.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.TestCollectionEndingWithWordListObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**TestCollectionEndingWithWordList** | [**List<TestCollectionEndingWithWordList>**](TestCollectionEndingWithWordList.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestInlineFreeformAdditionalPropertiesRequest.md
new file mode 100644
index 000000000000..c1cf9ce2f812
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TestInlineFreeformAdditionalPropertiesRequest.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.TestInlineFreeformAdditionalPropertiesRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**SomeProperty** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Triangle.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Triangle.md
new file mode 100644
index 000000000000..c4d0452b4e80
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Triangle.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Triangle
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TriangleInterface.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TriangleInterface.md
new file mode 100644
index 000000000000..e0d8b5a59135
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/TriangleInterface.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.TriangleInterface
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/User.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/User.md
new file mode 100644
index 000000000000..b0cd4dc042bf
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/User.md
@@ -0,0 +1,21 @@
+# Org.OpenAPITools.Model.User
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**Username** | **string** | | [optional]
+**FirstName** | **string** | | [optional]
+**LastName** | **string** | | [optional]
+**Email** | **string** | | [optional]
+**Password** | **string** | | [optional]
+**Phone** | **string** | | [optional]
+**UserStatus** | **int** | User Status | [optional]
+**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional]
+**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional]
+**AnyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional]
+**AnyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/UserApi.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/UserApi.md
new file mode 100644
index 000000000000..0e5c25a6eff8
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/UserApi.md
@@ -0,0 +1,747 @@
+# Org.OpenAPITools.Api.UserApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**CreateUser**](UserApi.md#createuser) | **POST** /user | Create user |
+| [**CreateUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array |
+| [**CreateUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array |
+| [**DeleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user |
+| [**GetUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name |
+| [**LoginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system |
+| [**LogoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session |
+| [**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user |
+
+
+# **CreateUser**
+> void CreateUser (User user)
+
+Create user
+
+This can only be done by the logged in user.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class CreateUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new UserApi(httpClient, config, httpClientHandler);
+ var user = new User(); // User | Created user object
+
+ try
+ {
+ // Create user
+ apiInstance.CreateUser(user);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the CreateUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Create user
+ apiInstance.CreateUserWithHttpInfo(user);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.CreateUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **user** | [**User**](User.md) | Created user object | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | 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)
+
+
+# **CreateUsersWithArrayInput**
+> void CreateUsersWithArrayInput (List user)
+
+Creates list of users with given input array
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class CreateUsersWithArrayInputExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new UserApi(httpClient, config, httpClientHandler);
+ var user = new List(); // List | List of user object
+
+ try
+ {
+ // Creates list of users with given input array
+ apiInstance.CreateUsersWithArrayInput(user);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the CreateUsersWithArrayInputWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Creates list of users with given input array
+ apiInstance.CreateUsersWithArrayInputWithHttpInfo(user);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInputWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **user** | [**List<User>**](User.md) | List of user object | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | 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)
+
+
+# **CreateUsersWithListInput**
+> void CreateUsersWithListInput (List user)
+
+Creates list of users with given input array
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class CreateUsersWithListInputExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new UserApi(httpClient, config, httpClientHandler);
+ var user = new List(); // List | List of user object
+
+ try
+ {
+ // Creates list of users with given input array
+ apiInstance.CreateUsersWithListInput(user);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the CreateUsersWithListInputWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Creates list of users with given input array
+ apiInstance.CreateUsersWithListInputWithHttpInfo(user);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.CreateUsersWithListInputWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **user** | [**List<User>**](User.md) | List of user object | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | 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)
+
+
+# **DeleteUser**
+> void DeleteUser (string username)
+
+Delete user
+
+This can only be done by the logged in user.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class DeleteUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new UserApi(httpClient, config, httpClientHandler);
+ var username = "username_example"; // string | The name that needs to be deleted
+
+ try
+ {
+ // Delete user
+ apiInstance.DeleteUser(username);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the DeleteUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Delete user
+ apiInstance.DeleteUserWithHttpInfo(username);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.DeleteUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **username** | **string** | The name that needs to be deleted | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+[[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)
+
+
+# **GetUserByName**
+> User GetUserByName (string username)
+
+Get user by user name
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class GetUserByNameExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new UserApi(httpClient, config, httpClientHandler);
+ var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing.
+
+ try
+ {
+ // Get user by user name
+ User result = apiInstance.GetUserByName(username);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetUserByNameWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Get user by user name
+ ApiResponse response = apiInstance.GetUserByNameWithHttpInfo(username);
+ 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 UserApi.GetUserByNameWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **username** | **string** | The name that needs to be fetched. Use user1 for testing. | |
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+| **598** | Not a real HTTP status code | - |
+| **599** | Not a real HTTP status code with a return object | - |
+
+[[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)
+
+
+# **LoginUser**
+> string LoginUser (string username, string password)
+
+Logs user into the system
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class LoginUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new UserApi(httpClient, config, httpClientHandler);
+ var username = "username_example"; // string | The user name for login
+ var password = "password_example"; // string | The password for login in clear text
+
+ try
+ {
+ // Logs user into the system
+ string result = apiInstance.LoginUser(username, password);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the LoginUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Logs user into the system
+ ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password);
+ 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 UserApi.LoginUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **username** | **string** | The user name for login | |
+| **password** | **string** | The password for login in clear text | |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
|
+| **400** | Invalid username/password supplied | - |
+
+[[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)
+
+
+# **LogoutUser**
+> void LogoutUser ()
+
+Logs out current logged in user session
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class LogoutUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new UserApi(httpClient, config, httpClientHandler);
+
+ try
+ {
+ // Logs out current logged in user session
+ apiInstance.LogoutUser();
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the LogoutUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Logs out current logged in user session
+ apiInstance.LogoutUserWithHttpInfo();
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.LogoutUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### 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**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | 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)
+
+
+# **UpdateUser**
+> void UpdateUser (string username, User user)
+
+Updated user
+
+This can only be done by the logged in user.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Net.Http;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class UpdateUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
+ HttpClient httpClient = new HttpClient();
+ HttpClientHandler httpClientHandler = new HttpClientHandler();
+ var apiInstance = new UserApi(httpClient, config, httpClientHandler);
+ var username = "username_example"; // string | name that need to be deleted
+ var user = new User(); // User | Updated user object
+
+ try
+ {
+ // Updated user
+ apiInstance.UpdateUser(username, user);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UpdateUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Updated user
+ apiInstance.UpdateUserWithHttpInfo(username, user);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.UpdateUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **username** | **string** | name that need to be deleted | |
+| **user** | [**User**](User.md) | Updated user object | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid user supplied | - |
+| **404** | User not found | - |
+
+[[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/petstore/csharp/httpclient/net9/Petstore/docs/Whale.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Whale.md
new file mode 100644
index 000000000000..5fc3dc7f85c2
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Whale.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.Whale
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**HasBaleen** | **bool** | | [optional]
+**HasTeeth** | **bool** | | [optional]
+**ClassName** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Zebra.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Zebra.md
new file mode 100644
index 000000000000..31e686adf0e7
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/Zebra.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Zebra
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Type** | **string** | | [optional]
+**ClassName** | **string** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ZeroBasedEnum.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ZeroBasedEnum.md
new file mode 100644
index 000000000000..9be7014a06fe
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ZeroBasedEnum.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.ZeroBasedEnum
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ZeroBasedEnumClass.md b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ZeroBasedEnumClass.md
new file mode 100644
index 000000000000..b804bc0d7fb4
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/docs/ZeroBasedEnumClass.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.ZeroBasedEnumClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ZeroBasedEnum** | **string** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh b/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh
new file mode 100644
index 000000000000..f53a75d4fabe
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/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/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs
new file mode 100644
index 000000000000..5b557cf1ee7c
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs
@@ -0,0 +1,68 @@
+/*
+ * 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: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Reflection;
+using Xunit;
+
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Api;
+// uncomment below to import models
+//using Org.OpenAPITools.Model;
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Class for testing AnotherFakeApi
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the API endpoint.
+ ///
+ public class AnotherFakeApiTests : IDisposable
+ {
+ private AnotherFakeApi instance;
+
+ public AnotherFakeApiTests()
+ {
+ instance = new AnotherFakeApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of AnotherFakeApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsType' AnotherFakeApi
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test Call123TestSpecialTags
+ ///
+ [Fact]
+ public void Call123TestSpecialTagsTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //ModelClient modelClient = null;
+ //var response = instance.Call123TestSpecialTags(modelClient);
+ //Assert.IsType(response);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs b/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs
new file mode 100644
index 000000000000..1ec3e8933caa
--- /dev/null
+++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs
@@ -0,0 +1,111 @@
+/*
+ * 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: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Reflection;
+using Xunit;
+
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Api;
+// uncomment below to import models
+//using Org.OpenAPITools.Model;
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Class for testing DefaultApi
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the API endpoint.
+ ///
+ public class DefaultApiTests : IDisposable
+ {
+ private DefaultApi instance;
+
+ public DefaultApiTests()
+ {
+ instance = new DefaultApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of DefaultApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsType' DefaultApi
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test FooGet
+ ///
+ [Fact]
+ public void FooGetTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.FooGet();
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test GetCountry
+ ///
+ [Fact]
+ public void GetCountryTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //string country = null;
+ //instance.GetCountry(country);
+ }
+
+ ///
+ /// Test Hello
+ ///
+ [Fact]
+ public void HelloTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.Hello();
+ //Assert.IsType>(response);
+ }
+
+ ///
+ /// Test RolesReportGet
+ ///
+ [Fact]
+ public void RolesReportGetTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.RolesReportGet();
+ //Assert.IsType>>(response);
+ }
+
+ ///