diff --git a/.java-version b/.java-version
index 2cb7d30021..6259340971 100644
--- a/.java-version
+++ b/.java-version
@@ -1 +1 @@
-oracle64-1.8.0.152
\ No newline at end of file
+1.8
diff --git a/.travis.yml b/.travis.yml
index 5d79028475..f47f448b87 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -131,6 +131,12 @@ script:
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
- mvn --quiet --batch-mode --show-version clean install
- mvn --quiet --batch-mode --show-version verify -Psamples
+ # test maven plugin
+ - mvn clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml
+ - mvn clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml
+ # test gradle plugin
+ - (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk)
+ - (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
after_success:
# push to maven repo
- if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh
index 9b780d2f19..417f34349f 100755
--- a/CI/circle_parallel.sh
+++ b/CI/circle_parallel.sh
@@ -12,6 +12,15 @@ if [ "$NODE_INDEX" = "1" ]; then
#cp CI/pom.xml.circleci pom.xml
java -version
mvn --quiet verify -Psamples.circleci
+
+ # generate all petstore samples (client, servers, doc)
+ ./bin/run-all-petstore
+ # generate all petstore samples (openapi3)
+ ./bin/openapi3/run-all-petstore
+ # generate test scripts
+ ./bin/tests/run-all-test
+ # test all generators with fake petstore spec (2.0, 3.0)
+ ./bin/utils/test-fake-petstore-for-all.sh
elif [ "$NODE_INDEX" = "2" ]; then
# run ensure-up-to-date sample script on SNAPSHOT version only
project_version=`mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout`
diff --git a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index e510bba3f5..c7a19d07a9 100644
--- a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -47,16 +47,16 @@ OpenAPI spec version: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll
@@ -65,10 +65,10 @@ OpenAPI spec version: 1.0.0
..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll
- $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll
+ $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll
diff --git a/README.md b/README.md
index a079e9c601..8ea13ee6e4 100644
--- a/README.md
+++ b/README.md
@@ -2,15 +2,15 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.1`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.3`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
-[`4.1.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.0.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
-[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
-[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
+[`4.1.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.1.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
+[](https://circleci.com/gh/OpenAPITools/openapi-generator)
+[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
+[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[`5.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/5.0.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
@@ -99,8 +99,8 @@ OpenAPI Generator Version | Release Date | Notes
---------------------------- | ------------ | -----
5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback)
4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 15.07.2019 | Minor release (breaking changes with fallbacks)
-4.0.2 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.1-SNAPSHOT/)| 15.06.2019 | Patch release (minor bug fixes, etc)
-[4.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.1) (latest stable release) | 31.05.2019 | Patch release (bug fixes, minor enhancements, etc)
+4.0.3 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.3-SNAPSHOT/)| 04.07.2019 | Patch release (minor bug fixes, etc)
+[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 20.06.2019 | Patch release (bug fixes, minor enhancements, etc)
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
@@ -153,19 +153,19 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
* [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc)
### [1.3 - Download JAR](#table-of-contents)
-
+
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
-JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar`
+JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar`
For **Mac/Linux** users:
```sh
-wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar -O openapi-generator-cli.jar
+wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar -O openapi-generator-cli.jar
```
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
```
-Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -175,7 +175,7 @@ For Mac users, please make sure Java 8 is installed (Tips: run `java -version` t
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export PATH=${JAVA_HOME}/bin:$PATH
```
-
+
### Launcher Script
One downside to manual jar downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator.cli.sh](./bin/utils/openapi-generator-cli.sh) which resolves this issue.
@@ -368,10 +368,11 @@ npm install @openapitools/openapi-generator-cli -g
openapi-generator version
```
-Or install a particualar OpenAPI Generator version (e.g. v4.0.1):
+
+Or install a particular OpenAPI Generator version (e.g. v4.0.2):
```sh
-npm install @openapitools/openapi-generator-cli@cli-4.0.1 -g
+npm install @openapitools/openapi-generator-cli@cli-4.0.2 -g
```
Or install it as dev-dependency:
@@ -379,7 +380,7 @@ Or install it as dev-dependency:
```sh
npm install @openapitools/openapi-generator-cli -D
```
-
+
## [2 - Getting Started](#table-of-contents)
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml), please run the following
@@ -394,7 +395,9 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
```
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`)
-You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar)
+
+You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar)
+
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@@ -536,6 +539,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [codecentric AG](https://www.codecentric.de/)
- [Cupix](https://www.cupix.com/)
- [FormAPI](https://formapi.io/)
+- [Fuse](https://www.fuse.no/)
- [GenFlow](https://github.com/RepreZen/GenFlow)
- [GMO Pepabo](https://pepabo.com/en/)
- [GoDaddy](https://godaddy.com)
@@ -590,7 +594,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2019-05-01 - [Design and generate a REST API from Swagger / OpenAPI in Java, Python, C# and more](https://simply-how.com/design-and-generate-api-code-from-openapi) by [Simply How](https://simply-how.com/)
- 2019-05-17 - [Generate Spring Boot REST API using Swagger/OpenAPI](https://www.47northlabs.com/knowledge-base/generate-spring-boot-rest-api-using-swagger-openapi/) by [Antonie Zafirov](https://www.47northlabs.com/author/antonie-zafirov/)
- 2019-05-22 - [REST APIs代码生成指南(OpenAPI Generator)](https://gum.co/openapi_generator_ebook_gb) by [William Cheng](https://twitter.com/wing328), [Xin Meng](https://github.com/xmeng1)
-- 2019-05/24 - [REST API 代碼生成指南 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328)
+- 2019-05-24 - [REST API 代碼生成指南 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328)
+- 2019-06-24 - [Kubernetes Clients and OpenAPI Generator](https://speakerdeck.com/wing328/kubernetes-clients-and-openapi-generator) by [William Cheng](https://twitter.com/wing328) at [Kubernetes Contributor Summits Shanghai 2019](https://www.lfasiallc.com/events/contributors-summit-china-2019/)
## [6 - About Us](#table-of-contents)
@@ -603,7 +608,8 @@ OpenAPI Generator core team members are contributors who have been making signif
* [@jimschubert](https://github.com/jimschubert) (2016/05) [:heart:](https://www.patreon.com/jimschubert)
* [@cbornet](https://github.com/cbornet) (2016/05)
* [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview)
-* [@jmini](https://github.com/jmini) (2018/04)
+* [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini)
+* [@etherealjoy](https://github.com/etherealjoy) (2019/06)
:heart: = Link to support the contributor directly
@@ -774,7 +780,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Lua | @daurnimator (2017/08) |
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
| ObjC | |
-| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) |
+| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) |
| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) |
| PowerShell | |
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) |
@@ -811,7 +817,7 @@ OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/
- [Jean-François Côté](https://github.com/JFCote)
- [Jim Schubert](https://github.com/jimschubert)
- [Jon Schoning](https://github.com/jonschoning)
-- [Jérémie Bresson](https://github.com/jmini)
+- [Jérémie Bresson](https://github.com/jmini) [:heart:](https://www.patreon.com/jmini)
- [Jörn Ahrens](https://github.com/jayearn)
- [Keni Steward](https://github.com/kenisteward)
- [Marcin Stefaniuk](https://github.com/mstefaniuk)
diff --git a/appveyor.yml b/appveyor.yml
index 4b387578e8..afafbd2e70 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -50,7 +50,7 @@ build_script:
# install openapi-generator locally
- mvn clean install --quiet
# run the locally installed openapi-generator-gradle-plugin
- - gradle -PopenApiGeneratorVersion=4.0.2-SNAPSHOT -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info
+ - gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info
test_script:
# restore test-related files
- copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
@@ -58,9 +58,9 @@ test_script:
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test c# API client
- - nunit-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
+ - nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
# test c# API client (with PropertyChanged)
- - nunit-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
+ - nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
# generate all petstore clients
- .\bin\windows\run-all-petstore.cmd
diff --git a/bin/cpp-restsdk-petstore.sh b/bin/cpp-restsdk-petstore.sh
index 1c5f0ad54e..ad9090d0b5 100755
--- a/bin/cpp-restsdk-petstore.sh
+++ b/bin/cpp-restsdk-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/cpp-rest-sdk-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk $@"
+ags="generate -t modules/openapi-generator/src/main/resources/cpp-rest-sdk-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk/client $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/csharp-petstore.sh b/bin/csharp-petstore.sh
index 4185295fa1..cbfeb6fab0 100755
--- a/bin/csharp-petstore.sh
+++ b/bin/csharp-petstore.sh
@@ -32,6 +32,6 @@ ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-
java $JAVA_OPTS -jar $executable $ags
# restore csproj file
-echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
+echo "restore csproject file: CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
cp ./CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
diff --git a/bin/kotlin-springboot-petstore-all.sh b/bin/kotlin-springboot-petstore-all.sh
new file mode 100755
index 0000000000..b0ba7a6e82
--- /dev/null
+++ b/bin/kotlin-springboot-petstore-all.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./bin/kotlin-springboot-petstore-server.sh
+./bin/kotlin-springboot-petstore-server-reactive.sh
\ No newline at end of file
diff --git a/bin/kotlin-springboot-petstore-server-reactive.sh b/bin/kotlin-springboot-petstore-server-reactive.sh
new file mode 100755
index 0000000000..f5e72350b6
--- /dev/null
+++ b/bin/kotlin-springboot-petstore-server-reactive.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=$(ls -ld "$SCRIPT")
+ link=$(expr "$ls" : '.*-> \(.*\)$')
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=$(dirname "$SCRIPT")/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=$(dirname "$SCRIPT")/..
+ APP_DIR=$(cd "${APP_DIR}"; pwd)
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn clean package
+fi
+
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot-reactive --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,reactive=true"
+
+echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot-reactive"
+rm -rf samples/server/petstore/kotlin-springboot-reactive
+
+echo "Generating Kotling Spring Boot reactive server..."
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/nodejs-petstore-google-cloud-functions.sh b/bin/nodejs-petstore-google-cloud-functions.sh
index c3db5f9bcb..bfb02d960d 100755
--- a/bin/nodejs-petstore-google-cloud-functions.sh
+++ b/bin/nodejs-petstore-google-cloud-functions.sh
@@ -26,7 +26,7 @@ then
fi
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/nodejs-petstore-server.sh b/bin/nodejs-petstore-server.sh
index 9c8f945116..fbbed3e46f 100755
--- a/bin/nodejs-petstore-server.sh
+++ b/bin/nodejs-petstore-server.sh
@@ -26,7 +26,7 @@ then
fi
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice"
-ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/kotlin-springboot-petstore-all.sh b/bin/openapi3/kotlin-springboot-petstore-all.sh
new file mode 100755
index 0000000000..7aa4f697bb
--- /dev/null
+++ b/bin/openapi3/kotlin-springboot-petstore-all.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./bin/openapi3/kotlin-springboot-petstore-server.sh
+./bin/openapi3/kotlin-springboot-petstore-server-reactive.sh
diff --git a/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh b/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh
new file mode 100755
index 0000000000..8c0d80c4e5
--- /dev/null
+++ b/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=$(ls -ld "$SCRIPT")
+ link=$(expr "$ls" : '.*-> \(.*\)$')
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=$(dirname "$SCRIPT")/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=$(dirname "$SCRIPT")/..
+ APP_DIR=$(cd "${APP_DIR}"; pwd)
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn clean package
+fi
+
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/openapi3/petstore/kotlin-springboot-reactive --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,reactive=true"
+
+echo "Cleaning previously generated files if any from samples/server/openapi3/petstore/kotlin-springboot-reactive"
+rm -rf samples/server/openapi3/petstore/kotlin-springboot-reactive
+
+echo "Generating Kotling Spring Boot server..."
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh
index 33018310a4..00ab32fb9a 100755
--- a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh
+++ b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh
@@ -26,7 +26,7 @@ then
fi
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice"
-ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/nodejs-petstore-server.sh b/bin/openapi3/nodejs-petstore-server.sh
index 408bd20fba..a987aced35 100755
--- a/bin/openapi3/nodejs-petstore-server.sh
+++ b/bin/openapi3/nodejs-petstore-server.sh
@@ -26,7 +26,7 @@ then
fi
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice"
-ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date
index 3d5909a88d..166c8c60bd 100755
--- a/bin/utils/ensure-up-to-date
+++ b/bin/utils/ensure-up-to-date
@@ -25,6 +25,7 @@ declare -a scripts=(
"./bin/kotlin-client-threetenbp.sh"
"./bin/kotlin-server-petstore.sh"
"./bin/kotlin-springboot-petstore-server.sh"
+"./bin/kotlin-springboot-petstore-server-reactive.sh"
"./bin/mysql-schema-petstore.sh"
"./bin/python-petstore-all.sh"
"./bin/openapi3/python-petstore.sh"
@@ -51,9 +52,11 @@ declare -a scripts=(
"./bin/csharp-netcore-petstore-all.sh"
"./bin/elixir-petstore.sh"
"./bin/go-petstore.sh"
+"./bin/go-petstore-withxml.sh"
"./bin/go-gin-petstore-server.sh"
"./bin/groovy-petstore.sh"
"./bin/apex-petstore.sh"
+"./bin/perl-petstore-all.sh"
#"./bin/elm-petstore-all.sh"
"./bin/meta-codegen.sh"
# OTHERS
diff --git a/bin/utils/release/bump.sh b/bin/utils/release/bump.sh
new file mode 100755
index 0000000000..1afeffde16
--- /dev/null
+++ b/bin/utils/release/bump.sh
@@ -0,0 +1,221 @@
+#!/usr/bin/env bash
+#
+# This script bumps from one version to another
+#
+# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+declare -r version_regex="([0-9]+).([0-9]+).([0-9]+)-?(SNAPSHOT){0,1}"
+declare start=""
+declare end=""
+declare from="${version_regex}"
+declare to=""
+declare debug=${debug:-false}
+declare -a from_parts=()
+declare -a to_parts=()
+declare -ar inc=(major minor build snapshot)
+
+USAGE="
+USAGE: $0 OPTIONS input_file
+
+ This script will bump a version number (or other value) between marker tags.
+
+OPTIONS:
+ -f The 'from' version
+ -t The 'to' version
+ -s The start tag regex
+ default: $start
+ -e The end tag regex
+ default: $end
+ -i Increase by one of: ${inc[@]}
+ -h Print this message
+
+EXAMPLES:
+
+Update to next snapshot version:
+ $0 -f 3.0.0 -t 3.0.1-SNAPSHOT pom.xml
+Update build version only (useful for docs)
+ $0 -f 3.0.0 -t 3.0.1 pom.xml
+Update from any version to any other version
+ $0 -f 1.2.3 -t 9.9.9-SNAPSHOT pom.xml
+Customize the start/end tags
+ $0 -f 1.0.0 1.0.1-SNAPSHOT -s \"\" -e \"\" pom.xml
+"
+
+
+## print an error message and exit
+err() {
+ >&2 echo -e "$1"
+ exit 1
+}
+
+## debug log messages. Run with debug=true ./bump.sh
+d() {
+ if [[ true = "${debug}" ]]; then
+ echo "$1"
+ fi
+}
+
+## outputs usage and exits
+usage()
+{
+ err "${USAGE}"
+ exit 1
+}
+
+## usage: version input extracted_array
+## - Checks that 'input' is a valid version
+## - Extracts the version parts into 'extracted_array'
+version()
+{
+ if [[ "$#" -ne 2 ]]; then
+ err "Call function version with two parameters: version string arr"
+ fi
+ local v=$1
+ if [[ "${v}" =~ $version_regex ]]; then
+ local major=${BASH_REMATCH[1]}
+ local minor=${BASH_REMATCH[2]}
+ local build=${BASH_REMATCH[3]}
+ local snapshot=false
+ if [[ "SNAPSHOT" = "${BASH_REMATCH[4]}" ]]; then
+ snapshot=true
+ fi
+
+ d "major=$major minor=$minor build=$build snapshot=$snapshot"
+
+ eval "$2=(${major} ${minor} ${build} ${snapshot})"
+ else
+ err "Invalid version: $v"
+ fi
+}
+
+while getopts "hf:t:s:e:i:" OPTION
+do
+ case ${OPTION} in
+ f)
+ from=${OPTARG}
+ ;;
+ t)
+ to=${OPTARG}
+ ;;
+ s)
+ start=${OPTARG}
+ ;;
+ e)
+ end=${OPTARG}
+ ;;
+ i)
+ increase=${OPTARG}
+ if [[ ! "${inc[@]}" =~ ${increase} ]];then
+ err "Only support increasing by one of: ${inc[@]}"
+ fi
+ ;;
+ h)
+ usage
+ ;;
+ esac
+done
+
+shift $((OPTIND-1))
+file=( "$@" )
+
+if [[ ${#file[@]} -eq 0 ]];then
+ echo "No file specified" >&2
+ usage
+fi
+
+if [[ -z "${from}" ]]; then
+ echo "No 'from' version specified." >&2
+ usage
+fi
+
+# TODO: compare steps in from_parts and to_parts.
+version "${from}" from_parts
+
+if [[ -z "${to}" ]]; then
+ if [[ -z "${increase}" ]]; then
+ err "No 'to' version specified."
+ else
+ case ${increase} in
+ major)
+ to="$(( ${from_parts[0]} + 1 )).0.0"
+ version "$to" to_parts
+ ;;
+ minor)
+ to="${from_parts[0]}.$(( ${from_parts[1]} + 1 )).0"
+ version "$to" to_parts
+ ;;
+ build)
+ to="${from_parts[0]}.${from_parts[1]}.$(( ${from_parts[2]} + 1 ))"
+ version "$to" to_parts
+ ;;
+ snapshot)
+ if [[ true = ${from_parts[3]} ]]; then
+ err "Can't move from SNAPSHOT to SNAPSHOT (from=${from})."
+ else
+ to="${from_parts[0]}.${from_parts[1]}.$(( ${from_parts[2]} + 1 ))-SNAPSHOT"
+ version "$to" to_parts
+ fi
+ ;;
+ esac
+ fi
+else
+ version "${to}" to_parts
+fi
+
+if [[ ${from_parts[3]} = true && ${to_parts[3]} = true ]]; then
+ err "Moving from SNAPSHOT to SNAPSHOT is not supported."
+fi
+
+cat < sedscript.sed
+/${start}/,/${end}/{
+ s/${from}/${to}/g
+}
+EOF
+
+d "Moving from=${from} to=${to}"
+
+trap 'rm -f sedscript.sed' EXIT
+
+sed_cross() {
+ # Cross-platform sed invocation. OSX has no option to show a version number in sed.
+ local target=$1
+ sed --version >/dev/null 2>&1 && sed -e -i '' -f sedscript.sed "$target" || sed -i '' -E -f sedscript.sed "$target"
+}
+
+update_file() {
+ local filename=$1
+ local error_message="ERROR: Failed to update $filename to target version ${to}"
+ local original_hash=$(ruby -r digest -e "p Digest::SHA2.file(\"$filename\").hexdigest")
+ local final_hash=""
+ if ! sed_cross ${filename}; then
+ # occurs if, for example, the file doesn't exist.
+ echo "ERROR: Failed to update $filename to target version ${to}" >&2
+ fi
+
+ local final_hash=$(ruby -r digest -e "p Digest::SHA2.file(\"$filename\").hexdigest")
+
+ if [[ "${original_hash}" = "${final_hash}" ]]; then
+ # occurs if, for example, the file doesn't have expected marker tags for replacement
+ echo "ERROR: $filename was not modified." >&2
+ else
+ echo "Updated $filename successfully!"
+ fi
+}
+
+for filename in "${file[@]}"; do
+ update_file ${filename}
+done
+
diff --git a/bin/utils/release/release_version_update.sh b/bin/utils/release/release_version_update.sh
new file mode 100755
index 0000000000..abc227a202
--- /dev/null
+++ b/bin/utils/release/release_version_update.sh
@@ -0,0 +1,96 @@
+#!/usr/bin/env bash
+#
+# This script is used to update files to the "latest" version.
+#
+# usage: ./bin/utils/release_version_update.sh
+# example: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1
+#
+# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+declare cwd=$(cd $(dirname "${BASH_SOURCE}") && pwd)
+declare root=$(cd "$cwd" && cd ../../../ && pwd)
+
+USAGE="
+USAGE: $0 target
+
+ This script will convert the current version in target files to the specified 'target'
+ where target is one of:
+
+ major
+ minor
+ build
+ snapshot
+
+EXAMPLES:
+
+Update to new snapshot (1.0.0 -> 1.0.1-SNAPSHOT):
+ $0 snapshot
+Update build version (1.0.0 -> 1.0.1)
+ $0 build
+Update minor version (1.2.3 -> 1.3.0)
+ $0 minor
+Update major version (1.2.3 -> 2.0.0)
+ $0 major
+"
+
+version=$(ruby -r rexml/document -e 'include REXML;
+ p XPath.first(Document.new($stdin), "/project/version/text()")' < ${cwd}/../../../pom.xml | tr -d '"')
+
+if [[ -n "$1" ]]; then
+ case $1 in
+ --help|-h)
+ echo -e "$USAGE" >&2
+ exit 1
+ ;;
+ major|minor|build|snapshot)
+ inc="$1"
+ ;;
+ *)
+ echo "Invalid target.Must be one of: major minor build or snapshot" >&2
+ exit 1
+ ;;
+ esac
+else
+ inc="snapshot"
+fi
+
+echo "Release preparation: Moving from $version to next $inc version."
+
+# These files should wrap target version replacement blocks with and
+# We can include xml and md files here.
+declare -a xml_files=(
+ "${root}/modules/openapi-generator-cli/pom.xml"
+ "${root}/modules/openapi-generator-gradle-plugin/pom.xml"
+ "${root}/modules/openapi-generator-core/pom.xml"
+ "${root}/modules/openapi-generator-maven-plugin/pom.xml"
+ "${root}/modules/openapi-generator-online/pom.xml"
+ "${root}/modules/openapi-generator/pom.xml"
+ "${root}/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml"
+ "${root}/modules/openapi-generator-maven-plugin/examples/java-client.xml"
+ "${root}/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
+ "${root}/modules/openapi-generator-maven-plugin/examples/non-java.xml"
+ "${root}/samples/meta-codegen/lib/pom.xml"
+ "${root}/pom.xml"
+)
+
+# These files should wrap target version replacement blocks with # RELEASE_VERSION and # /RELEASE_VERSION
+declare -a properties_files=(
+ "${root}/modules/openapi-generator-gradle-plugin/gradle.properties"
+ "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties"
+)
+
+${cwd}/bump.sh -f ${version} -i ${inc} ${xml_files[@]}
+${cwd}/bump.sh -f ${version} -t ${inc} -s '# RELEASE_VERSION' -e '# \/RELEASE_VERSION' ${properties_files[@]}
diff --git a/bin/utils/release/release_version_update_docs.sh b/bin/utils/release/release_version_update_docs.sh
new file mode 100755
index 0000000000..287b9a3e7d
--- /dev/null
+++ b/bin/utils/release/release_version_update_docs.sh
@@ -0,0 +1,115 @@
+#!/usr/bin/env bash
+#
+# This script is used to update reference files to the "next" version.
+#
+# usage: ./bin/utils/release_version_update.sh
+# example: ./bin/utils/release_version_update.sh 3.0.1 3.0.2
+#
+# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+declare cwd=$(cd $(dirname "${BASH_SOURCE}") && pwd)
+declare root=$(cd "$cwd" && cd ../../../ && pwd)
+
+USAGE="
+USAGE: $0 version target
+
+ This script will convert the specified version in DOC target files to the 'target'
+ where target is one of:
+
+ major
+ minor
+ build
+
+ or an explicitly defined version number.
+
+NOTE:
+
+ Files prepped by this script should never target SNAPSHOT, as the docs should refer to release artifacts.
+ If intending to update to/from snapshots, please add target files to release_version_update.sh instead.
+
+EXAMPLES:
+
+Update build version (1.0.0 -> 1.0.1)
+ $0 1.0.0 build
+Update minor version (1.2.3 -> 1.3.0)
+ $0 1.2.3 minor
+Update major version (1.2.3 -> 2.0.0)
+ $0 1.2.3 major
+"
+
+declare version=$(ruby -r rexml/document -e 'include REXML;
+ p XPath.first(Document.new($stdin), "/project/version/text()")' < ${cwd}/../../../pom.xml | tr -d '"')
+
+declare target="${2:-build}"
+declare inc=""
+declare next_version=""
+declare ags=""
+
+if [[ -z "$1" ]]; then
+ echo "Missing argument." >&2
+ echo -e "$USAGE" >&2
+ exit 1
+fi
+
+# Get version number we're changing
+case $1 in
+ --help|-h)
+ echo -e "$USAGE" >&2
+ exit 1
+ ;;
+ *)
+ version="$1"
+ ;;
+esac
+
+# Get the target…
+case ${target} in
+ major|minor|build)
+ inc="$target"
+ ;;
+ snapshot)
+ echo -e "Files prepped by this script should never target SNAPSHOT, as the docs should refer to release artifacts.
+ If intending to update to/from snapshots, please add target files to release_version_update.sh instead.
+ " >&2
+ exit 1
+ ;;
+ *)
+ next_version="$target"
+ ;;
+esac
+
+ags="-f ${version}"
+
+if [[ -n "${next_version}" ]];then
+ echo "Release preparation: Moving from $version to ${next_version}."
+ ags="$ags -t ${next_version}"
+else
+ echo "Release preparation: Moving from $version to next $inc version."
+ ags="$ags -i ${inc}"
+fi
+
+declare -a xml_files=(
+ "${root}/modules/openapi-generator-maven-plugin/README.md"
+ "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
+ "${root}/README.md"
+)
+
+declare -a commented_files=(
+ "${root}/modules/openapi-generator-gradle-plugin/README.adoc"
+)
+
+${cwd}/bump.sh ${ags} ${xml_files[@]}
+${cwd}/bump.sh ${ags} -s '# RELEASE_VERSION' -e '# \/RELEASE_VERSION' ${commented_files[@]}
diff --git a/bin/utils/release/testing.txt b/bin/utils/release/testing.txt
new file mode 100644
index 0000000000..300bdac6f6
--- /dev/null
+++ b/bin/utils/release/testing.txt
@@ -0,0 +1,17 @@
+This is a test simple:
+3.0.1
+
+Testing with other data:
+
+Version 1.2.3
+
+
+Testing with -SNAPSHOT data:
+
+Version 2.3.4-SNAPSHOT
+
+
+Testing with a value not to be replaced:
+
+Version 3.2.2
+
diff --git a/bin/utils/release/testing2.txt b/bin/utils/release/testing2.txt
new file mode 100644
index 0000000000..300bdac6f6
--- /dev/null
+++ b/bin/utils/release/testing2.txt
@@ -0,0 +1,17 @@
+This is a test simple:
+3.0.1
+
+Testing with other data:
+
+Version 1.2.3
+
+
+Testing with -SNAPSHOT data:
+
+Version 2.3.4-SNAPSHOT
+
+
+Testing with a value not to be replaced:
+
+Version 3.2.2
+
diff --git a/bin/utils/release_checkout.rb b/bin/utils/release_checkout.rb
index 720f139c41..8f82bf4bdc 100755
--- a/bin/utils/release_checkout.rb
+++ b/bin/utils/release_checkout.rb
@@ -40,7 +40,8 @@ end
def check_openapi_generator_online_docker
print "Checking openapi-generator-online docker ... "
- url = "https://hub.docker.com/r/openapitools/openapi-generator-online/tags/"
+ url = "https://hub.docker.com/v2/repositories/openapitools/openapi-generator-online/tags/?page_size=25&page=1"
+
docker_tag = "v#{$version}"
open(url) do |f|
content = f.read
@@ -56,7 +57,7 @@ end
def check_openapi_generator_cli_docker
print "Checking openapi-generator-cli docker ... "
- url = "https://hub.docker.com/r/openapitools/openapi-generator-cli/tags/"
+ url = "https://hub.docker.com/v2/repositories/openapitools/openapi-generator-cli/tags/?page_size=25&page=1"
docker_tag = "v#{$version}"
open(url) do |f|
content = f.read
@@ -202,6 +203,8 @@ $version = ARGV[0]
puts "Running checkout on OpenAPI Generator release #{$version}"
+check_openapi_generator_online_docker
+check_openapi_generator_cli_docker
check_npmjs
check_homebrew
check_openapi_generator_jar
@@ -211,5 +214,3 @@ check_openapi_generator_gradle_plugin_jar
check_openapi_generator_online_jar
check_openapi_generator_project_pom
check_readme
-check_openapi_generator_online_docker
-check_openapi_generator_cli_docker
diff --git a/bin/utils/release_version_update.sh b/bin/utils/release_version_update.sh
deleted file mode 100755
index c485fc589c..0000000000
--- a/bin/utils/release_version_update.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-#
-# usage: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1
-#
-# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-if [[ "$1" != "" ]]; then
- FROM="$1"
-else
- echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1"
- exit 1;
-fi
-
-if [[ "$2" != "" ]]; then
- TO="$2"
-else
- echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1"
- exit 1;
-fi
-
-echo "Release preparation: replacing $FROM with $TO in different files"
-
-# This script assumes the files defined here have a version surrounded by angle brackets within an xml node.
-# For example, >4.0.0< becomes >4.0.1-SNAPSHOT<.
-# Verify the sed command below against a file before adding here.
-declare -a files=("modules/openapi-generator-cli/pom.xml"
- "modules/openapi-generator-gradle-plugin/pom.xml"
- "modules/openapi-generator-core/pom.xml"
- "modules/openapi-generator-maven-plugin/pom.xml"
- "modules/openapi-generator-online/pom.xml"
- "modules/openapi-generator/pom.xml"
- "samples/meta-codegen/lib/pom.xml"
- "pom.xml")
-
-sedi () {
- # Cross-platform version of sed -i that works both on Mac and Linux
- sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@"
-}
-
-for filename in "${files[@]}"; do
- # e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
- #echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
- if sedi "s/>$FROM>$TO
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.8.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.x
**feign**
HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.8.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit**
HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.8.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.8.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.8.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.8.x
**rest-assured**
HTTP client: rest-assured : 3.x. JSON processing: Gson 2.x. Only for Java8
|okhttp-gson|
diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md
index 29f53a6c1e..0c4898f801 100644
--- a/docs/generators/kotlin-spring.md
+++ b/docs/generators/kotlin-spring.md
@@ -20,10 +20,11 @@ sidebar_label: kotlin-spring
|serverPort|configuration the port in which the sever is to run on| |8080|
|modelPackage|model package for generated code| |org.openapitools.model|
|apiPackage|api package for generated code| |org.openapitools.api|
-|exceptionHandler|generate default global exception handlers| |true|
+|exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true|
|gradleBuildFile|generate a gradle build file using the Kotlin DSL| |true|
|swaggerAnnotations|generate swagger annotations to go alongside controllers and models| |false|
|serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false|
|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false|
|useBeanValidation|Use BeanValidation API annotations to validate data types| |true|
+|reactive|use coroutines for reactive behavior| |false|
|library|library template (sub-template)|
**spring-boot**
Spring-boot Server application.
|spring-boot|
diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md
new file mode 100644
index 0000000000..c8741e58f4
--- /dev/null
+++ b/docs/generators/nodejs-server-deprecated.md
@@ -0,0 +1,16 @@
+
+---
+id: generator-opts-server-nodejs-server-deprecated
+title: Config Options for nodejs-server-deprecated
+sidebar_label: nodejs-server-deprecated
+---
+
+| Option | Description | Values | Default |
+| ------ | ----------- | ------ | ------- |
+|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
+|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
+|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
+|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false|
+|exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null|
+|serverPort|TCP port to listen on.| |null|
diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index 93bff4469a..eed7875d22 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -35,7 +35,7 @@ sidebar_label: spring
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app only)
**legacy**
Legacy java.util.Date (if you really have a good reason not to use threetenbp
**java8-localdatetime**
Java 8 using LocalDateTime (for legacy app only)
**java8**
Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
**threetenbp**
Backport of JSR310 (preferred for jdk < 1.8)
|threetenbp|
-|java8|Option. Use Java8 classes instead of third party equivalents|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|false|
+|java8|Option. Use Java8 classes instead of third party equivalents|
**true**
Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
**false**
Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
@@ -48,7 +48,6 @@ sidebar_label: spring
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|delegatePattern|Whether to generate the server files using the delegate pattern| |false|
|singleContentTypes|Whether to select only one produces/consumes content-type by operation.| |false|
-|java8|use java8 default interface| |true|
|async|use async Callable controllers| |false|
|reactive|wrap responses in Mono/Flux Reactor types (spring-boot only)| |false|
|responseWrapper|wrap the responses in given type (Future,Callable,CompletableFuture,ListenableFuture,DeferredResult,HystrixCommand,RxObservable,RxSingle or fully qualified type)| |null|
diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml
index 41d48295c0..181a3fb219 100644
--- a/modules/openapi-generator-cli/pom.xml
+++ b/modules/openapi-generator-cli/pom.xml
@@ -3,7 +3,9 @@
org.openapitoolsopenapi-generator-project
+
4.1.0-SNAPSHOT
+
../..4.0.0
diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml
index 0c9c469df4..d9e99ca645 100644
--- a/modules/openapi-generator-core/pom.xml
+++ b/modules/openapi-generator-core/pom.xml
@@ -5,7 +5,9 @@
openapi-generator-projectorg.openapitools
+
4.1.0-SNAPSHOT
+
../..4.0.0
@@ -25,6 +27,11 @@
slf4j-api${slf4j-version}
+
+ org.testng
+ testng
+ test
+
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java
new file mode 100644
index 0000000000..2cac087605
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.validation;
+
+import java.util.List;
+
+/**
+ * A generic implementation of a validator instance which simply applies rules to an input instance.
+ *
+ * @param The type of object being evaluated.
+ */
+@SuppressWarnings({"WeakerAccess"})
+public class GenericValidator implements Validator {
+ private List rules;
+
+ /**
+ * Constructs a new instance of {@link GenericValidator}.
+ *
+ * @param rules The rules to be evaluated during validation.
+ */
+ public GenericValidator(List rules) {
+ this.rules = rules;
+ }
+
+ /**
+ * Validates input, resulting in a instance of {@link ValidationResult} which provides details on all validations performed (success, error, warning).
+ *
+ * @param input The object instance to be validated.
+ *
+ * @return A {@link ValidationResult} which details the success, error, and warning validation results.
+ */
+ @Override
+ public ValidationResult validate(TInput input) {
+ ValidationResult result = new ValidationResult();
+ if (rules != null) {
+ rules.forEach(it -> {
+ boolean passes = it.evaluate(input);
+ if (passes) {
+ result.addResult(Validated.valid(it));
+ } else {
+ result.addResult(Validated.invalid(it, it.getFailureMessage()));
+ }
+ });
+ }
+ return result;
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java
new file mode 100644
index 0000000000..2f3745ebf0
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.validation;
+
+/**
+ * Represents a {@link Validated} state which is "Invalid" to some degree of {@link Severity}.
+ */
+@SuppressWarnings({"WeakerAccess"})
+public final class Invalid extends Validated {
+ private String message;
+ private ValidationRule rule;
+
+ /**
+ * Constructs a new {@link Invalid} instance.
+ *
+ * @param rule The rule which was evaluated and resulted in this state.
+ * @param message The message to be displayed for this invalid state.
+ */
+ Invalid(ValidationRule rule, String message) {
+ this.rule = rule;
+ this.message = message;
+ }
+
+ @Override
+ String getMessage() {
+ return message;
+ }
+
+ @Override
+ ValidationRule getRule() {
+ return rule;
+ }
+
+ /**
+ * Get details about the severity of this invalid state.
+ * For instance, is this an {@link Severity#ERROR} or simply a {@link Severity#WARNING}.
+ *
+ * @return The {@link Severity} enum detailing this state's severity.
+ */
+ public Severity getSeverity() {
+ return rule.getSeverity();
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java
new file mode 100644
index 0000000000..7818dfd620
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.validation;
+
+/**
+ * Defines different levels of severity to be used during validation.
+ */
+public enum Severity {
+ /**
+ * Lower severity indicating that the target state may be unpredictable, no longer supported, or known to have issues.
+ * Marking a type with this value should not result in application exceptions under normal operating circumstances.
+ */
+ WARNING,
+ /**
+ * Higher severity indicating that the target state is not supported, or is known to cause problems with the application.
+ * Marking a type with this value should result in an application exception or error exit code under normal operating circumstances.
+ */
+ ERROR
+}
\ No newline at end of file
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java
new file mode 100644
index 0000000000..d31443dca2
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.validation;
+
+/**
+ * Represents a {@link Validated} state which is "valid" according to the defined rule.
+ */
+public final class Valid extends Validated {
+ private ValidationRule rule;
+
+ /**
+ * Defines whether or not the validation resulted in a "valid" condition.
+ *
+ * @return true if the instance passed validation of the rule returned by {@link Validated#getRule()}.
+ */
+ @Override
+ boolean isValid() {
+ return true;
+ }
+
+ /**
+ * Constructs a new {@link Valid} instance.
+ *
+ * @param rule The rule which was evaluated and resulted in this state.
+ */
+ Valid(ValidationRule rule) {
+ this.rule = rule;
+ }
+
+ @Override
+ public String getMessage() {
+ return null;
+ }
+
+ @Override
+ public ValidationRule getRule() {
+ return rule;
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java
new file mode 100644
index 0000000000..4800cd9ce7
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.validation;
+
+/**
+ * Provides details about the state of a completed validation.
+ */
+public abstract class Validated {
+ /**
+ * Defines whether or not the validation resulted in a "valid" condition.
+ *
+ * @return true if the instance passed validation of the rule returned by {@link Validated#getRule()}.
+ */
+ boolean isValid() {
+ return false;
+ }
+
+ /**
+ * Gets the rule which was evaluated and resulted in this state.
+ *
+ * @return The instance of {@link ValidationRule} which was evaluated.
+ */
+ abstract ValidationRule getRule();
+
+ /**
+ * Gets the message with details about this validated state.
+ *
+ * @return A string intended to be displayed to a user.
+ */
+ abstract String getMessage();
+
+ /**
+ * Creates an instance of an {@link Invalid} validation state.
+ *
+ * @param rule The rule which was evaluated.
+ * @param message The message to display to a user.
+ *
+ * @return A {@link Validated} instance representing an invalid state according to the rule.
+ */
+ public static Validated invalid(ValidationRule rule, String message) {
+ return new Invalid(rule, message);
+ }
+
+ /**
+ * Creates an instance of an {@link Valid} validation state.
+ *
+ * @param rule The rule which was evaluated.
+ *
+ * @return A {@link Validated} instance representing a valid state according to the rule.
+ */
+ public static Validated valid(ValidationRule rule) {
+ return new Valid(rule);
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java
new file mode 100644
index 0000000000..166ce2b2df
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.validation;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Encapsulates details about the result of a validation test.
+ */
+@SuppressWarnings("WeakerAccess")
+public final class ValidationResult {
+ private final List validations;
+
+ /**
+ * Constructs a new {@link ValidationResult} instance, backed by the provided validations (useful for testing).
+ *
+ * @param validations A pre-defined set of validations to begin with.
+ */
+ private ValidationResult(List validations) {
+ this.validations = Collections.synchronizedList(validations);
+ }
+
+ /**
+ * Constructs a new {@link ValidationResult} instance.
+ */
+ public ValidationResult() {
+ this(new ArrayList<>());
+ }
+
+ /**
+ * Gets all the validated states resulting from the evaluation. This includes all {@link Valid} and {@link Invalid} instances.
+ *
+ * @return All validated results.
+ */
+ public List getAll() {
+ return validations;
+ }
+
+ /**
+ * Gets a filtered list of {@link Valid} states.
+ *
+ * @return A list containing only {@link Valid} states.
+ */
+ public List getValid(){
+ return validations.stream().filter(Validated::isValid).map(it -> (Valid)it).collect(Collectors.toList());
+ }
+
+ /**
+ * Gets a filters list of {@link Invalid} states with the level of {@link Severity#ERROR}
+ *
+ * @return A list of all validation errors.
+ */
+ public List getErrors(){
+ return validations.stream()
+ .filter(it -> !it.isValid())
+ .map(it -> (Invalid)it)
+ .filter(it -> it.getSeverity().equals(Severity.ERROR))
+ .collect(Collectors.toList());
+ }
+
+ /**
+ * Gets a filtered list of {@link Invalid} states with the level of {@link Severity#WARNING}
+ *
+ * @return A list of all validation warnings.
+ */
+ public List getWarnings(){
+ return validations.stream()
+ .filter(it -> !it.isValid())
+ .map(it -> (Invalid)it)
+ .filter(it -> it.getSeverity().equals(Severity.WARNING))
+ .collect(Collectors.toList());
+ }
+
+ /**
+ * Adds a validation state to the final results.
+ *
+ * @param validated The {@link Valid} or {@link Invalid} instance to add to validations.
+ */
+ public void addResult(Validated validated) {
+ synchronized (validations) {
+ ValidationRule rule = validated.getRule();
+ if (rule != null && !rule.equals(ValidationRule.empty())) {
+ validations.add(validated);
+ }
+ }
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java
new file mode 100644
index 0000000000..b774e8653d
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.validation;
+
+import java.util.function.Function;
+
+/**
+ * Defines a rule to be evaluated against some target object.
+ */
+@SuppressWarnings("WeakerAccess")
+public class ValidationRule {
+ private Severity severity;
+ private String description;
+ private String failureMessage;
+ private Function
diff --git a/samples/client/petstore/R/R/api_client.R b/samples/client/petstore/R/R/api_client.R
index d4a6262475..ec5af87dd3 100644
--- a/samples/client/petstore/R/R/api_client.R
+++ b/samples/client/petstore/R/R/api_client.R
@@ -45,8 +45,10 @@ ApiClient <- R6::R6Class(
apiKeys = NULL,
# Access token
accessToken = NULL,
+ # Time Out (seconds)
+ timeout = NULL,
# constructor
- initialize = function(basePath=NULL, userAgent=NULL, defaultHeaders=NULL, username=NULL, password=NULL, apiKeys=NULL, accessToken=NULL){
+ initialize = function(basePath=NULL, userAgent=NULL, defaultHeaders=NULL, username=NULL, password=NULL, apiKeys=NULL, accessToken=NULL, timeout=NULL){
if (!is.null(basePath)) {
self$basePath <- basePath
}
@@ -76,25 +78,76 @@ ApiClient <- R6::R6Class(
if (!is.null(userAgent)) {
self$`userAgent` <- userAgent
}
+
+ if (!is.null(timeout)) {
+ self$timeout <- timeout
+ }
},
CallApi = function(url, method, queryParams, headerParams, body, ...){
headers <- httr::add_headers(c(headerParams, self$defaultHeaders))
+ httpTimeout <- NULL
+ if (!is.null(self$timeout)) {
+ httpTimeout <- httr::timeout(self$timeout)
+ }
+
if (method == "GET") {
- httr::GET(url, queryParams, headers, ...)
+ httr::GET(url, query = queryParams, headers, httpTimeout, httr::user_agent(self$`userAgent`), ...)
} else if (method == "POST") {
- httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...)
+ httr::POST(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httr::user_agent(self$`userAgent`), ...)
} else if (method == "PUT") {
- httr::PUT(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...)
+ httr::PUT(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...)
} else if (method == "PATCH") {
- httr::PATCH(url, query = queryParams, headers, body = body, httr::content_type("application/json"), ...)
+ httr::PATCH(url, query = queryParams, headers, body = body, httr::content_type("application/json"), httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...)
} else if (method == "HEAD") {
- httr::HEAD(url, query = queryParams, headers, ...)
+ httr::HEAD(url, query = queryParams, headers, httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...)
} else if (method == "DELETE") {
- httr::DELETE(url, query = queryParams, headers, ...)
+ httr::DELETE(url, query = queryParams, headers, httpTimeout, httpTimeout, httr::user_agent(self$`userAgent`), ...)
} else {
stop("http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.")
}
+ },
+
+ deserialize = function(resp, returnType, pkgEnv) {
+ respObj <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
+ self$deserializeObj(respObj, returnType, pkgEnv)
+ },
+
+ deserializeObj = function(obj, returnType, pkgEnv) {
+ returnObj <- NULL
+ primitiveTypes <- c("character", "numeric", "integer", "logical", "complex")
+
+ if (startsWith(returnType, "map(")) {
+ innerReturnType <- regmatches(returnType, regexec(pattern = "map\\((.*)\\)", returnType))[[1]][2]
+ returnObj <- lapply(names(obj), function(name) {
+ self$deserializeObj(obj[[name]], innerReturnType, pkgEnv)
+ })
+ names(returnObj) <- names(obj)
+ } else if (startsWith(returnType, "array[")) {
+ innerReturnType <- regmatches(returnType, regexec(pattern = "array\\[(.*)\\]", returnType))[[1]][2]
+ if (c(innerReturnType) %in% primitiveTypes) {
+ returnObj <- vector("list", length = length(obj))
+ if (length(obj) > 0) {
+ for (row in 1:length(obj)) {
+ returnObj[[row]] <- self$deserializeObj(obj[row], innerReturnType, pkgEnv)
+ }
+ }
+ } else {
+ returnObj <- vector("list", length = nrow(obj))
+ if (nrow(obj) > 0) {
+ for (row in 1:nrow(obj)) {
+ returnObj[[row]] <- self$deserializeObj(obj[row, , drop = FALSE], innerReturnType, pkgEnv)
+ }
+ }
+ }
+ } else if (exists(returnType, pkgEnv) && !(c(returnType) %in% primitiveTypes)) {
+ returnType <- get(returnType, envir = as.environment(pkgEnv))
+ returnObj <- returnType$new()
+ returnObj$fromJSON(jsonlite::toJSON(obj, digits = NA))
+ } else {
+ returnObj <- obj
+ }
+ returnObj
}
)
)
diff --git a/samples/client/petstore/R/R/category.R b/samples/client/petstore/R/R/category.R
index fea3501c6f..de662eaed4 100644
--- a/samples/client/petstore/R/R/category.R
+++ b/samples/client/petstore/R/R/category.R
@@ -54,16 +54,24 @@ Category <- R6::R6Class(
}
},
toJSONString = function() {
- sprintf(
- '{
- "id":
- %d,
- "name":
- "%s"
- }',
- self$`id`,
+ jsoncontent <- c(
+ if (!is.null(self$`id`)) {
+ sprintf(
+ '"id":
+ %d
+ ',
+ self$`id`
+ )},
+ if (!is.null(self$`name`)) {
+ sprintf(
+ '"name":
+ "%s"
+ ',
self$`name`
+ )}
)
+ jsoncontent <- paste(jsoncontent, collapse = ",")
+ paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(CategoryJson) {
CategoryObject <- jsonlite::fromJSON(CategoryJson)
diff --git a/samples/client/petstore/R/R/model_api_response.R b/samples/client/petstore/R/R/model_api_response.R
index 425c638045..5985ed033c 100644
--- a/samples/client/petstore/R/R/model_api_response.R
+++ b/samples/client/petstore/R/R/model_api_response.R
@@ -67,19 +67,31 @@ ModelApiResponse <- R6::R6Class(
}
},
toJSONString = function() {
- sprintf(
- '{
- "code":
- %d,
- "type":
- "%s",
- "message":
- "%s"
- }',
- self$`code`,
- self$`type`,
+ jsoncontent <- c(
+ if (!is.null(self$`code`)) {
+ sprintf(
+ '"code":
+ %d
+ ',
+ self$`code`
+ )},
+ if (!is.null(self$`type`)) {
+ sprintf(
+ '"type":
+ "%s"
+ ',
+ self$`type`
+ )},
+ if (!is.null(self$`message`)) {
+ sprintf(
+ '"message":
+ "%s"
+ ',
self$`message`
+ )}
)
+ jsoncontent <- paste(jsoncontent, collapse = ",")
+ paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(ModelApiResponseJson) {
ModelApiResponseObject <- jsonlite::fromJSON(ModelApiResponseJson)
diff --git a/samples/client/petstore/R/R/order.R b/samples/client/petstore/R/R/order.R
index 76f908c39a..839db2951c 100644
--- a/samples/client/petstore/R/R/order.R
+++ b/samples/client/petstore/R/R/order.R
@@ -105,28 +105,52 @@ Order <- R6::R6Class(
}
},
toJSONString = function() {
- sprintf(
- '{
- "id":
- %d,
- "petId":
- %d,
- "quantity":
- %d,
- "shipDate":
- "%s",
- "status":
- "%s",
- "complete":
- "%s"
- }',
- self$`id`,
- self$`petId`,
- self$`quantity`,
- self$`shipDate`,
- self$`status`,
+ jsoncontent <- c(
+ if (!is.null(self$`id`)) {
+ sprintf(
+ '"id":
+ %d
+ ',
+ self$`id`
+ )},
+ if (!is.null(self$`petId`)) {
+ sprintf(
+ '"petId":
+ %d
+ ',
+ self$`petId`
+ )},
+ if (!is.null(self$`quantity`)) {
+ sprintf(
+ '"quantity":
+ %d
+ ',
+ self$`quantity`
+ )},
+ if (!is.null(self$`shipDate`)) {
+ sprintf(
+ '"shipDate":
+ "%s"
+ ',
+ self$`shipDate`
+ )},
+ if (!is.null(self$`status`)) {
+ sprintf(
+ '"status":
+ "%s"
+ ',
+ self$`status`
+ )},
+ if (!is.null(self$`complete`)) {
+ sprintf(
+ '"complete":
+ "%s"
+ ',
self$`complete`
+ )}
)
+ jsoncontent <- paste(jsoncontent, collapse = ",")
+ paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(OrderJson) {
OrderObject <- jsonlite::fromJSON(OrderJson)
diff --git a/samples/client/petstore/R/R/pet.R b/samples/client/petstore/R/R/pet.R
index 11d5811a0f..69c67d243d 100644
--- a/samples/client/petstore/R/R/pet.R
+++ b/samples/client/petstore/R/R/pet.R
@@ -93,63 +93,77 @@ Pet <- R6::R6Class(
}
if (!is.null(PetObject$`category`)) {
categoryObject <- Category$new()
- categoryObject$fromJSON(jsonlite::toJSON(PetObject$category, auto_unbox = TRUE))
+ categoryObject$fromJSON(jsonlite::toJSON(PetObject$category, auto_unbox = TRUE, digits = NA))
self$`category` <- categoryObject
}
if (!is.null(PetObject$`name`)) {
self$`name` <- PetObject$`name`
}
if (!is.null(PetObject$`photoUrls`)) {
- self$`photoUrls` <- PetObject$`photoUrls`
+ self$`photoUrls` <- ApiClient$new()$deserializeObj(PetObject$`photoUrls`, "array[character]", "package:petstore")
}
if (!is.null(PetObject$`tags`)) {
- self$`tags` <- sapply(PetObject$`tags`, function(x) {
- tagsObject <- Tag$new()
- tagsObject$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE))
- tagsObject
- })
+ self$`tags` <- ApiClient$new()$deserializeObj(PetObject$`tags`, "array[Tag]", "package:petstore")
}
if (!is.null(PetObject$`status`)) {
self$`status` <- PetObject$`status`
}
},
toJSONString = function() {
- sprintf(
- '{
- "id":
- %d,
- "category":
- %s,
- "name":
- "%s",
- "photoUrls":
- [%s],
- "tags":
- [%s],
- "status":
- "%s"
- }',
- self$`id`,
- jsonlite::toJSON(self$`category`$toJSON(), auto_unbox=TRUE),
- self$`name`,
- paste(unlist(lapply(self$`photoUrls`, function(x) paste0('"', x, '"'))), collapse=","),
- paste(unlist(lapply(self$`tags`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE))), collapse=","),
+ jsoncontent <- c(
+ if (!is.null(self$`id`)) {
+ sprintf(
+ '"id":
+ %d
+ ',
+ self$`id`
+ )},
+ if (!is.null(self$`category`)) {
+ sprintf(
+ '"category":
+ %s
+ ',
+ jsonlite::toJSON(self$`category`$toJSON(), auto_unbox=TRUE, digits = NA)
+ )},
+ if (!is.null(self$`name`)) {
+ sprintf(
+ '"name":
+ "%s"
+ ',
+ self$`name`
+ )},
+ if (!is.null(self$`photoUrls`)) {
+ sprintf(
+ '"photoUrls":
+ [%s]
+ ',
+ paste(unlist(lapply(self$`photoUrls`, function(x) paste0('"', x, '"'))), collapse=",")
+ )},
+ if (!is.null(self$`tags`)) {
+ sprintf(
+ '"tags":
+ [%s]
+',
+ paste(unlist(lapply(self$`tags`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA))), collapse=",")
+ )},
+ if (!is.null(self$`status`)) {
+ sprintf(
+ '"status":
+ "%s"
+ ',
self$`status`
+ )}
)
+ jsoncontent <- paste(jsoncontent, collapse = ",")
+ paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(PetJson) {
PetObject <- jsonlite::fromJSON(PetJson)
self$`id` <- PetObject$`id`
- self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(PetObject$category, auto_unbox = TRUE))
+ self$`category` <- Category$new()$fromJSON(jsonlite::toJSON(PetObject$category, auto_unbox = TRUE, digits = NA))
self$`name` <- PetObject$`name`
- self$`photoUrls` <- lapply(PetObject$`photoUrls`, function (x) x)
- data.frame <- PetObject$`tags`
- self$`tags` <- vector("list", length = nrow(data.frame))
- for (row in 1:nrow(data.frame)) {
- tags.node <- Tag$new()
- tags.node$fromJSON(jsonlite::toJSON(data.frame[row,,drop = TRUE], auto_unbox = TRUE))
- self$`tags`[[row]] <- tags.node
- }
+ self$`photoUrls` <- ApiClient$new()$deserializeObj(PetObject$`photoUrls`, "array[character]","package:petstore")
+ self$`tags` <- ApiClient$new()$deserializeObj(PetObject$`tags`, "array[Tag]","package:petstore")
self$`status` <- PetObject$`status`
self
}
diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R
index a098c5b747..6855f64ffd 100644
--- a/samples/client/petstore/R/R/pet_api.R
+++ b/samples/client/petstore/R/R/pet_api.R
@@ -57,6 +57,18 @@ PetApi <- R6::R6Class(
}
},
AddPet = function(body, ...){
+ apiResponse <- self$AddPetWithHttpInfo(body, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ AddPetWithHttpInfo = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -83,15 +95,26 @@ PetApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
DeletePet = function(pet.id, api.key=NULL, ...){
+ apiResponse <- self$DeletePetWithHttpInfo(pet.id, api.key, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ DeletePetWithHttpInfo = function(pet.id, api.key=NULL, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -118,15 +141,26 @@ PetApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
FindPetsByStatus = function(status, ...){
+ apiResponse <- self$FindPetsByStatusWithHttpInfo(status, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ FindPetsByStatusWithHttpInfo = function(status, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -149,15 +183,27 @@ PetApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- Pet$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "array[Pet]", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
FindPetsByTags = function(tags, ...){
+ apiResponse <- self$FindPetsByTagsWithHttpInfo(tags, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ FindPetsByTagsWithHttpInfo = function(tags, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -180,15 +226,27 @@ PetApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- Pet$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "array[Pet]", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
GetPetById = function(pet.id, ...){
+ apiResponse <- self$GetPetByIdWithHttpInfo(pet.id, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ GetPetByIdWithHttpInfo = function(pet.id, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -215,15 +273,27 @@ PetApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- Pet$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "Pet", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
UpdatePet = function(body, ...){
+ apiResponse <- self$UpdatePetWithHttpInfo(body, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ UpdatePetWithHttpInfo = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -250,15 +320,26 @@ PetApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
UpdatePetWithForm = function(pet.id, name=NULL, status=NULL, ...){
+ apiResponse <- self$UpdatePetWithFormWithHttpInfo(pet.id, name, status, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ UpdatePetWithFormWithHttpInfo = function(pet.id, name=NULL, status=NULL, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -288,15 +369,26 @@ PetApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
UploadFile = function(pet.id, additional.metadata=NULL, file=NULL, ...){
+ apiResponse <- self$UploadFileWithHttpInfo(pet.id, additional.metadata, file, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ UploadFileWithHttpInfo = function(pet.id, additional.metadata=NULL, file=NULL, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -326,13 +418,13 @@ PetApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- ModelApiResponse$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "ModelApiResponse", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
}
)
)
diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R
index 5113c5d86e..6466a80e0f 100644
--- a/samples/client/petstore/R/R/store_api.R
+++ b/samples/client/petstore/R/R/store_api.R
@@ -45,6 +45,18 @@ StoreApi <- R6::R6Class(
}
},
DeleteOrder = function(order.id, ...){
+ apiResponse <- self$DeleteOrderWithHttpInfo(order.id, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ DeleteOrderWithHttpInfo = function(order.id, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -67,15 +79,26 @@ StoreApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
GetInventory = function(...){
+ apiResponse <- self$GetInventoryWithHttpInfo(...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ GetInventoryWithHttpInfo = function(...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -94,15 +117,27 @@ StoreApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- integer$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "map(integer)", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
GetOrderById = function(order.id, ...){
+ apiResponse <- self$GetOrderByIdWithHttpInfo(order.id, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ GetOrderByIdWithHttpInfo = function(order.id, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -125,15 +160,27 @@ StoreApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- Order$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "Order", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
PlaceOrder = function(body, ...){
+ apiResponse <- self$PlaceOrderWithHttpInfo(body, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ PlaceOrderWithHttpInfo = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -158,13 +205,13 @@ StoreApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- Order$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "Order", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
}
)
)
diff --git a/samples/client/petstore/R/R/tag.R b/samples/client/petstore/R/R/tag.R
index b0ee474e18..279c43d59d 100644
--- a/samples/client/petstore/R/R/tag.R
+++ b/samples/client/petstore/R/R/tag.R
@@ -54,16 +54,24 @@ Tag <- R6::R6Class(
}
},
toJSONString = function() {
- sprintf(
- '{
- "id":
- %d,
- "name":
- "%s"
- }',
- self$`id`,
+ jsoncontent <- c(
+ if (!is.null(self$`id`)) {
+ sprintf(
+ '"id":
+ %d
+ ',
+ self$`id`
+ )},
+ if (!is.null(self$`name`)) {
+ sprintf(
+ '"name":
+ "%s"
+ ',
self$`name`
+ )}
)
+ jsoncontent <- paste(jsoncontent, collapse = ",")
+ paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(TagJson) {
TagObject <- jsonlite::fromJSON(TagJson)
diff --git a/samples/client/petstore/R/R/user.R b/samples/client/petstore/R/R/user.R
index 2431ff8de4..8377f5a68e 100644
--- a/samples/client/petstore/R/R/user.R
+++ b/samples/client/petstore/R/R/user.R
@@ -132,34 +132,66 @@ User <- R6::R6Class(
}
},
toJSONString = function() {
- sprintf(
- '{
- "id":
- %d,
- "username":
- "%s",
- "firstName":
- "%s",
- "lastName":
- "%s",
- "email":
- "%s",
- "password":
- "%s",
- "phone":
- "%s",
- "userStatus":
- %d
- }',
- self$`id`,
- self$`username`,
- self$`firstName`,
- self$`lastName`,
- self$`email`,
- self$`password`,
- self$`phone`,
+ jsoncontent <- c(
+ if (!is.null(self$`id`)) {
+ sprintf(
+ '"id":
+ %d
+ ',
+ self$`id`
+ )},
+ if (!is.null(self$`username`)) {
+ sprintf(
+ '"username":
+ "%s"
+ ',
+ self$`username`
+ )},
+ if (!is.null(self$`firstName`)) {
+ sprintf(
+ '"firstName":
+ "%s"
+ ',
+ self$`firstName`
+ )},
+ if (!is.null(self$`lastName`)) {
+ sprintf(
+ '"lastName":
+ "%s"
+ ',
+ self$`lastName`
+ )},
+ if (!is.null(self$`email`)) {
+ sprintf(
+ '"email":
+ "%s"
+ ',
+ self$`email`
+ )},
+ if (!is.null(self$`password`)) {
+ sprintf(
+ '"password":
+ "%s"
+ ',
+ self$`password`
+ )},
+ if (!is.null(self$`phone`)) {
+ sprintf(
+ '"phone":
+ "%s"
+ ',
+ self$`phone`
+ )},
+ if (!is.null(self$`userStatus`)) {
+ sprintf(
+ '"userStatus":
+ %d
+ ',
self$`userStatus`
+ )}
)
+ jsoncontent <- paste(jsoncontent, collapse = ",")
+ paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(UserJson) {
UserObject <- jsonlite::fromJSON(UserJson)
diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R
index 1d2eb03a14..656e1acd68 100644
--- a/samples/client/petstore/R/R/user_api.R
+++ b/samples/client/petstore/R/R/user_api.R
@@ -57,6 +57,18 @@ UserApi <- R6::R6Class(
}
},
CreateUser = function(body, ...){
+ apiResponse <- self$CreateUserWithHttpInfo(body, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ CreateUserWithHttpInfo = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -81,15 +93,26 @@ UserApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
CreateUsersWithArrayInput = function(body, ...){
+ apiResponse <- self$CreateUsersWithArrayInputWithHttpInfo(body, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ CreateUsersWithArrayInputWithHttpInfo = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -99,7 +122,8 @@ UserApi <- R6::R6Class(
}
if (!missing(`body`)) {
- body <- `body`$toJSONString()
+ body.items = paste(unlist(lapply(body, function(param){param$toJSONString()})), collapse = ",")
+ body <- paste0('[', body.items, ']')
} else {
body <- NULL
}
@@ -114,15 +138,26 @@ UserApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
CreateUsersWithListInput = function(body, ...){
+ apiResponse <- self$CreateUsersWithListInputWithHttpInfo(body, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ CreateUsersWithListInputWithHttpInfo = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -132,7 +167,8 @@ UserApi <- R6::R6Class(
}
if (!missing(`body`)) {
- body <- `body`$toJSONString()
+ body.items = paste(unlist(lapply(body, function(param){param$toJSONString()})), collapse = ",")
+ body <- paste0('[', body.items, ']')
} else {
body <- NULL
}
@@ -147,15 +183,26 @@ UserApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
DeleteUser = function(username, ...){
+ apiResponse <- self$DeleteUserWithHttpInfo(username, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ DeleteUserWithHttpInfo = function(username, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -178,15 +225,26 @@ UserApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
GetUserByName = function(username, ...){
+ apiResponse <- self$GetUserByNameWithHttpInfo(username, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ GetUserByNameWithHttpInfo = function(username, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -209,15 +267,27 @@ UserApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- User$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "User", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
LoginUser = function(username, password, ...){
+ apiResponse <- self$LoginUserWithHttpInfo(username, password, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ LoginUserWithHttpInfo = function(username, password, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -244,15 +314,27 @@ UserApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- character$new()$fromJSONString(httr::content(resp, "text", encoding = "UTF-8"))
+ deserializedRespObj <- self$apiClient$deserialize(resp, "character", "package:petstore")
+ ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
LogoutUser = function(...){
+ apiResponse <- self$LogoutUserWithHttpInfo(...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ LogoutUserWithHttpInfo = function(...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -267,15 +349,26 @@ UserApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
},
UpdateUser = function(username, body, ...){
+ apiResponse <- self$UpdateUserWithHttpInfo(username, body, ...)
+ resp <- apiResponse$response
+ if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
+ apiResponse$content
+ } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
+ apiResponse
+ } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
+ apiResponse
+ }
+ },
+
+ UpdateUserWithHttpInfo = function(username, body, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
@@ -308,13 +401,12 @@ UserApi <- R6::R6Class(
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
- # void response, no need to return anything
+ ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
-
}
)
)
diff --git a/samples/client/petstore/R/docs/Pet.md b/samples/client/petstore/R/docs/Pet.md
index 296dfdeea4..f5a9c0dd61 100644
--- a/samples/client/petstore/R/docs/Pet.md
+++ b/samples/client/petstore/R/docs/Pet.md
@@ -6,8 +6,8 @@ Name | Type | Description | Notes
**id** | **integer** | | [optional]
**category** | [**Category**](Category.md) | | [optional]
**name** | **character** | |
-**photoUrls** | **character** | |
-**tags** | [**Tag**](Tag.md) | | [optional]
+**photoUrls** | **array[character]** | |
+**tags** | [**array[Tag]**](Tag.md) | | [optional]
**status** | **character** | pet status in the store | [optional]
diff --git a/samples/client/petstore/R/docs/PetApi.md b/samples/client/petstore/R/docs/PetApi.md
index 186fd50d92..fe69ffb556 100644
--- a/samples/client/petstore/R/docs/PetApi.md
+++ b/samples/client/petstore/R/docs/PetApi.md
@@ -95,7 +95,7 @@ void (empty response body)
# **FindPetsByStatus**
-> Pet FindPetsByStatus(status)
+> array[Pet] FindPetsByStatus(status)
Finds Pets by status
@@ -105,7 +105,7 @@ Multiple status values can be provided with comma separated strings
```R
library(petstore)
-var.status <- list("status_example") # character | Status values that need to be considered for filter
+var.status <- list("status_example") # array[character] | Status values that need to be considered for filter
#Finds Pets by status
api.instance <- PetApi$new()
@@ -119,11 +119,11 @@ dput(result)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | [**character**](character.md)| Status values that need to be considered for filter |
+ **status** | [**array[character]**](character.md)| Status values that need to be considered for filter |
### Return type
-[**Pet**](Pet.md)
+[**array[Pet]**](Pet.md)
### Authorization
@@ -137,7 +137,7 @@ Name | Type | Description | Notes
# **FindPetsByTags**
-> Pet FindPetsByTags(tags)
+> array[Pet] FindPetsByTags(tags)
Finds Pets by tags
@@ -147,7 +147,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
```R
library(petstore)
-var.tags <- list("inner_example") # character | Tags to filter by
+var.tags <- list("inner_example") # array[character] | Tags to filter by
#Finds Pets by tags
api.instance <- PetApi$new()
@@ -161,11 +161,11 @@ dput(result)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tags** | [**character**](character.md)| Tags to filter by |
+ **tags** | [**array[character]**](character.md)| Tags to filter by |
### Return type
-[**Pet**](Pet.md)
+[**array[Pet]**](Pet.md)
### Authorization
diff --git a/samples/client/petstore/R/docs/StoreApi.md b/samples/client/petstore/R/docs/StoreApi.md
index 8f91944aed..81970724c1 100644
--- a/samples/client/petstore/R/docs/StoreApi.md
+++ b/samples/client/petstore/R/docs/StoreApi.md
@@ -50,7 +50,7 @@ No authorization required
# **GetInventory**
-> integer GetInventory()
+> map(integer) GetInventory()
Returns pet inventories by status
@@ -74,7 +74,7 @@ This endpoint does not need any parameter.
### Return type
-**integer**
+**map(integer)**
### Authorization
diff --git a/samples/client/petstore/R/docs/UserApi.md b/samples/client/petstore/R/docs/UserApi.md
index 342a3b3b40..c69c5987ed 100644
--- a/samples/client/petstore/R/docs/UserApi.md
+++ b/samples/client/petstore/R/docs/UserApi.md
@@ -62,7 +62,7 @@ Creates list of users with given input array
```R
library(petstore)
-var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # User | List of user object
+var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
#Creates list of users with given input array
api.instance <- UserApi$new()
@@ -73,7 +73,7 @@ api.instance$CreateUsersWithArrayInput(var.body)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**User**](array.md)| List of user object |
+ **body** | [**array[User]**](User.md)| List of user object |
### Return type
@@ -99,7 +99,7 @@ Creates list of users with given input array
```R
library(petstore)
-var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # User | List of user object
+var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
#Creates list of users with given input array
api.instance <- UserApi$new()
@@ -110,7 +110,7 @@ api.instance$CreateUsersWithListInput(var.body)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**User**](array.md)| List of user object |
+ **body** | [**array[User]**](User.md)| List of user object |
### Return type
diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
index 06b5019af3..d96260ba33 100644
--- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
+++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.1-SNAPSHOT
\ No newline at end of file
+4.0.2-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h b/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h
index b28590dd38..2fe8209ac1 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h
@@ -76,4 +76,6 @@ private:
}
+Q_DECLARE_METATYPE(OpenAPI::OAIApiResponse)
+
#endif // OAIApiResponse_H
diff --git a/samples/client/petstore/cpp-qt5/client/OAICategory.h b/samples/client/petstore/cpp-qt5/client/OAICategory.h
index 0586cb3d4e..129d974857 100644
--- a/samples/client/petstore/cpp-qt5/client/OAICategory.h
+++ b/samples/client/petstore/cpp-qt5/client/OAICategory.h
@@ -68,4 +68,6 @@ private:
}
+Q_DECLARE_METATYPE(OpenAPI::OAICategory)
+
#endif // OAICategory_H
diff --git a/samples/client/petstore/cpp-qt5/client/OAIEnum.h b/samples/client/petstore/cpp-qt5/client/OAIEnum.h
index 42daef17ac..a5e619960f 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIEnum.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIEnum.h
@@ -15,6 +15,7 @@
#include
#include
+#include
namespace OpenAPI {
@@ -61,4 +62,6 @@ private :
}
+Q_DECLARE_METATYPE(OpenAPI::OAIEnum)
+
#endif // OAI_ENUM_H
diff --git a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp
index 01e8797795..8fdd4ea5e9 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp
@@ -54,18 +54,29 @@ OAIHttpRequestWorker::OAIHttpRequestWorker(QObject *parent)
: QObject(parent), manager(nullptr)
{
qsrand(QDateTime::currentDateTime().toTime_t());
-
+ timeout = 0;
+ timer = new QTimer();
manager = new QNetworkAccessManager(this);
connect(manager, &QNetworkAccessManager::finished, this, &OAIHttpRequestWorker::on_manager_finished);
}
OAIHttpRequestWorker::~OAIHttpRequestWorker() {
+ if(timer != nullptr){
+ if(timer->isActive()){
+ timer->stop();
+ }
+ timer->deleteLater();
+ }
}
QMap OAIHttpRequestWorker::getResponseHeaders() const {
return headers;
}
+void OAIHttpRequestWorker::setTimeOut(int tout){
+ timeout = tout;
+}
+
QString OAIHttpRequestWorker::http_attribute_encode(QString attribute_name, QString input) {
// result structure follows RFC 5987
bool need_utf_encoding = false;
@@ -117,7 +128,7 @@ QString OAIHttpRequestWorker::http_attribute_encode(QString attribute_name, QStr
void OAIHttpRequestWorker::execute(OAIHttpRequestInput *input) {
// reset variables
-
+ QNetworkReply* reply = nullptr;
QByteArray request_content = "";
response = "";
error_type = QNetworkReply::NoError;
@@ -285,19 +296,19 @@ void OAIHttpRequestWorker::execute(OAIHttpRequestInput *input) {
}
if (input->http_method == "GET") {
- manager->get(request);
+ reply = manager->get(request);
}
else if (input->http_method == "POST") {
- manager->post(request, request_content);
+ reply = manager->post(request, request_content);
}
else if (input->http_method == "PUT") {
- manager->put(request, request_content);
+ reply = manager->put(request, request_content);
}
else if (input->http_method == "HEAD") {
- manager->head(request);
+ reply = manager->head(request);
}
else if (input->http_method == "DELETE") {
- manager->deleteResource(request);
+ reply = manager->deleteResource(request);
}
else {
#if (QT_VERSION >= 0x050800)
@@ -307,11 +318,16 @@ void OAIHttpRequestWorker::execute(OAIHttpRequestInput *input) {
buffer->setData(request_content);
buffer->open(QIODevice::ReadOnly);
- QNetworkReply* reply = manager->sendCustomRequest(request, input->http_method.toLatin1(), buffer);
+ reply = manager->sendCustomRequest(request, input->http_method.toLatin1(), buffer);
buffer->setParent(reply);
#endif
}
-
+ if(timeout > 0){
+ timer->setSingleShot(true);
+ timer->setInterval(timeout);
+ connect(timer, &QTimer::timeout, this, [=](){ on_manager_timeout(reply); });
+ timer->start();
+ }
}
void OAIHttpRequestWorker::on_manager_finished(QNetworkReply *reply) {
@@ -327,6 +343,16 @@ void OAIHttpRequestWorker::on_manager_finished(QNetworkReply *reply) {
emit on_execution_finished(this);
}
+void OAIHttpRequestWorker::on_manager_timeout(QNetworkReply *reply) {
+ error_type = QNetworkReply::TimeoutError;
+ response = "";
+ error_str = "Timed out waiting for response";
+ disconnect(manager, nullptr, nullptr, nullptr);
+ reply->abort();
+ reply->deleteLater();
+
+ emit on_execution_finished(this);
+}
QSslConfiguration* OAIHttpRequestWorker::sslDefaultConfiguration;
diff --git a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h
index 5e58caf449..b7380595c0 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h
@@ -21,6 +21,7 @@
#include
#include
+#include
#include
#include
#include
@@ -69,7 +70,7 @@ public:
QByteArray response;
QNetworkReply::NetworkError error_type;
QString error_str;
-
+ QTimer *timer;
explicit OAIHttpRequestWorker(QObject *parent = nullptr);
virtual ~OAIHttpRequestWorker();
@@ -77,16 +78,17 @@ public:
QString http_attribute_encode(QString attribute_name, QString input);
void execute(OAIHttpRequestInput *input);
static QSslConfiguration* sslDefaultConfiguration;
-
+ void setTimeOut(int tout);
signals:
void on_execution_finished(OAIHttpRequestWorker *worker);
private:
QNetworkAccessManager *manager;
QMap headers;
+ int timeout;
+ void on_manager_timeout(QNetworkReply *reply);
private slots:
- void on_manager_finished(QNetworkReply *reply);
-
+ void on_manager_finished(QNetworkReply *reply);
};
}
diff --git a/samples/client/petstore/cpp-qt5/client/OAIObject.h b/samples/client/petstore/cpp-qt5/client/OAIObject.h
index 9cc379894c..babc1e64fb 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIObject.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIObject.h
@@ -15,6 +15,7 @@
#include
#include
+#include
namespace OpenAPI {
@@ -63,4 +64,6 @@ private :
}
+Q_DECLARE_METATYPE(OpenAPI::OAIObject)
+
#endif // OAI_OBJECT_H
diff --git a/samples/client/petstore/cpp-qt5/client/OAIOrder.h b/samples/client/petstore/cpp-qt5/client/OAIOrder.h
index eb9edd329e..c9b006d363 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIOrder.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIOrder.h
@@ -101,4 +101,6 @@ private:
}
+Q_DECLARE_METATYPE(OpenAPI::OAIOrder)
+
#endif // OAIOrder_H
diff --git a/samples/client/petstore/cpp-qt5/client/OAIPet.h b/samples/client/petstore/cpp-qt5/client/OAIPet.h
index ffeb4ba5ad..6bec604d21 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIPet.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIPet.h
@@ -103,4 +103,6 @@ private:
}
+Q_DECLARE_METATYPE(OpenAPI::OAIPet)
+
#endif // OAIPet_H
diff --git a/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp
index 46108a18fd..3e83ea0066 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp
@@ -19,7 +19,8 @@
namespace OpenAPI {
OAIPetApi::OAIPetApi() : basePath("/v2"),
- host("petstore.swagger.io") {
+ host("petstore.swagger.io"),
+ timeout(0){
}
@@ -27,9 +28,10 @@ OAIPetApi::~OAIPetApi() {
}
-OAIPetApi::OAIPetApi(const QString& host, const QString& basePath) {
+OAIPetApi::OAIPetApi(const QString& host, const QString& basePath, const int tout) {
this->host = host;
this->basePath = basePath;
+ this->timeout = tout;
}
void OAIPetApi::setBasePath(const QString& basePath){
@@ -40,6 +42,10 @@ void OAIPetApi::setHost(const QString& host){
this->host = host;
}
+void OAIPetApi::setApiTimeOutMs(const int tout){
+ timeout = tout;
+}
+
void OAIPetApi::addHeaders(const QString& key, const QString& value){
defaultHeaders.insert(key, value);
}
@@ -51,6 +57,7 @@ OAIPetApi::addPet(const OAIPet& body) {
fullPath.append(this->host).append(this->basePath).append("/pet");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
@@ -102,6 +109,7 @@ OAIPetApi::deletePet(const qint64& pet_id, const QString& api_key) {
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");
if (api_key != nullptr) {
@@ -189,6 +197,7 @@ OAIPetApi::findPetsByStatus(const QList& status) {
}
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -283,6 +292,7 @@ OAIPetApi::findPetsByTags(const QList& tags) {
}
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -340,6 +350,7 @@ OAIPetApi::getPetById(const qint64& pet_id) {
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -385,6 +396,7 @@ OAIPetApi::updatePet(const OAIPet& body) {
fullPath.append(this->host).append(this->basePath).append("/pet");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "PUT");
@@ -436,6 +448,7 @@ OAIPetApi::updatePetWithForm(const qint64& pet_id, const QString& name, const QS
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
if (name != nullptr) {
input.add_var("name", name);
@@ -489,6 +502,7 @@ OAIPetApi::uploadFile(const qint64& pet_id, const QString& additional_metadata,
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
if (additional_metadata != nullptr) {
input.add_var("additionalMetadata", additional_metadata);
diff --git a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h
index 336b973bdb..bd64db93db 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h
@@ -29,11 +29,12 @@ class OAIPetApi: public QObject {
public:
OAIPetApi();
- OAIPetApi(const QString& host, const QString& basePath);
+ OAIPetApi(const QString& host, const QString& basePath, const int toutMs = 0);
~OAIPetApi();
void setBasePath(const QString& basePath);
void setHost(const QString& host);
+ void setApiTimeOutMs(const int tout);
void addHeaders(const QString& key, const QString& value);
void addPet(const OAIPet& body);
@@ -48,6 +49,7 @@ public:
private:
QString basePath;
QString host;
+ int timeout;
QMap defaultHeaders;
void addPetCallback (OAIHttpRequestWorker * worker);
void deletePetCallback (OAIHttpRequestWorker * worker);
@@ -77,23 +79,23 @@ signals:
void updatePetWithFormSignalFull(OAIHttpRequestWorker* worker);
void uploadFileSignalFull(OAIHttpRequestWorker* worker, OAIApiResponse summary);
- void addPetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void deletePetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void findPetsByStatusSignalE(QList summary, QNetworkReply::NetworkError error_type, QString& error_str);
- void findPetsByTagsSignalE(QList summary, QNetworkReply::NetworkError error_type, QString& error_str);
- void getPetByIdSignalE(OAIPet summary, QNetworkReply::NetworkError error_type, QString& error_str);
- void updatePetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void updatePetWithFormSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void uploadFileSignalE(OAIApiResponse summary, QNetworkReply::NetworkError error_type, QString& error_str);
+ void addPetSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void deletePetSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void findPetsByStatusSignalE(QList summary, QNetworkReply::NetworkError error_type, QString error_str);
+ void findPetsByTagsSignalE(QList summary, QNetworkReply::NetworkError error_type, QString error_str);
+ void getPetByIdSignalE(OAIPet summary, QNetworkReply::NetworkError error_type, QString error_str);
+ void updatePetSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void updatePetWithFormSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void uploadFileSignalE(OAIApiResponse summary, QNetworkReply::NetworkError error_type, QString error_str);
- void addPetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void deletePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void findPetsByStatusSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void findPetsByTagsSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void getPetByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void updatePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void updatePetWithFormSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void uploadFileSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
+ void addPetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void deletePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void findPetsByStatusSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void findPetsByTagsSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void getPetByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void updatePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void updatePetWithFormSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void uploadFileSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
};
diff --git a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp
index e83f7f5139..90ac22d129 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp
@@ -19,7 +19,8 @@
namespace OpenAPI {
OAIStoreApi::OAIStoreApi() : basePath("/v2"),
- host("petstore.swagger.io") {
+ host("petstore.swagger.io"),
+ timeout(0){
}
@@ -27,9 +28,10 @@ OAIStoreApi::~OAIStoreApi() {
}
-OAIStoreApi::OAIStoreApi(const QString& host, const QString& basePath) {
+OAIStoreApi::OAIStoreApi(const QString& host, const QString& basePath, const int tout) {
this->host = host;
this->basePath = basePath;
+ this->timeout = tout;
}
void OAIStoreApi::setBasePath(const QString& basePath){
@@ -40,6 +42,10 @@ void OAIStoreApi::setHost(const QString& host){
this->host = host;
}
+void OAIStoreApi::setApiTimeOutMs(const int tout){
+ timeout = tout;
+}
+
void OAIStoreApi::addHeaders(const QString& key, const QString& value){
defaultHeaders.insert(key, value);
}
@@ -54,6 +60,7 @@ OAIStoreApi::deleteOrder(const QString& order_id) {
fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(order_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");
@@ -98,6 +105,7 @@ OAIStoreApi::getInventory() {
fullPath.append(this->host).append(this->basePath).append("/store/inventory");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -155,6 +163,7 @@ OAIStoreApi::getOrderById(const qint64& order_id) {
fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(order_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -200,6 +209,7 @@ OAIStoreApi::placeOrder(const OAIOrder& body) {
fullPath.append(this->host).append(this->basePath).append("/store/order");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
diff --git a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h
index 62bba015a3..e532321dcd 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h
@@ -28,11 +28,12 @@ class OAIStoreApi: public QObject {
public:
OAIStoreApi();
- OAIStoreApi(const QString& host, const QString& basePath);
+ OAIStoreApi(const QString& host, const QString& basePath, const int toutMs = 0);
~OAIStoreApi();
void setBasePath(const QString& basePath);
void setHost(const QString& host);
+ void setApiTimeOutMs(const int tout);
void addHeaders(const QString& key, const QString& value);
void deleteOrder(const QString& order_id);
@@ -43,6 +44,7 @@ public:
private:
QString basePath;
QString host;
+ int timeout;
QMap defaultHeaders;
void deleteOrderCallback (OAIHttpRequestWorker * worker);
void getInventoryCallback (OAIHttpRequestWorker * worker);
@@ -60,15 +62,15 @@ signals:
void getOrderByIdSignalFull(OAIHttpRequestWorker* worker, OAIOrder summary);
void placeOrderSignalFull(OAIHttpRequestWorker* worker, OAIOrder summary);
- void deleteOrderSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void getInventorySignalE(QMap summary, QNetworkReply::NetworkError error_type, QString& error_str);
- void getOrderByIdSignalE(OAIOrder summary, QNetworkReply::NetworkError error_type, QString& error_str);
- void placeOrderSignalE(OAIOrder summary, QNetworkReply::NetworkError error_type, QString& error_str);
+ void deleteOrderSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void getInventorySignalE(QMap summary, QNetworkReply::NetworkError error_type, QString error_str);
+ void getOrderByIdSignalE(OAIOrder summary, QNetworkReply::NetworkError error_type, QString error_str);
+ void placeOrderSignalE(OAIOrder summary, QNetworkReply::NetworkError error_type, QString error_str);
- void deleteOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void getInventorySignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void getOrderByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void placeOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
+ void deleteOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void getInventorySignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void getOrderByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void placeOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
};
diff --git a/samples/client/petstore/cpp-qt5/client/OAITag.h b/samples/client/petstore/cpp-qt5/client/OAITag.h
index 2a497cf1bd..497a021f08 100644
--- a/samples/client/petstore/cpp-qt5/client/OAITag.h
+++ b/samples/client/petstore/cpp-qt5/client/OAITag.h
@@ -68,4 +68,6 @@ private:
}
+Q_DECLARE_METATYPE(OpenAPI::OAITag)
+
#endif // OAITag_H
diff --git a/samples/client/petstore/cpp-qt5/client/OAIUser.h b/samples/client/petstore/cpp-qt5/client/OAIUser.h
index d388f62a29..556de32258 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIUser.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIUser.h
@@ -116,4 +116,6 @@ private:
}
+Q_DECLARE_METATYPE(OpenAPI::OAIUser)
+
#endif // OAIUser_H
diff --git a/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp
index 79731867df..36a418994f 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp
@@ -19,7 +19,8 @@
namespace OpenAPI {
OAIUserApi::OAIUserApi() : basePath("/v2"),
- host("petstore.swagger.io") {
+ host("petstore.swagger.io"),
+ timeout(0){
}
@@ -27,9 +28,10 @@ OAIUserApi::~OAIUserApi() {
}
-OAIUserApi::OAIUserApi(const QString& host, const QString& basePath) {
+OAIUserApi::OAIUserApi(const QString& host, const QString& basePath, const int tout) {
this->host = host;
this->basePath = basePath;
+ this->timeout = tout;
}
void OAIUserApi::setBasePath(const QString& basePath){
@@ -40,6 +42,10 @@ void OAIUserApi::setHost(const QString& host){
this->host = host;
}
+void OAIUserApi::setApiTimeOutMs(const int tout){
+ timeout = tout;
+}
+
void OAIUserApi::addHeaders(const QString& key, const QString& value){
defaultHeaders.insert(key, value);
}
@@ -51,6 +57,7 @@ OAIUserApi::createUser(const OAIUser& body) {
fullPath.append(this->host).append(this->basePath).append("/user");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
@@ -99,6 +106,7 @@ OAIUserApi::createUsersWithArrayInput(const QList& body) {
fullPath.append(this->host).append(this->basePath).append("/user/createWithArray");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
@@ -148,6 +156,7 @@ OAIUserApi::createUsersWithListInput(const QList& body) {
fullPath.append(this->host).append(this->basePath).append("/user/createWithList");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
@@ -200,6 +209,7 @@ OAIUserApi::deleteUser(const QString& username) {
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");
@@ -247,6 +257,7 @@ OAIUserApi::getUserByName(const QString& username) {
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -308,6 +319,7 @@ OAIUserApi::loginUser(const QString& username, const QString& password) {
.append(QUrl::toPercentEncoding(::OpenAPI::toStringValue(password)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -354,6 +366,7 @@ OAIUserApi::logoutUser() {
fullPath.append(this->host).append(this->basePath).append("/user/logout");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -401,6 +414,7 @@ OAIUserApi::updateUser(const QString& username, const OAIUser& body) {
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "PUT");
diff --git a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h
index 1f858bad94..d95814e071 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h
@@ -28,11 +28,12 @@ class OAIUserApi: public QObject {
public:
OAIUserApi();
- OAIUserApi(const QString& host, const QString& basePath);
+ OAIUserApi(const QString& host, const QString& basePath, const int toutMs = 0);
~OAIUserApi();
void setBasePath(const QString& basePath);
void setHost(const QString& host);
+ void setApiTimeOutMs(const int tout);
void addHeaders(const QString& key, const QString& value);
void createUser(const OAIUser& body);
@@ -47,6 +48,7 @@ public:
private:
QString basePath;
QString host;
+ int timeout;
QMap defaultHeaders;
void createUserCallback (OAIHttpRequestWorker * worker);
void createUsersWithArrayInputCallback (OAIHttpRequestWorker * worker);
@@ -76,23 +78,23 @@ signals:
void logoutUserSignalFull(OAIHttpRequestWorker* worker);
void updateUserSignalFull(OAIHttpRequestWorker* worker);
- void createUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void createUsersWithArrayInputSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void createUsersWithListInputSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void deleteUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void getUserByNameSignalE(OAIUser summary, QNetworkReply::NetworkError error_type, QString& error_str);
- void loginUserSignalE(QString summary, QNetworkReply::NetworkError error_type, QString& error_str);
- void logoutUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
- void updateUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
+ void createUserSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void createUsersWithArrayInputSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void createUsersWithListInputSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void deleteUserSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void getUserByNameSignalE(OAIUser summary, QNetworkReply::NetworkError error_type, QString error_str);
+ void loginUserSignalE(QString summary, QNetworkReply::NetworkError error_type, QString error_str);
+ void logoutUserSignalE(QNetworkReply::NetworkError error_type, QString error_str);
+ void updateUserSignalE(QNetworkReply::NetworkError error_type, QString error_str);
- void createUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void createUsersWithArrayInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void createUsersWithListInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void deleteUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void getUserByNameSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void loginUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void logoutUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
- void updateUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
+ void createUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void createUsersWithArrayInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void createUsersWithListInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void deleteUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void getUserByNameSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void loginUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void logoutUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
+ void updateUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString error_str);
};
diff --git a/samples/client/petstore/cpp-restsdk/CMakeLists.txt b/samples/client/petstore/cpp-restsdk/CMakeLists.txt
index 6c7bfafe81..6aec7474b5 100644
--- a/samples/client/petstore/cpp-restsdk/CMakeLists.txt
+++ b/samples/client/petstore/cpp-restsdk/CMakeLists.txt
@@ -1,54 +1,37 @@
-#
-# OpenAPI Petstore
-# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
-#
-# OpenAPI spec version: 1.0.0
-#
-# https://openapi-generator.tech
-#
-# NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech).
+cmake_minimum_required (VERSION 3.2)
-cmake_minimum_required (VERSION 2.8)
-
-#PROJECT's NAME
-project(CppRestOpenAPIClient)
+project(cpprest-petstore)
+set(CMAKE_VERBOSE_MAKEFILE ON)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# THE LOCATION OF OUTPUT BINARIES
-set(CMAKE_LIBRARY_DIR ${PROJECT_SOURCE_DIR}/lib)
-set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_DIR})
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wno-unused-variable")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++14 -Wall -Wno-unused-variable")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg -g3")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -g3")
+set(CMAKE_BUILD_TYPE Debug)
+set(CMAKE_PREFIX_PATH /usr/lib/x86_64-linux-gnu/cmake)
+find_package(cpprestsdk REQUIRED)
+find_package(Boost REQUIRED)
+add_subdirectory(client)
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Release)
-endif()
+file(GLOB SRCS
+ ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
+)
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/client
+ ${CMAKE_CURRENT_SOURCE_DIR}/client/model
+ ${CMAKE_CURRENT_SOURCE_DIR}/client/api
+)
-# BUILD TYPE
-message("A ${CMAKE_BUILD_TYPE} build configuration is detected")
+link_directories(
+ ${Boost_LIBRARY_DIRS}
+)
+add_executable(${PROJECT_NAME} ${SRCS})
+add_dependencies(${PROJECT_NAME} CppRestOpenAPIClient )
+target_link_libraries(${PROJECT_NAME} CppRestOpenAPIClient cpprest pthread boost_system crypto)
+set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
+set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
-# Update require components as necessary
-#find_package(Boost 1.45.0 REQUIRED COMPONENTS ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
-
-# build and set path to cpp rest sdk
-set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/3rdParty/cpprest)
-set(CPPREST_INCLUDE_DIR ${CPPREST_ROOT}/include)
-set(CPPREST_LIBRARY_DIR ${CPPREST_ROOT}/lib)
-
-include_directories(${PROJECT_SOURCE_DIR} api model ${CPPREST_INCLUDE_DIR})
-
-
-# If using vcpkg, set include directories. Also comment out CPPREST section above since vcpkg will handle it.
-# To install required vcpkg packages execute:
-# > vcpkg install cpprestsdk cpprestsdk:x64-windows boost-uuid boost-uuid:x64-windows
-# set(VCPKG_ROOT "C:\\vcpkg\\installed\\x64-windows")
-# set(VCPKG_INCLUDE_DIR ${VCPKG_ROOT}/include)
-# set(VCPKG_LIBRARY_DIR ${VCPKG_ROOT}/lib)
-# include_directories(${PROJECT_SOURCE_DIR} api model ${VCPKG_INCLUDE_DIR})
-
-#SUPPORTING FILES
-set(SUPPORTING_FILES "ApiClient" "ApiConfiguration" "ApiException" "HttpContent" "IHttpBody" "JsonBody" "ModelBase" "MultipartFormData" "Object")
-#SOURCE FILES
-file(GLOB SOURCE_FILES "api/*" "model/*")
-
-add_library(${PROJECT_NAME} ${SUPPORTING_FILES} ${SOURCE_FILES})
+install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
diff --git a/samples/client/petstore/cpp-restsdk/PetApiTests.cpp b/samples/client/petstore/cpp-restsdk/PetApiTests.cpp
new file mode 100644
index 0000000000..c8a1bdad1a
--- /dev/null
+++ b/samples/client/petstore/cpp-restsdk/PetApiTests.cpp
@@ -0,0 +1,92 @@
+#include "PetApiTests.h"
+#include
+#include
+#include
+#include
+
+OAIPetApiTests::OAIPetApiTests(std::string host, std::string basePath){
+ apiconfiguration = std::make_shared();
+ apiconfiguration->setBaseUrl(host + basePath);
+ apiconfiguration->setUserAgent(U("OpenAPI Client"));
+ apiclient = std::make_shared(apiconfiguration);
+ api = std::make_shared(apiclient);
+}
+
+OAIPetApiTests::~OAIPetApiTests() {
+
+}
+
+void OAIPetApiTests::runTests(){
+ testAddPet();
+ testFindPetsByStatus();
+ testGetPetById();
+}
+
+void OAIPetApiTests::testAddPet(){
+ auto req = std::make_shared();
+ req->setId(12345);
+ req->setName("cpprest-pet");
+ req->setStatus(U("123"));
+
+ std::function responseCallback = []()
+ {
+ std::cout << "added pet successfully" << std::endl;
+ };
+
+ auto reqTask = api->addPet(req).then(responseCallback);
+ try{
+ reqTask.wait();
+ }
+ catch(const ApiException& ex){
+ std::cout << ex.what() << std::endl << std::flush;
+ std::string err(ex.what());
+ }
+ catch(const std::exception &ex){
+ std::cout << ex.what() << std::endl << std::flush;
+ std::string err(ex.what());
+ }
+}
+
+void OAIPetApiTests::testFindPetsByStatus(){
+ auto req = std::vector();
+ req.push_back(U("123"));
+ auto reqTask = api->findPetsByStatus(req)
+ .then([=](std::vector> pets)
+ {
+ std::cout << "found pet successfully" << std::endl;
+ });
+ try{
+ reqTask.wait();
+ }
+ catch(const ApiException& ex){
+ std::cout << ex.what() << std::endl << std::flush;
+ std::string err(ex.what());
+ }
+ catch(const std::exception &ex){
+ std::cout << ex.what() << std::endl << std::flush;
+ std::string err(ex.what());
+ }
+}
+
+void OAIPetApiTests::testGetPetById(){
+ int req = 12345;
+ auto responseCallback = std::bind(&OAIPetApiTests::getPetByIdCallback, this, std::placeholders::_1);
+
+ auto reqTask = api->getPetById(req).then(responseCallback);
+
+ try{
+ reqTask.wait();
+ }
+ catch(const ApiException& ex){
+ std::cout << ex.what() << std::endl << std::flush;
+ std::string err(ex.what());
+ }
+ catch(const std::exception &ex){
+ std::cout << ex.what() << std::endl << std::flush;
+ std::string err(ex.what());
+ }
+}
+
+void OAIPetApiTests::getPetByIdCallback(std::shared_ptr pet){
+ std::cout << "found pet by id successfully" << std::endl;
+}
diff --git a/samples/client/petstore/cpp-restsdk/PetApiTests.h b/samples/client/petstore/cpp-restsdk/PetApiTests.h
new file mode 100644
index 0000000000..7727a6437f
--- /dev/null
+++ b/samples/client/petstore/cpp-restsdk/PetApiTests.h
@@ -0,0 +1,34 @@
+#ifndef OAI_PETAPI_TESTS_H
+#define OAI_PETAPI_TESTS_H
+
+#include
+#include "client/ApiClient.h"
+#include "client/ApiConfiguration.h"
+#include "client/api/PetApi.h"
+#include "client/model/Pet.h"
+
+
+using namespace std;
+using namespace org::openapitools::client::api;
+
+class OAIPetApiTests
+{
+public:
+ explicit OAIPetApiTests(std::string host = U("http://petstore.swagger.io"), std::string basePath = U("/v2"));
+
+ virtual ~OAIPetApiTests();
+public:
+ void runTests();
+private:
+ void testAddPet();
+ void testFindPetsByStatus();
+ void testGetPetById();
+
+ void getPetByIdCallback(std::shared_ptr pet);
+
+ std::shared_ptr apiconfiguration;
+ std::shared_ptr apiclient;
+ std::shared_ptr api;
+};
+
+#endif // OAI_PETAPI_TESTS_H
diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
similarity index 98%
rename from samples/client/petstore/cpp-restsdk/ApiClient.cpp
rename to samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
index f9445bd20c..384eb8a8bc 100644
--- a/samples/client/petstore/cpp-restsdk/ApiClient.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h
similarity index 96%
rename from samples/client/petstore/cpp-restsdk/ApiClient.h
rename to samples/client/petstore/cpp-restsdk/client/ApiClient.h
index 2e34724d59..5c5d78c765 100644
--- a/samples/client/petstore/cpp-restsdk/ApiClient.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
similarity index 93%
rename from samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp
rename to samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
index 531320239f..251b0d0d29 100644
--- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
similarity index 93%
rename from samples/client/petstore/cpp-restsdk/ApiConfiguration.h
rename to samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
index d89fea879e..f6f3520599 100644
--- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp
similarity index 91%
rename from samples/client/petstore/cpp-restsdk/ApiException.cpp
rename to samples/client/petstore/cpp-restsdk/client/ApiException.cpp
index 124bf39114..b0a637cf60 100644
--- a/samples/client/petstore/cpp-restsdk/ApiException.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h
similarity index 92%
rename from samples/client/petstore/cpp-restsdk/ApiException.h
rename to samples/client/petstore/cpp-restsdk/client/ApiException.h
index d419f13f3d..30f5ef51df 100644
--- a/samples/client/petstore/cpp-restsdk/ApiException.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/CMakeLists.txt b/samples/client/petstore/cpp-restsdk/client/CMakeLists.txt
new file mode 100644
index 0000000000..86565fec65
--- /dev/null
+++ b/samples/client/petstore/cpp-restsdk/client/CMakeLists.txt
@@ -0,0 +1,54 @@
+#
+# OpenAPI Petstore
+# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
+#
+# The version of the OpenAPI document: 1.0.0
+#
+# https://openapi-generator.tech
+#
+# NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech).
+
+cmake_minimum_required (VERSION 2.8)
+
+#PROJECT's NAME
+project(CppRestOpenAPIClient)
+
+
+# THE LOCATION OF OUTPUT BINARIES
+set(CMAKE_LIBRARY_DIR ${PROJECT_SOURCE_DIR}/lib)
+set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_DIR})
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Release)
+endif()
+
+# BUILD TYPE
+message("A ${CMAKE_BUILD_TYPE} build configuration is detected")
+
+# Update require components as necessary
+#find_package(Boost 1.45.0 REQUIRED COMPONENTS ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
+
+# build and set path to cpp rest sdk
+set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/3rdParty/cpprest)
+set(CPPREST_INCLUDE_DIR ${CPPREST_ROOT}/include)
+set(CPPREST_LIBRARY_DIR ${CPPREST_ROOT}/lib)
+
+include_directories(${PROJECT_SOURCE_DIR} api model ${CPPREST_INCLUDE_DIR})
+
+
+# If using vcpkg, set include directories. Also comment out CPPREST section above since vcpkg will handle it.
+# To install required vcpkg packages execute:
+# > vcpkg install cpprestsdk cpprestsdk:x64-windows boost-uuid boost-uuid:x64-windows
+# set(VCPKG_ROOT "C:\\vcpkg\\installed\\x64-windows")
+# set(VCPKG_INCLUDE_DIR ${VCPKG_ROOT}/include)
+# set(VCPKG_LIBRARY_DIR ${VCPKG_ROOT}/lib)
+# include_directories(${PROJECT_SOURCE_DIR} api model ${VCPKG_INCLUDE_DIR})
+
+#SUPPORTING FILES
+set(SUPPORTING_FILES "ApiClient" "ApiConfiguration" "ApiException" "HttpContent" "IHttpBody" "JsonBody" "ModelBase" "MultipartFormData" "Object")
+#SOURCE FILES
+file(GLOB SOURCE_FILES "api/*" "model/*")
+
+add_library(${PROJECT_NAME} ${SUPPORTING_FILES} ${SOURCE_FILES})
diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
similarity index 92%
rename from samples/client/petstore/cpp-restsdk/HttpContent.cpp
rename to samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
index 0c0cce5fcd..6dedcd2990 100644
--- a/samples/client/petstore/cpp-restsdk/HttpContent.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h
similarity index 93%
rename from samples/client/petstore/cpp-restsdk/HttpContent.h
rename to samples/client/petstore/cpp-restsdk/client/HttpContent.h
index 25dd1d5c6e..b357475da3 100644
--- a/samples/client/petstore/cpp-restsdk/HttpContent.h
+++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h
similarity index 87%
rename from samples/client/petstore/cpp-restsdk/IHttpBody.h
rename to samples/client/petstore/cpp-restsdk/client/IHttpBody.h
index 07d0e5c84c..865bd467f3 100644
--- a/samples/client/petstore/cpp-restsdk/IHttpBody.h
+++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
similarity index 83%
rename from samples/client/petstore/cpp-restsdk/JsonBody.cpp
rename to samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
index b523ba6f67..e2edc1b67e 100644
--- a/samples/client/petstore/cpp-restsdk/JsonBody.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h
similarity index 88%
rename from samples/client/petstore/cpp-restsdk/JsonBody.h
rename to samples/client/petstore/cpp-restsdk/client/JsonBody.h
index dacf42985c..fba123dfc4 100644
--- a/samples/client/petstore/cpp-restsdk/JsonBody.h
+++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
similarity index 99%
rename from samples/client/petstore/cpp-restsdk/ModelBase.cpp
rename to samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
index ec9192c14e..8b9f859dd6 100644
--- a/samples/client/petstore/cpp-restsdk/ModelBase.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h
similarity index 98%
rename from samples/client/petstore/cpp-restsdk/ModelBase.h
rename to samples/client/petstore/cpp-restsdk/client/ModelBase.h
index 80e8a76edb..26459aa589 100644
--- a/samples/client/petstore/cpp-restsdk/ModelBase.h
+++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
similarity index 96%
rename from samples/client/petstore/cpp-restsdk/MultipartFormData.cpp
rename to samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
index fda5c805bd..ec6af2de5e 100644
--- a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
similarity index 93%
rename from samples/client/petstore/cpp-restsdk/MultipartFormData.h
rename to samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
index cff61c6cb5..96d8c3a662 100644
--- a/samples/client/petstore/cpp-restsdk/MultipartFormData.h
+++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp
similarity index 94%
rename from samples/client/petstore/cpp-restsdk/Object.cpp
rename to samples/client/petstore/cpp-restsdk/client/Object.cpp
index a63e69cea4..3624e24a01 100644
--- a/samples/client/petstore/cpp-restsdk/Object.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h
similarity index 92%
rename from samples/client/petstore/cpp-restsdk/Object.h
rename to samples/client/petstore/cpp-restsdk/client/Object.h
index 99179be55b..bc2c7aa757 100644
--- a/samples/client/petstore/cpp-restsdk/Object.h
+++ b/samples/client/petstore/cpp-restsdk/client/Object.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/README.md b/samples/client/petstore/cpp-restsdk/client/README.md
similarity index 100%
rename from samples/client/petstore/cpp-restsdk/README.md
rename to samples/client/petstore/cpp-restsdk/client/README.md
diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
similarity index 99%
rename from samples/client/petstore/cpp-restsdk/api/PetApi.cpp
rename to samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
index d8530e324c..0c67b5ecbf 100644
--- a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h
similarity index 97%
rename from samples/client/petstore/cpp-restsdk/api/PetApi.h
rename to samples/client/petstore/cpp-restsdk/client/api/PetApi.h
index bb7b6f7b19..09b2f06da9 100644
--- a/samples/client/petstore/cpp-restsdk/api/PetApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
similarity index 99%
rename from samples/client/petstore/cpp-restsdk/api/StoreApi.cpp
rename to samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
index 0ec396c54e..a7bcf614ee 100644
--- a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
similarity index 95%
rename from samples/client/petstore/cpp-restsdk/api/StoreApi.h
rename to samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
index 700f788df2..2aaf9bf596 100644
--- a/samples/client/petstore/cpp-restsdk/api/StoreApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
similarity index 99%
rename from samples/client/petstore/cpp-restsdk/api/UserApi.cpp
rename to samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
index ba8769d344..a4c4f1bf46 100644
--- a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h
similarity index 96%
rename from samples/client/petstore/cpp-restsdk/api/UserApi.h
rename to samples/client/petstore/cpp-restsdk/client/api/UserApi.h
index fc76cfc917..aa840cf1f9 100644
--- a/samples/client/petstore/cpp-restsdk/api/UserApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/git_push.sh b/samples/client/petstore/cpp-restsdk/client/git_push.sh
similarity index 100%
rename from samples/client/petstore/cpp-restsdk/git_push.sh
rename to samples/client/petstore/cpp-restsdk/client/git_push.sh
diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
similarity index 97%
rename from samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp
rename to samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
index 4122b863fb..3fa6061fb0 100644
--- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
similarity index 94%
rename from samples/client/petstore/cpp-restsdk/model/ApiResponse.h
rename to samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
index 83115c794a..9b1d7abc1a 100644
--- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp
similarity index 96%
rename from samples/client/petstore/cpp-restsdk/model/Category.cpp
rename to samples/client/petstore/cpp-restsdk/client/model/Category.cpp
index ad6422cb90..8d21469964 100644
--- a/samples/client/petstore/cpp-restsdk/model/Category.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h
similarity index 94%
rename from samples/client/petstore/cpp-restsdk/model/Category.h
rename to samples/client/petstore/cpp-restsdk/client/model/Category.h
index 026ec86072..1d425850a5 100644
--- a/samples/client/petstore/cpp-restsdk/model/Category.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp
similarity index 98%
rename from samples/client/petstore/cpp-restsdk/model/Order.cpp
rename to samples/client/petstore/cpp-restsdk/client/model/Order.cpp
index a15f779237..e137a045fa 100644
--- a/samples/client/petstore/cpp-restsdk/model/Order.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h
similarity index 96%
rename from samples/client/petstore/cpp-restsdk/model/Order.h
rename to samples/client/petstore/cpp-restsdk/client/model/Order.h
index c5d4153cfc..9d69758740 100644
--- a/samples/client/petstore/cpp-restsdk/model/Order.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
similarity index 98%
rename from samples/client/petstore/cpp-restsdk/model/Pet.cpp
rename to samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
index 6e4ebb69c4..76a39be3db 100644
--- a/samples/client/petstore/cpp-restsdk/model/Pet.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h
similarity index 96%
rename from samples/client/petstore/cpp-restsdk/model/Pet.h
rename to samples/client/petstore/cpp-restsdk/client/model/Pet.h
index 881685336d..3ebb80bf28 100644
--- a/samples/client/petstore/cpp-restsdk/model/Pet.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
similarity index 96%
rename from samples/client/petstore/cpp-restsdk/model/Tag.cpp
rename to samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
index 9f5f5b1463..a4af089387 100644
--- a/samples/client/petstore/cpp-restsdk/model/Tag.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h
similarity index 93%
rename from samples/client/petstore/cpp-restsdk/model/Tag.h
rename to samples/client/petstore/cpp-restsdk/client/model/Tag.h
index 9df0f2c2e7..db92cc2549 100644
--- a/samples/client/petstore/cpp-restsdk/model/Tag.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp
similarity index 98%
rename from samples/client/petstore/cpp-restsdk/model/User.cpp
rename to samples/client/petstore/cpp-restsdk/client/model/User.cpp
index 93a64fbb36..8ffd2ea50d 100644
--- a/samples/client/petstore/cpp-restsdk/model/User.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h
similarity index 96%
rename from samples/client/petstore/cpp-restsdk/model/User.h
rename to samples/client/petstore/cpp-restsdk/client/model/User.h
index 851dcc57a2..e3a970cb4d 100644
--- a/samples/client/petstore/cpp-restsdk/model/User.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/User.h
@@ -2,9 +2,9 @@
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 4.0.0-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 4.0.2-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/pom.xml b/samples/client/petstore/cpp-restsdk/client/pom.xml
similarity index 100%
rename from samples/client/petstore/cpp-restsdk/pom.xml
rename to samples/client/petstore/cpp-restsdk/client/pom.xml
diff --git a/samples/client/petstore/cpp-restsdk/main.cpp b/samples/client/petstore/cpp-restsdk/main.cpp
new file mode 100644
index 0000000000..27ca41ceb6
--- /dev/null
+++ b/samples/client/petstore/cpp-restsdk/main.cpp
@@ -0,0 +1,6 @@
+#include "PetApiTests.h"
+
+int main(int argc, char *argv[]) {
+ auto petTest = std::make_shared();
+ petTest->runTests();
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md
index 8e32073669..c2049be312 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md
@@ -48,7 +48,7 @@ using Org.OpenAPITools.Model;
## Getting Started
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -58,10 +58,11 @@ namespace Example
{
public class Example
{
- public void main()
+ public static void Main()
{
- var apiInstance = new AnotherFakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new AnotherFakeApi(Configuration.Default);
var body = new ModelClient(); // ModelClient | client model
try
@@ -70,9 +71,11 @@ namespace Example
ModelClient result = apiInstance.Call123TestSpecialTags(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md
index 612293b48b..bf404a2f49 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md
@@ -17,7 +17,7 @@ To test special tags and operation ID starting with number
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -27,9 +27,10 @@ namespace Example
{
public class Call123TestSpecialTagsExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new AnotherFakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new AnotherFakeApi(Configuration.Default);
var body = new ModelClient(); // ModelClient | client model
try
@@ -38,9 +39,11 @@ namespace Example
ModelClient result = apiInstance.Call123TestSpecialTags(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -66,5 +69,10 @@ No authorization required
- **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-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md
index 8a11d6461f..0fd0f4dad7 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md
@@ -29,7 +29,7 @@ this route creates an XmlItem
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -39,9 +39,10 @@ namespace Example
{
public class CreateXmlItemExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var xmlItem = new XmlItem(); // XmlItem | XmlItem Body
try
@@ -49,9 +50,11 @@ namespace Example
// creates an XmlItem
apiInstance.CreateXmlItem(xmlItem);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -77,6 +80,11 @@ No authorization required
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **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)
@@ -89,7 +97,7 @@ Test serialization of outer boolean types
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -99,9 +107,10 @@ namespace Example
{
public class FakeOuterBooleanSerializeExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = true; // bool? | Input boolean as post body (optional)
try
@@ -109,9 +118,11 @@ namespace Example
bool result = apiInstance.FakeOuterBooleanSerialize(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -137,6 +148,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -149,7 +165,7 @@ Test serialization of object with outer number type
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -159,9 +175,10 @@ namespace Example
{
public class FakeOuterCompositeSerializeExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional)
try
@@ -169,9 +186,11 @@ namespace Example
OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -197,6 +216,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -209,7 +233,7 @@ Test serialization of outer number types
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -219,9 +243,10 @@ namespace Example
{
public class FakeOuterNumberSerializeExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = 8.14; // decimal? | Input number as post body (optional)
try
@@ -229,9 +254,11 @@ namespace Example
decimal result = apiInstance.FakeOuterNumberSerialize(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -257,6 +284,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -269,7 +301,7 @@ Test serialization of outer string types
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -279,9 +311,10 @@ namespace Example
{
public class FakeOuterStringSerializeExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = body_example; // string | Input string as post body (optional)
try
@@ -289,9 +322,11 @@ namespace Example
string result = apiInstance.FakeOuterStringSerialize(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -317,6 +352,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -329,7 +369,7 @@ For this test, the body for this request much reference a schema named `File`.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -339,18 +379,21 @@ namespace Example
{
public class TestBodyWithFileSchemaExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = new FileSchemaTestClass(); // FileSchemaTestClass |
try
{
apiInstance.TestBodyWithFileSchema(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -376,6 +419,11 @@ No authorization required
- **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)
@@ -386,7 +434,7 @@ No authorization required
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -396,9 +444,10 @@ namespace Example
{
public class TestBodyWithQueryParamsExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var query = query_example; // string |
var body = new User(); // User |
@@ -406,9 +455,11 @@ namespace Example
{
apiInstance.TestBodyWithQueryParams(query, body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -435,6 +486,11 @@ No authorization required
- **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)
@@ -447,7 +503,7 @@ To test \"client\" model
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -457,9 +513,10 @@ namespace Example
{
public class TestClientModelExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = new ModelClient(); // ModelClient | client model
try
@@ -468,9 +525,11 @@ namespace Example
ModelClient result = apiInstance.TestClientModel(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -496,6 +555,11 @@ No authorization required
- **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)
@@ -508,7 +572,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -518,13 +582,14 @@ namespace Example
{
public class TestEndpointParametersExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure HTTP basic authorization: http_basic_test
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
- var apiInstance = new FakeApi();
+ var apiInstance = new FakeApi(Configuration.Default);
var number = 8.14; // decimal | None
var _double = 1.2D; // double | None
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
@@ -545,9 +610,11 @@ namespace Example
// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -586,6 +653,12 @@ void (empty response body)
- **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)
@@ -598,7 +671,7 @@ To test enum parameters
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -608,9 +681,10 @@ namespace Example
{
public class TestEnumParametersExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional)
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional)
@@ -625,9 +699,11 @@ namespace Example
// To test enum parameters
apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -660,6 +736,12 @@ No authorization required
- **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)
@@ -672,7 +754,7 @@ Fake endpoint to test group parameters (optional)
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -682,9 +764,10 @@ namespace Example
{
public class TestGroupParametersExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var requiredStringGroup = 56; // int | Required String in group parameters
var requiredBooleanGroup = true; // bool | Required Boolean in group parameters
var requiredInt64Group = 789; // long | Required Integer in group parameters
@@ -697,9 +780,11 @@ namespace Example
// Fake endpoint to test group parameters (optional)
apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -730,6 +815,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Someting 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)
@@ -740,7 +830,7 @@ test inline additionalProperties
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -750,9 +840,10 @@ namespace Example
{
public class TestInlineAdditionalPropertiesExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var param = new Dictionary(); // Dictionary | request body
try
@@ -760,9 +851,11 @@ namespace Example
// test inline additionalProperties
apiInstance.TestInlineAdditionalProperties(param);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -788,6 +881,11 @@ No authorization required
- **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)
@@ -798,7 +896,7 @@ test json serialization of form data
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -808,9 +906,10 @@ namespace Example
{
public class TestJsonFormDataExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var param = param_example; // string | field1
var param2 = param2_example; // string | field2
@@ -819,9 +918,11 @@ namespace Example
// test json serialization of form data
apiInstance.TestJsonFormData(param, param2);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -848,5 +949,10 @@ No authorization required
- **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)
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md
index abea3cb997..3a241e3c63 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md
@@ -17,7 +17,7 @@ To test class name in snake case
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -27,14 +27,15 @@ namespace Example
{
public class TestClassnameExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key_query
Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer");
- var apiInstance = new FakeClassnameTags123Api();
+ var apiInstance = new FakeClassnameTags123Api(Configuration.Default);
var body = new ModelClient(); // ModelClient | client model
try
@@ -43,9 +44,11 @@ namespace Example
ModelClient result = apiInstance.TestClassname(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -71,5 +74,10 @@ Name | Type | Description | Notes
- **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-netcore/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md
index a7b361f05a..f8d05ec939 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md
@@ -23,7 +23,7 @@ Add a new pet to the store
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -33,12 +33,13 @@ namespace Example
{
public class AddPetExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var body = new Pet(); // Pet | Pet object that needs to be added to the store
try
@@ -46,9 +47,11 @@ namespace Example
// Add a new pet to the store
apiInstance.AddPet(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -74,6 +77,12 @@ void (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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)
@@ -84,7 +93,7 @@ Deletes a pet
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -94,12 +103,13 @@ namespace Example
{
public class DeletePetExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // long | Pet id to delete
var apiKey = apiKey_example; // string | (optional)
@@ -108,9 +118,11 @@ namespace Example
// Deletes a pet
apiInstance.DeletePet(petId, apiKey);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -137,11 +149,17 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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 FindPetsByStatus (List status)
+> List<Pet> FindPetsByStatus (List status)
Finds Pets by status
@@ -149,7 +167,7 @@ Multiple status values can be provided with comma separated strings
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -159,23 +177,26 @@ namespace Example
{
public class FindPetsByStatusExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var status = status_example; // List | Status values that need to be considered for filter
try
{
// Finds Pets by status
- List<Pet> result = apiInstance.FindPetsByStatus(status);
+ List result = apiInstance.FindPetsByStatus(status);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -190,7 +211,7 @@ Name | Type | Description | Notes
### Return type
-[**List**](Pet.md)
+[**List<Pet>**](Pet.md)
### Authorization
@@ -201,11 +222,17 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status 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)
# **FindPetsByTags**
-> List FindPetsByTags (List tags)
+> List<Pet> FindPetsByTags (List tags)
Finds Pets by tags
@@ -213,7 +240,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -223,23 +250,26 @@ namespace Example
{
public class FindPetsByTagsExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var tags = new List(); // List | Tags to filter by
try
{
// Finds Pets by tags
- List<Pet> result = apiInstance.FindPetsByTags(tags);
+ List result = apiInstance.FindPetsByTags(tags);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -254,7 +284,7 @@ Name | Type | Description | Notes
### Return type
-[**List**](Pet.md)
+[**List<Pet>**](Pet.md)
### Authorization
@@ -265,6 +295,12 @@ Name | Type | Description | Notes
- **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)
@@ -277,7 +313,7 @@ Returns a single pet
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -287,14 +323,15 @@ namespace Example
{
public class GetPetByIdExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // long | ID of pet to return
try
@@ -303,9 +340,11 @@ namespace Example
Pet result = apiInstance.GetPetById(petId);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -331,6 +370,13 @@ Name | Type | Description | Notes
- **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)
@@ -341,7 +387,7 @@ Update an existing pet
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -351,12 +397,13 @@ namespace Example
{
public class UpdatePetExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var body = new Pet(); // Pet | Pet object that needs to be added to the store
try
@@ -364,9 +411,11 @@ namespace Example
// Update an existing pet
apiInstance.UpdatePet(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -392,6 +441,14 @@ void (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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)
@@ -402,7 +459,7 @@ Updates a pet in the store with form data
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -412,12 +469,13 @@ namespace Example
{
public class UpdatePetWithFormExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // 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)
@@ -427,9 +485,11 @@ namespace Example
// Updates a pet in the store with form data
apiInstance.UpdatePetWithForm(petId, name, status);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -457,6 +517,11 @@ void (empty response body)
- **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)
@@ -467,7 +532,7 @@ uploads an image
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -477,12 +542,13 @@ namespace Example
{
public class UploadFileExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // long | ID of pet to update
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional)
@@ -493,9 +559,11 @@ namespace Example
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -523,6 +591,11 @@ Name | Type | Description | Notes
- **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)
@@ -533,7 +606,7 @@ uploads an image (required)
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -543,12 +616,13 @@ namespace Example
{
public class UploadFileWithRequiredFileExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // long | ID of pet to update
var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
@@ -559,9 +633,11 @@ namespace Example
ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -589,5 +665,10 @@ Name | Type | Description | Notes
- **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)
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md
index 947a0304ce..c514385260 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md
@@ -20,7 +20,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -30,9 +30,10 @@ namespace Example
{
public class DeleteOrderExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new StoreApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(Configuration.Default);
var orderId = orderId_example; // string | ID of the order that needs to be deleted
try
@@ -40,9 +41,11 @@ namespace Example
// Delete purchase order by ID
apiInstance.DeleteOrder(orderId);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -68,11 +71,17 @@ No authorization required
- **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 GetInventory ()
+> Dictionary<string, int> GetInventory ()
Returns pet inventories by status
@@ -80,7 +89,7 @@ Returns a map of status codes to quantities
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -90,24 +99,27 @@ namespace Example
{
public class GetInventoryExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
- var apiInstance = new StoreApi();
+ var apiInstance = new StoreApi(Configuration.Default);
try
{
// Returns pet inventories by status
- Dictionary<string, int> result = apiInstance.GetInventory();
+ Dictionary result = apiInstance.GetInventory();
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -130,6 +142,11 @@ This endpoint does not need any parameter.
- **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)
@@ -142,7 +159,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -152,9 +169,10 @@ namespace Example
{
public class GetOrderByIdExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new StoreApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(Configuration.Default);
var orderId = 789; // long | ID of pet that needs to be fetched
try
@@ -163,9 +181,11 @@ namespace Example
Order result = apiInstance.GetOrderById(orderId);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -191,6 +211,13 @@ No authorization required
- **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)
@@ -201,7 +228,7 @@ Place an order for a pet
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -211,9 +238,10 @@ namespace Example
{
public class PlaceOrderExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new StoreApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(Configuration.Default);
var body = new Order(); // Order | order placed for purchasing the pet
try
@@ -222,9 +250,11 @@ namespace Example
Order result = apiInstance.PlaceOrder(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -250,5 +280,11 @@ No authorization required
- **Content-Type**: Not defined
- **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-netcore/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md
index 9a535e16a8..4588b44013 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md
@@ -24,7 +24,7 @@ This can only be done by the logged in user.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -34,9 +34,10 @@ namespace Example
{
public class CreateUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var body = new User(); // User | Created user object
try
@@ -44,9 +45,11 @@ namespace Example
// Create user
apiInstance.CreateUser(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -72,6 +75,11 @@ No authorization required
- **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)
@@ -82,7 +90,7 @@ Creates list of users with given input array
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -92,9 +100,10 @@ namespace Example
{
public class CreateUsersWithArrayInputExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var body = new List(); // List | List of user object
try
@@ -102,9 +111,11 @@ namespace Example
// Creates list of users with given input array
apiInstance.CreateUsersWithArrayInput(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -115,7 +126,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -130,6 +141,11 @@ No authorization required
- **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)
@@ -140,7 +156,7 @@ Creates list of users with given input array
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -150,9 +166,10 @@ namespace Example
{
public class CreateUsersWithListInputExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var body = new List(); // List | List of user object
try
@@ -160,9 +177,11 @@ namespace Example
// Creates list of users with given input array
apiInstance.CreateUsersWithListInput(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -173,7 +192,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -188,6 +207,11 @@ No authorization required
- **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)
@@ -200,7 +224,7 @@ This can only be done by the logged in user.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -210,9 +234,10 @@ namespace Example
{
public class DeleteUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var username = username_example; // string | The name that needs to be deleted
try
@@ -220,9 +245,11 @@ namespace Example
// Delete user
apiInstance.DeleteUser(username);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -248,6 +275,12 @@ No authorization required
- **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)
@@ -258,7 +291,7 @@ Get user by user name
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -268,9 +301,10 @@ namespace Example
{
public class GetUserByNameExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var username = username_example; // string | The name that needs to be fetched. Use user1 for testing.
try
@@ -279,9 +313,11 @@ namespace Example
User result = apiInstance.GetUserByName(username);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -307,6 +343,13 @@ No authorization required
- **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 | - |
+
[[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)
@@ -317,7 +360,7 @@ Logs user into the system
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -327,9 +370,10 @@ namespace Example
{
public class LoginUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var username = username_example; // string | The user name for login
var password = password_example; // string | The password for login in clear text
@@ -339,9 +383,11 @@ namespace Example
string result = apiInstance.LoginUser(username, password);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -368,6 +414,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * 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)
@@ -378,7 +430,7 @@ Logs out current logged in user session
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -388,18 +440,21 @@ namespace Example
{
public class LogoutUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
try
{
// Logs out current logged in user session
apiInstance.LogoutUser();
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -422,6 +477,11 @@ No authorization required
- **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)
@@ -434,7 +494,7 @@ This can only be done by the logged in user.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -444,9 +504,10 @@ namespace Example
{
public class UpdateUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var username = username_example; // string | name that need to be deleted
var body = new User(); // User | Updated user object
@@ -455,9 +516,11 @@ namespace Example
// Updated user
apiInstance.UpdateUser(username, body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -484,5 +547,11 @@ No authorization required
- **Content-Type**: Not defined
- **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-netcore/OpenAPIClientCore/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md
index bd485a13cd..8ed98381be 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md
@@ -60,7 +60,7 @@ Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-p
## Getting Started
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -70,10 +70,11 @@ namespace Example
{
public class Example
{
- public void main()
+ public static void Main()
{
- var apiInstance = new AnotherFakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new AnotherFakeApi(Configuration.Default);
var body = new ModelClient(); // ModelClient | client model
try
@@ -82,9 +83,11 @@ namespace Example
ModelClient result = apiInstance.Call123TestSpecialTags(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md
index 612293b48b..bf404a2f49 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md
@@ -17,7 +17,7 @@ To test special tags and operation ID starting with number
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -27,9 +27,10 @@ namespace Example
{
public class Call123TestSpecialTagsExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new AnotherFakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new AnotherFakeApi(Configuration.Default);
var body = new ModelClient(); // ModelClient | client model
try
@@ -38,9 +39,11 @@ namespace Example
ModelClient result = apiInstance.Call123TestSpecialTags(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -66,5 +69,10 @@ No authorization required
- **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-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md
index 8a11d6461f..0fd0f4dad7 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md
@@ -29,7 +29,7 @@ this route creates an XmlItem
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -39,9 +39,10 @@ namespace Example
{
public class CreateXmlItemExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var xmlItem = new XmlItem(); // XmlItem | XmlItem Body
try
@@ -49,9 +50,11 @@ namespace Example
// creates an XmlItem
apiInstance.CreateXmlItem(xmlItem);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -77,6 +80,11 @@ No authorization required
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **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)
@@ -89,7 +97,7 @@ Test serialization of outer boolean types
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -99,9 +107,10 @@ namespace Example
{
public class FakeOuterBooleanSerializeExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = true; // bool? | Input boolean as post body (optional)
try
@@ -109,9 +118,11 @@ namespace Example
bool result = apiInstance.FakeOuterBooleanSerialize(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -137,6 +148,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -149,7 +165,7 @@ Test serialization of object with outer number type
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -159,9 +175,10 @@ namespace Example
{
public class FakeOuterCompositeSerializeExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional)
try
@@ -169,9 +186,11 @@ namespace Example
OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -197,6 +216,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -209,7 +233,7 @@ Test serialization of outer number types
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -219,9 +243,10 @@ namespace Example
{
public class FakeOuterNumberSerializeExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = 8.14; // decimal? | Input number as post body (optional)
try
@@ -229,9 +254,11 @@ namespace Example
decimal result = apiInstance.FakeOuterNumberSerialize(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -257,6 +284,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -269,7 +301,7 @@ Test serialization of outer string types
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -279,9 +311,10 @@ namespace Example
{
public class FakeOuterStringSerializeExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = body_example; // string | Input string as post body (optional)
try
@@ -289,9 +322,11 @@ namespace Example
string result = apiInstance.FakeOuterStringSerialize(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -317,6 +352,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -329,7 +369,7 @@ For this test, the body for this request much reference a schema named `File`.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -339,18 +379,21 @@ namespace Example
{
public class TestBodyWithFileSchemaExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = new FileSchemaTestClass(); // FileSchemaTestClass |
try
{
apiInstance.TestBodyWithFileSchema(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -376,6 +419,11 @@ No authorization required
- **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)
@@ -386,7 +434,7 @@ No authorization required
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -396,9 +444,10 @@ namespace Example
{
public class TestBodyWithQueryParamsExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var query = query_example; // string |
var body = new User(); // User |
@@ -406,9 +455,11 @@ namespace Example
{
apiInstance.TestBodyWithQueryParams(query, body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -435,6 +486,11 @@ No authorization required
- **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)
@@ -447,7 +503,7 @@ To test \"client\" model
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -457,9 +513,10 @@ namespace Example
{
public class TestClientModelExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var body = new ModelClient(); // ModelClient | client model
try
@@ -468,9 +525,11 @@ namespace Example
ModelClient result = apiInstance.TestClientModel(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -496,6 +555,11 @@ No authorization required
- **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)
@@ -508,7 +572,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -518,13 +582,14 @@ namespace Example
{
public class TestEndpointParametersExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure HTTP basic authorization: http_basic_test
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
- var apiInstance = new FakeApi();
+ var apiInstance = new FakeApi(Configuration.Default);
var number = 8.14; // decimal | None
var _double = 1.2D; // double | None
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
@@ -545,9 +610,11 @@ namespace Example
// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -586,6 +653,12 @@ void (empty response body)
- **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)
@@ -598,7 +671,7 @@ To test enum parameters
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -608,9 +681,10 @@ namespace Example
{
public class TestEnumParametersExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional)
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional)
@@ -625,9 +699,11 @@ namespace Example
// To test enum parameters
apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -660,6 +736,12 @@ No authorization required
- **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)
@@ -672,7 +754,7 @@ Fake endpoint to test group parameters (optional)
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -682,9 +764,10 @@ namespace Example
{
public class TestGroupParametersExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var requiredStringGroup = 56; // int | Required String in group parameters
var requiredBooleanGroup = true; // bool | Required Boolean in group parameters
var requiredInt64Group = 789; // long | Required Integer in group parameters
@@ -697,9 +780,11 @@ namespace Example
// Fake endpoint to test group parameters (optional)
apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -730,6 +815,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Someting 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)
@@ -740,7 +830,7 @@ test inline additionalProperties
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -750,9 +840,10 @@ namespace Example
{
public class TestInlineAdditionalPropertiesExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var param = new Dictionary(); // Dictionary | request body
try
@@ -760,9 +851,11 @@ namespace Example
// test inline additionalProperties
apiInstance.TestInlineAdditionalProperties(param);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -788,6 +881,11 @@ No authorization required
- **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)
@@ -798,7 +896,7 @@ test json serialization of form data
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -808,9 +906,10 @@ namespace Example
{
public class TestJsonFormDataExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new FakeApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(Configuration.Default);
var param = param_example; // string | field1
var param2 = param2_example; // string | field2
@@ -819,9 +918,11 @@ namespace Example
// test json serialization of form data
apiInstance.TestJsonFormData(param, param2);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -848,5 +949,10 @@ No authorization required
- **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)
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md
index abea3cb997..3a241e3c63 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md
@@ -17,7 +17,7 @@ To test class name in snake case
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -27,14 +27,15 @@ namespace Example
{
public class TestClassnameExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key_query
Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer");
- var apiInstance = new FakeClassnameTags123Api();
+ var apiInstance = new FakeClassnameTags123Api(Configuration.Default);
var body = new ModelClient(); // ModelClient | client model
try
@@ -43,9 +44,11 @@ namespace Example
ModelClient result = apiInstance.TestClassname(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -71,5 +74,10 @@ Name | Type | Description | Notes
- **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-netcore/OpenAPIClientCore/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md
index a7b361f05a..f8d05ec939 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md
@@ -23,7 +23,7 @@ Add a new pet to the store
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -33,12 +33,13 @@ namespace Example
{
public class AddPetExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var body = new Pet(); // Pet | Pet object that needs to be added to the store
try
@@ -46,9 +47,11 @@ namespace Example
// Add a new pet to the store
apiInstance.AddPet(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -74,6 +77,12 @@ void (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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)
@@ -84,7 +93,7 @@ Deletes a pet
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -94,12 +103,13 @@ namespace Example
{
public class DeletePetExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // long | Pet id to delete
var apiKey = apiKey_example; // string | (optional)
@@ -108,9 +118,11 @@ namespace Example
// Deletes a pet
apiInstance.DeletePet(petId, apiKey);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -137,11 +149,17 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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 FindPetsByStatus (List status)
+> List<Pet> FindPetsByStatus (List status)
Finds Pets by status
@@ -149,7 +167,7 @@ Multiple status values can be provided with comma separated strings
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -159,23 +177,26 @@ namespace Example
{
public class FindPetsByStatusExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var status = status_example; // List | Status values that need to be considered for filter
try
{
// Finds Pets by status
- List<Pet> result = apiInstance.FindPetsByStatus(status);
+ List result = apiInstance.FindPetsByStatus(status);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -190,7 +211,7 @@ Name | Type | Description | Notes
### Return type
-[**List**](Pet.md)
+[**List<Pet>**](Pet.md)
### Authorization
@@ -201,11 +222,17 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status 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)
# **FindPetsByTags**
-> List FindPetsByTags (List tags)
+> List<Pet> FindPetsByTags (List tags)
Finds Pets by tags
@@ -213,7 +240,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -223,23 +250,26 @@ namespace Example
{
public class FindPetsByTagsExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var tags = new List(); // List | Tags to filter by
try
{
// Finds Pets by tags
- List<Pet> result = apiInstance.FindPetsByTags(tags);
+ List result = apiInstance.FindPetsByTags(tags);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -254,7 +284,7 @@ Name | Type | Description | Notes
### Return type
-[**List**](Pet.md)
+[**List<Pet>**](Pet.md)
### Authorization
@@ -265,6 +295,12 @@ Name | Type | Description | Notes
- **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)
@@ -277,7 +313,7 @@ Returns a single pet
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -287,14 +323,15 @@ namespace Example
{
public class GetPetByIdExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // long | ID of pet to return
try
@@ -303,9 +340,11 @@ namespace Example
Pet result = apiInstance.GetPetById(petId);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -331,6 +370,13 @@ Name | Type | Description | Notes
- **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)
@@ -341,7 +387,7 @@ Update an existing pet
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -351,12 +397,13 @@ namespace Example
{
public class UpdatePetExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var body = new Pet(); // Pet | Pet object that needs to be added to the store
try
@@ -364,9 +411,11 @@ namespace Example
// Update an existing pet
apiInstance.UpdatePet(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -392,6 +441,14 @@ void (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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)
@@ -402,7 +459,7 @@ Updates a pet in the store with form data
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -412,12 +469,13 @@ namespace Example
{
public class UpdatePetWithFormExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // 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)
@@ -427,9 +485,11 @@ namespace Example
// Updates a pet in the store with form data
apiInstance.UpdatePetWithForm(petId, name, status);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -457,6 +517,11 @@ void (empty response body)
- **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)
@@ -467,7 +532,7 @@ uploads an image
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -477,12 +542,13 @@ namespace Example
{
public class UploadFileExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // long | ID of pet to update
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional)
@@ -493,9 +559,11 @@ namespace Example
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -523,6 +591,11 @@ Name | Type | Description | Notes
- **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)
@@ -533,7 +606,7 @@ uploads an image (required)
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -543,12 +616,13 @@ namespace Example
{
public class UploadFileWithRequiredFileExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new PetApi();
+ var apiInstance = new PetApi(Configuration.Default);
var petId = 789; // long | ID of pet to update
var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
@@ -559,9 +633,11 @@ namespace Example
ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -589,5 +665,10 @@ Name | Type | Description | Notes
- **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)
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md
index 947a0304ce..c514385260 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md
@@ -20,7 +20,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -30,9 +30,10 @@ namespace Example
{
public class DeleteOrderExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new StoreApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(Configuration.Default);
var orderId = orderId_example; // string | ID of the order that needs to be deleted
try
@@ -40,9 +41,11 @@ namespace Example
// Delete purchase order by ID
apiInstance.DeleteOrder(orderId);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -68,11 +71,17 @@ No authorization required
- **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 GetInventory ()
+> Dictionary<string, int> GetInventory ()
Returns pet inventories by status
@@ -80,7 +89,7 @@ Returns a map of status codes to quantities
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -90,24 +99,27 @@ namespace Example
{
public class GetInventoryExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
// Configure API key authorization: api_key
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
- var apiInstance = new StoreApi();
+ var apiInstance = new StoreApi(Configuration.Default);
try
{
// Returns pet inventories by status
- Dictionary<string, int> result = apiInstance.GetInventory();
+ Dictionary result = apiInstance.GetInventory();
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -130,6 +142,11 @@ This endpoint does not need any parameter.
- **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)
@@ -142,7 +159,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -152,9 +169,10 @@ namespace Example
{
public class GetOrderByIdExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new StoreApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(Configuration.Default);
var orderId = 789; // long | ID of pet that needs to be fetched
try
@@ -163,9 +181,11 @@ namespace Example
Order result = apiInstance.GetOrderById(orderId);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -191,6 +211,13 @@ No authorization required
- **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)
@@ -201,7 +228,7 @@ Place an order for a pet
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -211,9 +238,10 @@ namespace Example
{
public class PlaceOrderExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new StoreApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(Configuration.Default);
var body = new Order(); // Order | order placed for purchasing the pet
try
@@ -222,9 +250,11 @@ namespace Example
Order result = apiInstance.PlaceOrder(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -250,5 +280,11 @@ No authorization required
- **Content-Type**: Not defined
- **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-netcore/OpenAPIClientCore/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md
index 9a535e16a8..4588b44013 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md
@@ -24,7 +24,7 @@ This can only be done by the logged in user.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -34,9 +34,10 @@ namespace Example
{
public class CreateUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var body = new User(); // User | Created user object
try
@@ -44,9 +45,11 @@ namespace Example
// Create user
apiInstance.CreateUser(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -72,6 +75,11 @@ No authorization required
- **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)
@@ -82,7 +90,7 @@ Creates list of users with given input array
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -92,9 +100,10 @@ namespace Example
{
public class CreateUsersWithArrayInputExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var body = new List(); // List | List of user object
try
@@ -102,9 +111,11 @@ namespace Example
// Creates list of users with given input array
apiInstance.CreateUsersWithArrayInput(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -115,7 +126,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -130,6 +141,11 @@ No authorization required
- **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)
@@ -140,7 +156,7 @@ Creates list of users with given input array
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -150,9 +166,10 @@ namespace Example
{
public class CreateUsersWithListInputExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var body = new List(); // List | List of user object
try
@@ -160,9 +177,11 @@ namespace Example
// Creates list of users with given input array
apiInstance.CreateUsersWithListInput(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -173,7 +192,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -188,6 +207,11 @@ No authorization required
- **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)
@@ -200,7 +224,7 @@ This can only be done by the logged in user.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -210,9 +234,10 @@ namespace Example
{
public class DeleteUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var username = username_example; // string | The name that needs to be deleted
try
@@ -220,9 +245,11 @@ namespace Example
// Delete user
apiInstance.DeleteUser(username);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -248,6 +275,12 @@ No authorization required
- **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)
@@ -258,7 +291,7 @@ Get user by user name
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -268,9 +301,10 @@ namespace Example
{
public class GetUserByNameExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var username = username_example; // string | The name that needs to be fetched. Use user1 for testing.
try
@@ -279,9 +313,11 @@ namespace Example
User result = apiInstance.GetUserByName(username);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -307,6 +343,13 @@ No authorization required
- **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 | - |
+
[[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)
@@ -317,7 +360,7 @@ Logs user into the system
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -327,9 +370,10 @@ namespace Example
{
public class LoginUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var username = username_example; // string | The user name for login
var password = password_example; // string | The password for login in clear text
@@ -339,9 +383,11 @@ namespace Example
string result = apiInstance.LoginUser(username, password);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -368,6 +414,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * 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)
@@ -378,7 +430,7 @@ Logs out current logged in user session
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -388,18 +440,21 @@ namespace Example
{
public class LogoutUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
try
{
// Logs out current logged in user session
apiInstance.LogoutUser();
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -422,6 +477,11 @@ No authorization required
- **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)
@@ -434,7 +494,7 @@ This can only be done by the logged in user.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -444,9 +504,10 @@ namespace Example
{
public class UpdateUserExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new UserApi();
+ Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(Configuration.Default);
var username = username_example; // string | name that need to be deleted
var body = new User(); // User | Updated user object
@@ -455,9 +516,11 @@ namespace Example
// Updated user
apiInstance.UpdateUser(username, body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -484,5 +547,11 @@ No authorization required
- **Content-Type**: Not defined
- **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/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md
index 7a849134a1..dcdb39631c 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/README.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/README.md
@@ -64,6 +64,7 @@ Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-p
## Getting Started
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
diff --git a/samples/client/petstore/csharp/OpenAPIClient/build.bat b/samples/client/petstore/csharp/OpenAPIClient/build.bat
index 88942a71d0..75153d5f89 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/build.bat
+++ b/samples/client/petstore/csharp/OpenAPIClient/build.bat
@@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient
if not exist ".\bin" mkdir bin
-copy packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
-copy packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll
+copy packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
+copy packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll
copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml
diff --git a/samples/client/petstore/csharp/OpenAPIClient/build.sh b/samples/client/petstore/csharp/OpenAPIClient/build.sh
index 269c087258..7edc32f688 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/build.sh
+++ b/samples/client/petstore/csharp/OpenAPIClient/build.sh
@@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages;
echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
-cp packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
+cp packages/Newtonsoft.Json.12.0.1/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
-cp packages/JsonSubTypes.1.2.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll
+cp packages/JsonSubTypes.1.5.2/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll
echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll"
mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
index 14ac2c12f2..5af41a1862 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
@@ -19,6 +19,7 @@ To test special tags and operation ID starting with number
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -71,6 +72,11 @@ No authorization required
- **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)
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
index 2f97f3017d..8a53b02b5e 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
@@ -31,6 +31,7 @@ this route creates an XmlItem
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -82,6 +83,11 @@ No authorization required
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **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)
@@ -99,6 +105,7 @@ Test serialization of outer boolean types
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -150,6 +157,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -167,6 +179,7 @@ Test serialization of object with outer number type
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -218,6 +231,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -235,6 +253,7 @@ Test serialization of outer number types
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -286,6 +305,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -303,6 +327,7 @@ Test serialization of outer string types
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -354,6 +379,11 @@ No authorization required
- **Content-Type**: Not defined
- **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)
@@ -371,6 +401,7 @@ For this test, the body for this request much reference a schema named `File`.
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -421,6 +452,11 @@ No authorization required
- **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)
@@ -436,6 +472,7 @@ No authorization required
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -488,6 +525,11 @@ No authorization required
- **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)
@@ -505,6 +547,7 @@ To test \"client\" model
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -557,6 +600,11 @@ No authorization required
- **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)
@@ -574,6 +622,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -655,6 +704,12 @@ void (empty response body)
- **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)
@@ -672,6 +727,7 @@ To test enum parameters
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -737,6 +793,12 @@ No authorization required
- **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)
@@ -754,6 +816,7 @@ Fake endpoint to test group parameters (optional)
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -815,6 +878,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Someting wrong | - |
+
[[Back to top]](#)
[[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
@@ -830,6 +898,7 @@ test inline additionalProperties
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -881,6 +950,11 @@ No authorization required
- **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)
@@ -896,6 +970,7 @@ test json serialization of form data
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -949,6 +1024,11 @@ No authorization required
- **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)
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md
index acc5f0799f..deb97a2769 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md
@@ -19,6 +19,7 @@ To test class name in snake case
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -76,6 +77,11 @@ Name | Type | Description | Notes
- **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)
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
index 3b09a06942..c45dd7854a 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
@@ -25,6 +25,7 @@ Add a new pet to the store
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -79,6 +80,12 @@ void (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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)
@@ -94,6 +101,7 @@ Deletes a pet
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -150,6 +158,12 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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)
@@ -158,7 +172,7 @@ void (empty response body)
## FindPetsByStatus
-> List FindPetsByStatus (List status)
+> List<Pet> FindPetsByStatus (List status)
Finds Pets by status
@@ -167,6 +181,7 @@ Multiple status values can be provided with comma separated strings
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -188,7 +203,7 @@ namespace Example
try
{
// Finds Pets by status
- List<Pet> result = apiInstance.FindPetsByStatus(status);
+ List result = apiInstance.FindPetsByStatus(status);
Debug.WriteLine(result);
}
catch (ApiException e)
@@ -211,7 +226,7 @@ Name | Type | Description | Notes
### Return type
-[**List**](Pet.md)
+[**List<Pet>**](Pet.md)
### Authorization
@@ -222,6 +237,12 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+
[[Back to top]](#)
[[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
@@ -230,7 +251,7 @@ Name | Type | Description | Notes
## FindPetsByTags
-> List FindPetsByTags (List tags)
+> List<Pet> FindPetsByTags (List tags)
Finds Pets by tags
@@ -239,6 +260,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -260,7 +282,7 @@ namespace Example
try
{
// Finds Pets by tags
- List<Pet> result = apiInstance.FindPetsByTags(tags);
+ List result = apiInstance.FindPetsByTags(tags);
Debug.WriteLine(result);
}
catch (ApiException e)
@@ -283,7 +305,7 @@ Name | Type | Description | Notes
### Return type
-[**List**](Pet.md)
+[**List<Pet>**](Pet.md)
### Authorization
@@ -294,6 +316,12 @@ Name | Type | Description | Notes
- **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)
@@ -311,6 +339,7 @@ Returns a single pet
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -368,6 +397,13 @@ Name | Type | Description | Notes
- **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)
@@ -383,6 +419,7 @@ Update an existing pet
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -437,6 +474,14 @@ void (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **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)
@@ -452,6 +497,7 @@ Updates a pet in the store with form data
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -510,6 +556,11 @@ void (empty response body)
- **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)
@@ -525,6 +576,7 @@ uploads an image
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -584,6 +636,11 @@ Name | Type | Description | Notes
- **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)
@@ -599,6 +656,7 @@ uploads an image (required)
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -658,6 +716,11 @@ Name | Type | Description | Notes
- **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)
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md
index 379c4ef394..b4dc72258a 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md
@@ -22,6 +22,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -73,6 +74,12 @@ No authorization required
- **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)
@@ -81,7 +88,7 @@ No authorization required
## GetInventory
-> Dictionary GetInventory ()
+> Dictionary<string, int?> GetInventory ()
Returns pet inventories by status
@@ -90,6 +97,7 @@ Returns a map of status codes to quantities
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -112,7 +120,7 @@ namespace Example
try
{
// Returns pet inventories by status
- Dictionary<string, int?> result = apiInstance.GetInventory();
+ Dictionary result = apiInstance.GetInventory();
Debug.WriteLine(result);
}
catch (ApiException e)
@@ -143,6 +151,11 @@ This endpoint does not need any parameter.
- **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)
@@ -160,6 +173,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -212,6 +226,13 @@ No authorization required
- **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)
@@ -227,6 +248,7 @@ Place an order for a pet
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -279,6 +301,12 @@ No authorization required
- **Content-Type**: Not defined
- **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)
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md
index 8d41e64c6b..1385d84041 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md
@@ -26,6 +26,7 @@ This can only be done by the logged in user.
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -77,6 +78,11 @@ No authorization required
- **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)
@@ -92,6 +98,7 @@ Creates list of users with given input array
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -128,7 +135,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -143,6 +150,11 @@ No authorization required
- **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)
@@ -158,6 +170,7 @@ Creates list of users with given input array
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -194,7 +207,7 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -209,6 +222,11 @@ No authorization required
- **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)
@@ -226,6 +244,7 @@ This can only be done by the logged in user.
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -277,6 +296,12 @@ No authorization required
- **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)
@@ -292,6 +317,7 @@ Get user by user name
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -344,6 +370,13 @@ No authorization required
- **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 | - |
+
[[Back to top]](#)
[[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
@@ -359,6 +392,7 @@ Logs user into the system
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -413,6 +447,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * 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)
@@ -428,6 +468,7 @@ Logs out current logged in user session
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -475,6 +516,11 @@ No authorization required
- **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)
@@ -492,6 +538,7 @@ This can only be done by the logged in user.
### Example
```csharp
+using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
@@ -545,6 +592,12 @@ No authorization required
- **Content-Type**: Not defined
- **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)
diff --git a/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh
index 039eba8ed4..ef4209de27 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh
+++ b/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh
@@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mozroots --import --sync
mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages
-echo "[INFO] Install NUnit runners via NuGet"
-mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages
+echo "[INFO] Install NUnit Console 3.x runners via NuGet"
+mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages
echo "[INFO] Build the solution and run the unit test"
xbuild Org.OpenAPITools.sln && \
- mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll
+ mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs
index 3564cba1bb..f52b503cea 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the API endpoint.
///
- [TestFixture]
public class AnotherFakeApiTests
{
private AnotherFakeApi instance;
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs
index c7274563e0..8245961e05 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the API endpoint.
///
- [TestFixture]
public class FakeApiTests
{
private FakeApi instance;
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs
index 941cf04828..01c0d864db 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the API endpoint.
///
- [TestFixture]
public class FakeClassnameTags123ApiTests
{
private FakeClassnameTags123Api instance;
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs
index 6bc3db2a81..5a2aa03f4b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -20,7 +20,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by Swagger Codegen.
/// Please update the test case below to test the API endpoint.
///
- [TestFixture]
public class PetApiTests
{
private PetApi instance;
@@ -97,7 +96,7 @@ namespace Org.OpenAPITools.Test
[Test]
public void InstanceTest()
{
- Assert.IsInstanceOf(instance);
+ Assert.IsInstanceOf(typeof(PetApi), instance);
}
@@ -133,7 +132,7 @@ namespace Org.OpenAPITools.Test
List listPet = petApi.FindPetsByTags(tagsList);
foreach (Pet pet in listPet) // Loop through List with foreach.
{
- Assert.IsInstanceOf(pet);
+ Assert.IsInstanceOf(typeof(Pet), pet);
Assert.AreEqual("csharp sample tag name1", pet.Tags[0]);
}
}
@@ -146,7 +145,7 @@ namespace Org.OpenAPITools.Test
{
List tags = new List(new String[] { "pet" });
var response = instance.FindPetsByTags(tags);
- Assert.IsInstanceOf>(response);
+ Assert.IsInstanceOf(typeof(List), response);
}
///
@@ -162,19 +161,19 @@ namespace Org.OpenAPITools.Test
PetApi petApi = new PetApi(c1);
Pet response = petApi.GetPetById(petId);
- Assert.IsInstanceOf(response);
+ Assert.IsInstanceOf(typeof(Pet), response);
Assert.AreEqual("Csharp test", response.Name);
Assert.AreEqual(Pet.StatusEnum.Available, response.Status);
- Assert.IsInstanceOf>(response.Tags);
+ Assert.IsInstanceOf(typeof(List), response.Tags);
Assert.AreEqual(petId, response.Tags[0].Id);
Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name);
- Assert.IsInstanceOf>(response.PhotoUrls);
+ Assert.IsInstanceOf(typeof(List), response.PhotoUrls);
Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]);
- Assert.IsInstanceOf(response.Category);
+ Assert.IsInstanceOf(typeof(Category), response.Category);
Assert.AreEqual(56, response.Category.Id);
Assert.AreEqual("sample category name2", response.Category.Name);
}
@@ -188,19 +187,19 @@ namespace Org.OpenAPITools.Test
PetApi petApi = new PetApi();
var task = petApi.GetPetByIdAsync(petId);
Pet response = task.Result;
- Assert.IsInstanceOf(response);
+ Assert.IsInstanceOf(typeof(Pet), response);
Assert.AreEqual("Csharp test", response.Name);
Assert.AreEqual(Pet.StatusEnum.Available, response.Status);
- Assert.IsInstanceOf>(response.Tags);
+ Assert.IsInstanceOf(typeof(List), response.Tags);
Assert.AreEqual(petId, response.Tags[0].Id);
Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name);
- Assert.IsInstanceOf>(response.PhotoUrls);
+ Assert.IsInstanceOf(typeof(List), response.PhotoUrls);
Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]);
- Assert.IsInstanceOf(response.Category);
+ Assert.IsInstanceOf(typeof(Category), response.Category);
Assert.AreEqual(56, response.Category.Id);
Assert.AreEqual("sample category name2", response.Category.Name);
}
@@ -219,19 +218,19 @@ namespace Org.OpenAPITools.Test
Assert.AreEqual(task.Result.Headers["Content-Type"], "application/json");
Pet response = task.Result.Data;
- Assert.IsInstanceOf(response);
+ Assert.IsInstanceOf(typeof(Pet), response);
Assert.AreEqual("Csharp test", response.Name);
Assert.AreEqual(Pet.StatusEnum.Available, response.Status);
- Assert.IsInstanceOf>(response.Tags);
+ Assert.IsInstanceOf(typeof(List), response.Tags);
Assert.AreEqual(petId, response.Tags[0].Id);
Assert.AreEqual("csharp sample tag name1", response.Tags[0].Name);
- Assert.IsInstanceOf>(response.PhotoUrls);
+ Assert.IsInstanceOf(typeof(List), response.PhotoUrls);
Assert.AreEqual("sample photoUrls", response.PhotoUrls[0]);
- Assert.IsInstanceOf(response.Category);
+ Assert.IsInstanceOf(typeof(Category), response.Category);
Assert.AreEqual(56, response.Category.Id);
Assert.AreEqual("sample category name2", response.Category.Name);
}
@@ -257,9 +256,9 @@ namespace Org.OpenAPITools.Test
petApi.UpdatePetWithForm(petId, "new form name", "pending");
Pet response = petApi.GetPetById(petId);
- Assert.IsInstanceOf(response);
- Assert.IsInstanceOf(response.Category);
- Assert.IsInstanceOf>(response.Tags);
+ Assert.IsInstanceOf(typeof(Pet), response);
+ Assert.IsInstanceOf(typeof(Category), response.Category);
+ Assert.IsInstanceOf(typeof(List), response.Tags);
Assert.AreEqual("new form name", response.Name);
Assert.AreEqual(Pet.StatusEnum.Pending, response.Status);
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs
index 89768ca854..41d065c8be 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the API endpoint.
///
- [TestFixture]
public class StoreApiTests
{
private StoreApi instance;
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs
index ce7ccbc5e9..befdfe04de 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the API endpoint.
///
- [TestFixture]
public class UserApiTests
{
private UserApi instance;
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs
index 633330e3bc..d9637bd92e 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Client/ApiClientTests.cs
@@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Test
}
// The test below only passes when running at -04:00 timezone
- [Ignore()]
+ [Ignore("The test below only passes when running at -04:00 timezone")]
public void TestParameterToStringWithTimeZoneForDateTime()
{
ApiClient api = new ApiClient();
@@ -136,4 +136,4 @@ namespace Org.OpenAPITools.Test
}
}
-}
\ No newline at end of file
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs
index 38461dbaf9..799a923c57 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AdditionalPropertiesAnyTypeTests
{
// TODO uncomment below to declare an instance variable for AdditionalPropertiesAnyType
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs
index 88957b1672..7543ec159c 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AdditionalPropertiesArrayTests
{
// TODO uncomment below to declare an instance variable for AdditionalPropertiesArray
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs
index 3170d95ee4..3180b1237a 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AdditionalPropertiesBooleanTests
{
// TODO uncomment below to declare an instance variable for AdditionalPropertiesBoolean
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs
index 9d6a6426c9..9ed6376a5b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AdditionalPropertiesClassTests
{
// TODO uncomment below to declare an instance variable for AdditionalPropertiesClass
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs
index 6ee9213016..7bdcee4b63 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AdditionalPropertiesIntegerTests
{
// TODO uncomment below to declare an instance variable for AdditionalPropertiesInteger
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs
index 25c4e87498..61d2c0389f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AdditionalPropertiesNumberTests
{
// TODO uncomment below to declare an instance variable for AdditionalPropertiesNumber
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs
index ce6e19f5fc..502718f42c 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AdditionalPropertiesObjectTests
{
// TODO uncomment below to declare an instance variable for AdditionalPropertiesObject
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs
index 6c6cbad5e4..2e5414c373 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AdditionalPropertiesStringTests
{
// TODO uncomment below to declare an instance variable for AdditionalPropertiesString
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs
index 2849d780c8..108e4e1557 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class AnimalTests
{
// TODO uncomment below to declare an instance variable for Animal
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs
index 70c0757514..2640f864df 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ApiResponseTests
{
// TODO uncomment below to declare an instance variable for ApiResponse
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs
index 5eb86a3857..ba3ff03b3c 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ArrayOfArrayOfNumberOnlyTests
{
// TODO uncomment below to declare an instance variable for ArrayOfArrayOfNumberOnly
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs
index cd7074afaa..55f896463a 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ArrayOfNumberOnlyTests
{
// TODO uncomment below to declare an instance variable for ArrayOfNumberOnly
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs
index f1f286ce44..80fd020890 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ArrayTestTests
{
// TODO uncomment below to declare an instance variable for ArrayTest
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs
index cb003b2abe..6e2b957083 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class CapitalizationTests
{
// TODO uncomment below to declare an instance variable for Capitalization
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs
index 6cd18d546e..02b9f47b82 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class CatTests
{
// TODO uncomment below to declare an instance variable for Cat
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs
index f964723517..6b5ddc1906 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class CategoryTests
{
// TODO uncomment below to declare an instance variable for Category
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs
index 0a6de083da..f64883e9ff 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ClassModelTests
{
// TODO uncomment below to declare an instance variable for ClassModel
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs
index fbae571470..083be397f7 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class DogTests
{
// TODO uncomment below to declare an instance variable for Dog
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs
index 1760e0d4ef..8ae6a179e7 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class EnumArraysTests
{
// TODO uncomment below to declare an instance variable for EnumArrays
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs
index f1c67fe191..10ae874e84 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class EnumClassTests
{
// TODO uncomment below to declare an instance variable for EnumClass
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs
index 6ba0c31db4..bd96d5636d 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class EnumTestTests
{
// TODO uncomment below to declare an instance variable for EnumTest
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs
index bb47c43dc7..e1ad9a0c24 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class FileSchemaTestClassTests
{
// TODO uncomment below to declare an instance variable for FileSchemaTestClass
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs
index f1cf54c22e..acaf56152c 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class FileTests
{
// TODO uncomment below to declare an instance variable for File
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
index cca85ec5b2..2c7ce557ca 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class FormatTestTests
{
// TODO uncomment below to declare an instance variable for FormatTest
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs
index 1fef4b1371..4669408d88 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class HasOnlyReadOnlyTests
{
// TODO uncomment below to declare an instance variable for HasOnlyReadOnly
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs
index 983fd757c3..8fd5456835 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ListTests
{
// TODO uncomment below to declare an instance variable for List
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs
index 9bb76bde23..508dc3c138 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class MapTestTests
{
// TODO uncomment below to declare an instance variable for MapTest
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs
index 72e5a9130b..9d96359999 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class MixedPropertiesAndAdditionalPropertiesClassTests
{
// TODO uncomment below to declare an instance variable for MixedPropertiesAndAdditionalPropertiesClass
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs
index f85a9a6a58..701423909c 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class Model200ResponseTests
{
// TODO uncomment below to declare an instance variable for Model200Response
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs
index db4530153a..4da1fdf73e 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ModelClientTests
{
// TODO uncomment below to declare an instance variable for ModelClient
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs
index 5575f11af5..d7f80082ae 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class NameTests
{
// TODO uncomment below to declare an instance variable for Name
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs
index d9b5c4ea49..48428b86b3 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class NumberOnlyTests
{
// TODO uncomment below to declare an instance variable for NumberOnly
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs
index 36853bd0d1..add9d154fb 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class OrderTests
{
// TODO uncomment below to declare an instance variable for Order
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs
index 7069f4e955..bcfdd4516c 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class OuterCompositeTests
{
// TODO uncomment below to declare an instance variable for OuterComposite
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs
index f482ff479e..bd71a2ed18 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class OuterEnumTests
{
// TODO uncomment below to declare an instance variable for OuterEnum
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs
index 3261b8b18e..7507d9f74e 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class PetTests
{
private Pet instance;
@@ -61,7 +60,7 @@ namespace Org.OpenAPITools.Test
[Test]
public void PetInstanceTest()
{
- Assert.IsInstanceOfType(typeof(Pet), instance);
+ Assert.IsInstanceOf(typeof(Pet), instance);
}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs
index cf1a8f54bb..c2823e5ca4 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ReadOnlyFirstTests
{
// TODO uncomment below to declare an instance variable for ReadOnlyFirst
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs
index 1ac79a9f91..176d55e5fe 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class ReturnTests
{
// TODO uncomment below to declare an instance variable for Return
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs
index 0a4dcb6a7b..0902a6d961 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class SpecialModelNameTests
{
// TODO uncomment below to declare an instance variable for SpecialModelName
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs
index 52ee4ca988..b4927515fe 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class TagTests
{
// TODO uncomment below to declare an instance variable for Tag
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs
index f4c78879bf..476af27f1f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class TypeHolderDefaultTests
{
// TODO uncomment below to declare an instance variable for TypeHolderDefault
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs
index a4760f2c4c..cf220d7d6f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class TypeHolderExampleTests
{
// TODO uncomment below to declare an instance variable for TypeHolderExample
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs
index 8e073d2aa0..506ddc1ddc 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class UserTests
{
// TODO uncomment below to declare an instance variable for User
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs
index b936ec597e..d1646dc97d 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs
@@ -30,7 +30,6 @@ namespace Org.OpenAPITools.Test
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
public class XmlItemTests
{
// TODO uncomment below to declare an instance variable for XmlItem
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index e510bba3f5..c7a19d07a9 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -47,16 +47,16 @@ OpenAPI spec version: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll
@@ -65,10 +65,10 @@ OpenAPI spec version: 1.0.0
..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll
- $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll
+ $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config
index ac390c1dcb..e70b078702 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config
@@ -1,7 +1,7 @@
-
+
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index bd27e1ca75..9356e9991f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -50,16 +50,16 @@ The version of the OpenAPI document: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
index c49c57e440..c275a14d2a 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config
index 3caf34e0d7..a970e5e3a9 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config
@@ -1,6 +1,6 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat b/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat
index 563159f27b..3910f59e98 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat
+++ b/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat
@@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient
if not exist ".\bin" mkdir bin
-copy packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
-copy packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll bin\JsonSubTypes.dll
+copy packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
+copy packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll bin\JsonSubTypes.dll
copy packages\RestSharp.105.1.0\lib\net35\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh
index 57640ebc2d..d0a31cd3c5 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh
+++ b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh
@@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages;
echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
-cp packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
+cp packages/Newtonsoft.Json.12.0.1/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/net35/RestSharp.dll bin/RestSharp.dll;
-cp packages/JsonSubTypes.1.2.0/lib/net35/JsonSubTypes.dll bin/JsonSubTypes.dll
+cp packages/JsonSubTypes.1.5.2/lib/net35/JsonSubTypes.dll bin/JsonSubTypes.dll
echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll"
mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh
index 039eba8ed4..ef4209de27 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh
+++ b/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh
@@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mozroots --import --sync
mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages
-echo "[INFO] Install NUnit runners via NuGet"
-mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages
+echo "[INFO] Install NUnit Console 3.x runners via NuGet"
+mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages
echo "[INFO] Build the solution and run the unit test"
xbuild Org.OpenAPITools.sln && \
- mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll
+ mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index 9e22db187c..155563e557 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll
@@ -65,10 +65,10 @@ The version of the OpenAPI document: 1.0.0
..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll
- $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll
+ $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config
index 403ae20019..9e1acaaaa3 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config
+++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config
@@ -1,7 +1,7 @@
-
+
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index dcba006076..89be9eb56e 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -50,16 +50,16 @@ The version of the OpenAPI document: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net35\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net35\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
index c49c57e440..c275a14d2a 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
+++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config
index 149e1472a7..bd2e3e6607 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config
+++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config
@@ -1,6 +1,6 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat b/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat
index 2626413405..0bf67cfa4a 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat
+++ b/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat
@@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient
if not exist ".\bin" mkdir bin
-copy packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
-copy packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll bin\JsonSubTypes.dll
+copy packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
+copy packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll bin\JsonSubTypes.dll
copy packages\RestSharp.105.1.0\lib\net4\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh
index 31f579a7f2..791a3a16b6 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh
+++ b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh
@@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages;
echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
-cp packages/Newtonsoft.Json.10.0.3/lib/net40/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
+cp packages/Newtonsoft.Json.12.0.1/lib/net40/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/net4/RestSharp.dll bin/RestSharp.dll;
-cp packages/JsonSubTypes.1.2.0/lib/net40/JsonSubTypes.dll bin/JsonSubTypes.dll
+cp packages/JsonSubTypes.1.5.2/lib/net40/JsonSubTypes.dll bin/JsonSubTypes.dll
echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll"
mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh
index 039eba8ed4..ef4209de27 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh
+++ b/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh
@@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mozroots --import --sync
mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages
-echo "[INFO] Install NUnit runners via NuGet"
-mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages
+echo "[INFO] Install NUnit Console 3.x runners via NuGet"
+mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages
echo "[INFO] Build the solution and run the unit test"
xbuild Org.OpenAPITools.sln && \
- mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll
+ mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index f977b43d8a..e40d730a80 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll
@@ -65,10 +65,10 @@ The version of the OpenAPI document: 1.0.0
..\..\vendor\RestSharp.105.1.0\lib\net4\RestSharp.dll
- $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll
+ $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config
index 0768a494dc..86d33422d4 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config
+++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config
@@ -1,7 +1,7 @@
-
+
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 0087e256c5..f034307d97 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -50,16 +50,16 @@ The version of the OpenAPI document: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net40\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net40\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
index c49c57e440..c275a14d2a 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
+++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config
index 9c99469f25..5561d895e9 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config
+++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config
@@ -1,6 +1,6 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json
index d5d3017c21..b06adc0ade 100644
--- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json
+++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json
@@ -3,10 +3,10 @@
"dependencies": {
"FubarCoder.RestSharp.Portable.Core": "4.0.7",
"FubarCoder.RestSharp.Portable.HttpClient": "4.0.7",
- "Newtonsoft.Json": "10.0.3",
- "JsonSubTypes": "1.2.0"
+ "Newtonsoft.Json": "12.0.1",
+ "JsonSubTypes": "1.5.2"
},
"frameworks": {
"netstandard1.3": {}
}
-}
\ No newline at end of file
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat
index 4a96110196..6cfcc5b213 100644
--- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat
+++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat
@@ -10,8 +10,8 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient
if not exist ".\bin" mkdir bin
-copy packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
-copy packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll
+copy packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
+copy packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll
copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
copy packages\Fody.1.29.4\Fody.dll bin\Fody.dll
copy packages\PropertyChanged.Fody.1.51.3\PropertyChanged.Fody.dll bin\PropertyChanged.Fody.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh
index 9297d1388d..7a5668e35c 100644
--- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh
+++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh
@@ -44,9 +44,9 @@ ${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages;
echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
-cp packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
+cp packages/Newtonsoft.Json.12.0.1/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
-cp packages/JsonSubTypes.1.2.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll
+cp packages/JsonSubTypes.1.5.2/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll
cp packages/Fody.1.29.4/Fody.dll bin/Fody.dll
cp packages/PropertyChanged.Fody.1.51.3/PropertyChanged.Fody.dll bin/PropertyChanged.Fody.dll
cp packages/PropertyChanged.Fody.1.51.3/Lib/dotnet/PropertyChanged.dll bin/PropertyChanged.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh
index 039eba8ed4..ef4209de27 100644
--- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh
+++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh
@@ -14,9 +14,9 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mozroots --import --sync
mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages
-echo "[INFO] Install NUnit runners via NuGet"
-mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages
+echo "[INFO] Install NUnit Console 3.x runners via NuGet"
+mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages
echo "[INFO] Build the solution and run the unit test"
xbuild Org.OpenAPITools.sln && \
- mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll
+ mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index 13b29c8ed5..e923e5727b 100644
--- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -47,16 +47,16 @@ The version of the OpenAPI document: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll
@@ -65,10 +65,10 @@ The version of the OpenAPI document: 1.0.0
..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll
- $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll
+ $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config
index ac390c1dcb..e70b078702 100644
--- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config
+++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config
@@ -1,7 +1,7 @@
-
+
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 21d6a6d9c1..4a270f3b90 100644
--- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -50,16 +50,16 @@ The version of the OpenAPI document: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll
diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
index 0be2d6a6ee..0b27914623 100644
--- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
+++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config
index b45bbc1cf3..f7e188fb0d 100644
--- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config
+++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config
@@ -1,8 +1,8 @@
-
-
+
+
diff --git a/samples/client/petstore/go/auth_test.go b/samples/client/petstore/go/auth_test.go
index ab152c98d1..5f817703a8 100644
--- a/samples/client/petstore/go/auth_test.go
+++ b/samples/client/petstore/go/auth_test.go
@@ -43,8 +43,7 @@ func TestOAuth2(t *testing.T) {
r, err := client.PetApi.AddPet(context.Background(), newPet)
if err != nil {
- t.Errorf("Error while adding pet")
- t.Log(err)
+ t.Fatalf("Error while adding pet: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -53,8 +52,7 @@ func TestOAuth2(t *testing.T) {
r, err = client.PetApi.DeletePet(auth, 12992, nil)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -79,8 +77,7 @@ func TestBasicAuth(t *testing.T) {
r, err := client.PetApi.AddPet(auth, newPet)
if err != nil {
- t.Errorf("Error while adding pet")
- t.Log(err)
+ t.Fatalf("Error while adding pet: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -89,8 +86,7 @@ func TestBasicAuth(t *testing.T) {
r, err = client.PetApi.DeletePet(auth, 12992, nil)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -110,8 +106,7 @@ func TestAccessToken(t *testing.T) {
r, err := client.PetApi.AddPet(nil, newPet)
if err != nil {
- t.Errorf("Error while adding pet")
- t.Log(err)
+ t.Fatalf("Error while adding pet: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -120,8 +115,7 @@ func TestAccessToken(t *testing.T) {
r, err = client.PetApi.DeletePet(auth, 12992, nil)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -141,8 +135,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
r, err := client.PetApi.AddPet(context.Background(), newPet)
if err != nil {
- t.Errorf("Error while adding pet")
- t.Log(err)
+ t.Fatalf("Error while adding pet: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -150,8 +143,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
_, r, err = client.PetApi.GetPetById(auth, 12992)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
reqb, _ := httputil.DumpRequest(r.Request, true)
@@ -161,8 +153,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
r, err = client.PetApi.DeletePet(auth, 12992, nil)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -178,8 +169,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
r, err := client.PetApi.AddPet(nil, newPet)
if err != nil {
- t.Errorf("Error while adding pet")
- t.Log(err)
+ t.Fatalf("Error while adding pet: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -187,8 +177,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
_, r, err = client.PetApi.GetPetById(auth, 12992)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
reqb, _ := httputil.DumpRequest(r.Request, true)
@@ -198,8 +187,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
r, err = client.PetApi.DeletePet(auth, 12992, nil)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -214,8 +202,7 @@ func TestDefaultHeader(t *testing.T) {
r, err := client.PetApi.AddPet(context.Background(), newPet)
if err != nil {
- t.Errorf("Error while adding pet")
- t.Log(err)
+ t.Fatalf("Error while adding pet: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -224,8 +211,7 @@ func TestDefaultHeader(t *testing.T) {
r, err = client.PetApi.DeletePet(context.Background(), 12992, nil)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -240,15 +226,26 @@ func TestHostOverride(t *testing.T) {
_, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil)
if err != nil {
- t.Errorf("Error while finding pets by status")
- t.Log(err)
+ t.Fatalf("Error while finding pets by status: %v", err)
}
- if r.Request.Host != testHost {
+ if r.Request.URL.Host != testHost {
t.Errorf("Request Host is %v, expected %v", r.Request.Host, testHost)
}
}
+func TestSchemeOverride(t *testing.T) {
+ _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil)
+
+ if err != nil {
+ t.Fatalf("Error while finding pets by status: %v", err)
+ }
+
+ if r.Request.URL.Scheme != testScheme {
+ t.Errorf("Request Scheme is %v, expected %v", r.Request.URL.Scheme, testScheme)
+ }
+}
+
// Add custom clients to the context.
func createContext(httpClient *http.Client) context.Context {
parent := oauth2.NoContext
diff --git a/samples/client/petstore/go/fake_api_test.go b/samples/client/petstore/go/fake_api_test.go
index 94b7fee3ed..f4242b5048 100644
--- a/samples/client/petstore/go/fake_api_test.go
+++ b/samples/client/petstore/go/fake_api_test.go
@@ -20,8 +20,7 @@ func TestPutBodyWithFileSchema(t *testing.T) {
r, err := client.FakeApi.TestBodyWithFileSchema(context.Background(), schema)
if err != nil {
- t.Errorf("Error while adding pet")
- t.Log(err)
+ t.Fatalf("Error while adding pet: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
diff --git a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION
index afa6365606..83a328a922 100644
--- a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION
+++ b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.0-SNAPSHOT
\ No newline at end of file
+4.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/go/go-petstore-withXml/README.md b/samples/client/petstore/go/go-petstore-withXml/README.md
index b063933c1d..a0aa0040ef 100644
--- a/samples/client/petstore/go/go-petstore-withXml/README.md
+++ b/samples/client/petstore/go/go-petstore-withXml/README.md
@@ -12,7 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Installation
Install the following dependencies:
-```
+
+```shell
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
@@ -20,6 +21,7 @@ go get github.com/antihax/optional
```
Put the package under your project folder and add the following in import:
+
```golang
import "./petstore"
```
@@ -70,7 +72,14 @@ Class | Method | HTTP request | Description
## Documentation For Models
+ - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
+ - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
+ - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
+ - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
+ - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
+ - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
+ - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
- [Animal](docs/Animal.md)
- [ApiResponse](docs/ApiResponse.md)
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
@@ -78,10 +87,12 @@ Class | Method | HTTP request | Description
- [ArrayTest](docs/ArrayTest.md)
- [Capitalization](docs/Capitalization.md)
- [Cat](docs/Cat.md)
+ - [CatAllOf](docs/CatAllOf.md)
- [Category](docs/Category.md)
- [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
- [Dog](docs/Dog.md)
+ - [DogAllOf](docs/DogAllOf.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
@@ -111,40 +122,56 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
+
+
## api_key
-- **Type**: API key
+
+- **Type**: API key
Example
+
```golang
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
- Key: "APIKEY",
- Prefix: "Bearer", // Omit if not necessary.
+ Key: "APIKEY",
+ Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)
```
+
+
## api_key_query
-- **Type**: API key
+
+- **Type**: API key
Example
+
```golang
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
- Key: "APIKEY",
- Prefix: "Bearer", // Omit if not necessary.
+ Key: "APIKEY",
+ Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)
```
+
+
## http_basic_test
+
- **Type**: HTTP basic authentication
Example
+
```golang
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
- UserName: "username",
- Password: "password",
+ UserName: "username",
+ Password: "password",
})
r, err := client.Service.Operation(auth, args)
```
+
+
## petstore_auth
+
+
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
@@ -153,12 +180,14 @@ r, err := client.Service.Operation(auth, args)
- **read:pets**: read your pets
Example
+
```golang
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
```
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
+
```golang
import "golang.org/x/oauth2"
@@ -169,6 +198,7 @@ auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
```
+
## Author
diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml
index 7212ef07c2..5a020a1d0a 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml
+++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml
@@ -32,6 +32,9 @@ paths:
description: Pet object that needs to be added to the store
required: true
responses:
+ 200:
+ content: {}
+ description: successful operation
405:
content: {}
description: Invalid input
@@ -56,6 +59,9 @@ paths:
description: Pet object that needs to be added to the store
required: true
responses:
+ 200:
+ content: {}
+ description: successful operation
400:
content: {}
description: Invalid ID supplied
@@ -120,7 +126,8 @@ paths:
/pet/findByTags:
get:
deprecated: true
- description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ description: Multiple tags can be provided with comma separated strings. Use
+ tag1, tag2, tag3 for testing.
operationId: findPetsByTags
parameters:
- description: Tags to filter by
@@ -173,6 +180,9 @@ paths:
format: int64
type: integer
responses:
+ 200:
+ content: {}
+ description: successful operation
400:
content: {}
description: Invalid pet value
@@ -332,7 +342,8 @@ paths:
x-codegen-request-body-name: body
/store/order/{order_id}:
delete:
- description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ 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
@@ -352,7 +363,8 @@ paths:
tags:
- store
get:
- description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ description: For valid response try integer IDs with value <= 5 or > 10. Other
+ values will generated exceptions
operationId: getOrderById
parameters:
- description: ID of pet that needs to be fetched
@@ -1072,7 +1084,8 @@ paths:
x-codegen-request-body-name: body
/fake/body-with-file-schema:
put:
- description: For this test, the body for this request much reference a schema named `File`.
+ description: For this test, the body for this request much reference a schema
+ named `File`.
operationId: testBodyWithFileSchema
requestBody:
content:
@@ -1350,17 +1363,11 @@ components:
Dog:
allOf:
- $ref: '#/components/schemas/Animal'
- - properties:
- breed:
- type: string
- type: object
+ - $ref: '#/components/schemas/Dog_allOf'
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- - properties:
- declawed:
- type: boolean
- type: object
+ - $ref: '#/components/schemas/Cat_allOf'
Animal:
discriminator:
propertyName: className
@@ -2009,6 +2016,14 @@ components:
xml:
namespace: http://a.com/schema
prefix: pre
+ Dog_allOf:
+ properties:
+ breed:
+ type: string
+ Cat_allOf:
+ properties:
+ declawed:
+ type: boolean
securitySchemes:
petstore_auth:
flows:
@@ -2028,4 +2043,4 @@ components:
type: apiKey
http_basic_test:
scheme: basic
- type: http
\ No newline at end of file
+ type: http
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
index 7396effd64..c6d1c26255 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
@@ -15,7 +15,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
)
// Linger please
@@ -34,7 +33,7 @@ To test special tags and operation ID starting with number
*/
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, body Client) (Client, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Patch")
+ localVarHttpMethod = http.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go
index dcc48da693..b943fc4be8 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go
@@ -15,7 +15,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
"github.com/antihax/optional"
"os"
)
@@ -35,7 +34,7 @@ this route creates an XmlItem
*/
func (a *FakeApiService) CreateXmlItem(ctx context.Context, xmlItem XmlItem) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -110,7 +109,7 @@ type FakeOuterBooleanSerializeOpts struct {
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -208,7 +207,7 @@ type FakeOuterCompositeSerializeOpts struct {
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -310,7 +309,7 @@ type FakeOuterNumberSerializeOpts struct {
func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -408,7 +407,7 @@ type FakeOuterStringSerializeOpts struct {
func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -499,7 +498,7 @@ For this test, the body for this request much reference a schema named `Fil
*/
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSchemaTestClass) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
+ localVarHttpMethod = http.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -567,7 +566,7 @@ FakeApiService
*/
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, body User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
+ localVarHttpMethod = http.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -637,7 +636,7 @@ To test \"client\" model
*/
func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Client, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Patch")
+ localVarHttpMethod = http.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -753,7 +752,7 @@ type TestEndpointParametersOpts struct {
func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -897,7 +896,7 @@ type TestEnumParametersOpts struct {
func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -1000,7 +999,7 @@ type TestGroupParametersOpts struct {
func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = http.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -1077,7 +1076,7 @@ FakeApiService test inline additionalProperties
*/
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, param map[string]string) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -1145,7 +1144,7 @@ FakeApiService test json serialization of form data
*/
func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
index 82217020bb..dd7a0babfe 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
@@ -15,7 +15,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
)
// Linger please
@@ -34,7 +33,7 @@ To test class name in snake case
*/
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, body Client) (Client, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Patch")
+ localVarHttpMethod = http.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go
index 7f09af3a7b..6b159c5001 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go
@@ -15,8 +15,8 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
"fmt"
+ "strings"
"github.com/antihax/optional"
"os"
)
@@ -35,7 +35,7 @@ PetApiService Add a new pet to the store
*/
func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -109,7 +109,7 @@ type DeletePetOpts struct {
func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = http.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -180,7 +180,7 @@ Multiple status values can be provided with comma separated strings
*/
func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -268,7 +268,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
*/
func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -356,7 +356,7 @@ Returns a single pet
*/
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -454,7 +454,7 @@ PetApiService Update an existing pet
*/
func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
+ localVarHttpMethod = http.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -530,7 +530,7 @@ type UpdatePetWithFormOpts struct {
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -612,7 +612,7 @@ type UploadFileOpts struct {
func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -725,7 +725,7 @@ type UploadFileWithRequiredFileOpts struct {
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_store.go b/samples/client/petstore/go/go-petstore-withXml/api_store.go
index 50ca891a25..ae780c2998 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_store.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_store.go
@@ -15,8 +15,8 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
"fmt"
+ "strings"
)
// Linger please
@@ -34,7 +34,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
*/
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = http.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -101,7 +101,7 @@ Returns a map of status codes to quantities
*/
func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -200,7 +200,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
*/
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -293,7 +293,7 @@ StoreApiService Place an order for a pet
*/
func (a *StoreApiService) PlaceOrder(ctx context.Context, body Order) (Order, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_user.go b/samples/client/petstore/go/go-petstore-withXml/api_user.go
index 29be65f085..be573458c7 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_user.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_user.go
@@ -15,8 +15,8 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
"fmt"
+ "strings"
)
// Linger please
@@ -34,7 +34,7 @@ This can only be done by the logged in user.
*/
func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -101,7 +101,7 @@ UserApiService Creates list of users with given input array
*/
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -168,7 +168,7 @@ UserApiService Creates list of users with given input array
*/
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -236,7 +236,7 @@ This can only be done by the logged in user.
*/
func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = http.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -303,7 +303,7 @@ UserApiService Get user by user name
*/
func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -391,7 +391,7 @@ UserApiService Logs user into the system
*/
func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -477,7 +477,7 @@ UserApiService Logs out current logged in user session
*/
func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -544,7 +544,7 @@ This can only be done by the logged in user.
*/
func (a *UserApiService) UpdateUser(ctx context.Context, username string, body User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
+ localVarHttpMethod = http.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore-withXml/client.go b/samples/client/petstore/go/go-petstore-withXml/client.go
index 87152ec107..9c9943dd67 100644
--- a/samples/client/petstore/go/go-petstore-withXml/client.go
+++ b/samples/client/petstore/go/go-petstore-withXml/client.go
@@ -230,10 +230,11 @@ func (c *APIClient) prepareRequest(
if err != nil {
return nil, err
}
- // Set the Boundary in the Content-Type
- headerParams["Content-Type"] = w.FormDataContentType()
}
+ // Set the Boundary in the Content-Type
+ headerParams["Content-Type"] = w.FormDataContentType()
+
// Set Content-Length
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
w.Close()
@@ -255,6 +256,16 @@ func (c *APIClient) prepareRequest(
return nil, err
}
+ // Override request host, if applicable
+ if c.cfg.Host != "" {
+ url.Host = c.cfg.Host
+ }
+
+ // Override request scheme, if applicable
+ if c.cfg.Scheme != "" {
+ url.Scheme = c.cfg.Scheme
+ }
+
// Adding Query Param
query := url.Query()
for k, v := range queryParams {
@@ -285,11 +296,6 @@ func (c *APIClient) prepareRequest(
localVarRequest.Header = headers
}
- // Override request host, if applicable
- if c.cfg.Host != "" {
- localVarRequest.Host = c.cfg.Host
- }
-
// Add the user agent to the request.
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
@@ -329,6 +335,10 @@ func (c *APIClient) prepareRequest(
}
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
+ if s, ok := v.(*string); ok {
+ *s = string(b)
+ return nil
+ }
if xmlCheck.MatchString(contentType) {
if err = xml.Unmarshal(b, v); err != nil {
return err
@@ -383,7 +393,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e
} else if jsonCheck.MatchString(contentType) {
err = json.NewEncoder(bodyBuf).Encode(body)
} else if xmlCheck.MatchString(contentType) {
- xml.NewEncoder(bodyBuf).Encode(body)
+ err = xml.NewEncoder(bodyBuf).Encode(body)
}
if err != nil {
diff --git a/samples/client/petstore/rust/docs/InlineObject.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md
similarity index 65%
rename from samples/client/petstore/rust/docs/InlineObject.md
rename to samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md
index ae2c737efc..eadec3142c 100644
--- a/samples/client/petstore/rust/docs/InlineObject.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md
@@ -1,10 +1,10 @@
-# InlineObject
+# AdditionalPropertiesAnyType
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**name** | **String** | Updated name of the pet | [optional]
-**status** | **String** | Updated status of the pet | [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/rust/docs/InlineObject1.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md
similarity index 59%
rename from samples/client/petstore/rust/docs/InlineObject1.md
rename to samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md
index 02ca4d0348..0c37598aeb 100644
--- a/samples/client/petstore/rust/docs/InlineObject1.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md
@@ -1,10 +1,10 @@
-# InlineObject1
+# AdditionalPropertiesArray
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**additional_metadata** | **String** | Additional data to pass to server | [optional]
-**file** | [***&std::path::Path**](&std::path::Path.md) | file to upload | [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/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md
new file mode 100644
index 0000000000..7190fe8429
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md
@@ -0,0 +1,11 @@
+# AdditionalPropertiesBoolean
+
+## 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/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md
index 0c8ba7085b..877a5d45a3 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md
@@ -1,10 +1,20 @@
# AdditionalPropertiesClass
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**MapProperty** | **map[string]string** | | [optional]
-**MapOfMapProperty** | [**map[string]map[string]string**](map.md) | | [optional]
+**MapString** | **map[string]string** | | [optional]
+**MapNumber** | **map[string]float32** | | [optional]
+**MapInteger** | **map[string]int32** | | [optional]
+**MapBoolean** | **map[string]bool** | | [optional]
+**MapArrayInteger** | [**map[string][]int32**](array.md) | | [optional]
+**MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional]
+**MapMapString** | [**map[string]map[string]string**](map.md) | | [optional]
+**MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional]
+**Anytype1** | [**map[string]interface{}**](.md) | | [optional]
+**Anytype2** | [**map[string]interface{}**](.md) | | [optional]
+**Anytype3** | [**map[string]interface{}**](.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/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md
new file mode 100644
index 0000000000..34e6fca8fb
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md
@@ -0,0 +1,11 @@
+# AdditionalPropertiesInteger
+
+## 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/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md
new file mode 100644
index 0000000000..6d41fd2315
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md
@@ -0,0 +1,11 @@
+# AdditionalPropertiesNumber
+
+## 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/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md
new file mode 100644
index 0000000000..b856de693b
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md
@@ -0,0 +1,11 @@
+# AdditionalPropertiesObject
+
+## 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/go/go-petstore-withXml/docs/AdditionalPropertiesString.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md
new file mode 100644
index 0000000000..69ad206568
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md
@@ -0,0 +1,11 @@
+# AdditionalPropertiesString
+
+## 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/go/go-petstore-withXml/docs/Animal.md b/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md
index d7113331a6..02d23377da 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md
@@ -1,6 +1,7 @@
# Animal
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | **string** | |
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md
index 6d996803c9..0b9deb0c58 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/AnotherFakeApi.md
@@ -7,7 +7,9 @@ Method | HTTP request | Description
[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags
-# **Call123TestSpecialTags**
+
+## Call123TestSpecialTags
+
> Client Call123TestSpecialTags(ctx, body)
To test special tags
@@ -15,10 +17,11 @@ To test special tags and operation ID starting with number
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**Client**](Client.md)| client model |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**Client**](Client.md)| client model |
### Return type
@@ -30,8 +33,10 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
- - **Accept**: application/json
+- **Content-Type**: application/json
+- **Accept**: application/json
-[[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)
+[[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/go/go-petstore-withXml/docs/ApiResponse.md b/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md
index f9b16338ec..41d28fb578 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md
@@ -1,6 +1,7 @@
# ApiResponse
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **int32** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md
index a53147b627..555213013b 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md
@@ -1,6 +1,7 @@
# ArrayOfArrayOfNumberOnly
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md
index 19031e76d2..56618756dd 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md
@@ -1,6 +1,7 @@
# ArrayOfNumberOnly
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayNumber** | **[]float32** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md
index a46d1acf66..0da0bc52d2 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md
@@ -1,6 +1,7 @@
# ArrayTest
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayOfString** | **[]string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md b/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md
index ac65ee37db..426b8eabd9 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md
@@ -1,6 +1,7 @@
# Capitalization
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SmallCamel** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md b/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md
index b51d5fd2b9..1ef1f095e9 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md
@@ -1,6 +1,7 @@
# Cat
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | **string** | |
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md b/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md
new file mode 100644
index 0000000000..c978cee041
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md
@@ -0,0 +1,11 @@
+# CatAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**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/go/go-petstore-withXml/docs/Category.md b/samples/client/petstore/go/go-petstore-withXml/docs/Category.md
index 1440215d22..01e8344bd0 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Category.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Category.md
@@ -1,6 +1,7 @@
# Category
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **int64** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md b/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md
index 8d7a728439..0b925cebb1 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md
@@ -1,6 +1,7 @@
# ClassModel
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Class** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Client.md b/samples/client/petstore/go/go-petstore-withXml/docs/Client.md
index fdf5fd9a69..551da852ee 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Client.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Client.md
@@ -1,6 +1,7 @@
# Client
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Client** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md b/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md
index 13c0aa28e6..ff35dd5cdc 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md
@@ -1,6 +1,7 @@
# Dog
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | **string** | |
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md b/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md
new file mode 100644
index 0000000000..b87153e926
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md
@@ -0,0 +1,11 @@
+# DogAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**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/go/go-petstore-withXml/docs/EnumArrays.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md
index 9eca8b2903..3021f88183 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md
@@ -1,6 +1,7 @@
# EnumArrays
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**JustSymbol** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md
index 67f017becd..c6932388c0 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md
@@ -1,6 +1,7 @@
# EnumClass
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md
index 85eab0e1d4..eeec09b66b 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md
@@ -1,6 +1,7 @@
# EnumTest
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**EnumString** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md
index e6d0dec3fe..b7927f181e 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md
@@ -19,7 +19,9 @@ Method | HTTP request | Description
[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data
-# **CreateXmlItem**
+
+## CreateXmlItem
+
> CreateXmlItem(ctx, xmlItem)
creates an XmlItem
@@ -27,10 +29,11 @@ this route creates an XmlItem
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body |
### Return type
@@ -42,12 +45,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- - **Accept**: Not defined
+- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
+- **Accept**: Not defined
-[[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)
+[[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
-# **FakeOuterBooleanSerialize**
> bool FakeOuterBooleanSerialize(ctx, optional)
@@ -55,14 +62,17 @@ Test serialization of outer boolean types
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***FakeOuterBooleanSerializeOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **optional.Bool**| Input boolean as post body |
@@ -77,12 +87,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: */*
+- **Content-Type**: Not defined
+- **Accept**: */*
-[[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)
+[[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
-# **FakeOuterCompositeSerialize**
> OuterComposite FakeOuterCompositeSerialize(ctx, optional)
@@ -90,14 +104,17 @@ Test serialization of object with outer number type
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***FakeOuterCompositeSerializeOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a FakeOuterCompositeSerializeOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body |
@@ -112,12 +129,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: */*
+- **Content-Type**: Not defined
+- **Accept**: */*
-[[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)
+[[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
-# **FakeOuterNumberSerialize**
> float32 FakeOuterNumberSerialize(ctx, optional)
@@ -125,14 +146,17 @@ Test serialization of outer number types
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***FakeOuterNumberSerializeOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a FakeOuterNumberSerializeOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **optional.Float32**| Input number as post body |
@@ -147,12 +171,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: */*
+- **Content-Type**: Not defined
+- **Accept**: */*
-[[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)
+[[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
-# **FakeOuterStringSerialize**
> string FakeOuterStringSerialize(ctx, optional)
@@ -160,14 +188,17 @@ Test serialization of outer string types
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***FakeOuterStringSerializeOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a FakeOuterStringSerializeOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **optional.String**| Input string as post body |
@@ -182,12 +213,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: */*
+- **Content-Type**: Not defined
+- **Accept**: */*
-[[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)
+[[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
-# **TestBodyWithFileSchema**
> TestBodyWithFileSchema(ctx, body)
@@ -195,10 +230,11 @@ For this test, the body for this request much reference a schema named `File`.
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@@ -210,22 +246,27 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
- - **Accept**: Not defined
+- **Content-Type**: application/json
+- **Accept**: Not defined
-[[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)
+[[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
-# **TestBodyWithQueryParams**
> TestBodyWithQueryParams(ctx, query, body)
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **query** | **string**| |
- **body** | [**User**](User.md)| |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**query** | **string**| |
+**body** | [**User**](User.md)| |
### Return type
@@ -237,12 +278,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
- - **Accept**: Not defined
+- **Content-Type**: application/json
+- **Accept**: Not defined
-[[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)
+[[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
-# **TestClientModel**
> Client TestClientModel(ctx, body)
To test \"client\" model
@@ -250,10 +295,11 @@ To test \"client\" model
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**Client**](Client.md)| client model |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**Client**](Client.md)| client model |
### Return type
@@ -265,12 +311,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
- - **Accept**: application/json
+- **Content-Type**: application/json
+- **Accept**: application/json
-[[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)
+[[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
-# **TestEndpointParameters**
> TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -278,18 +328,21 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **number** | **float32**| None |
- **double** | **float64**| None |
- **patternWithoutDelimiter** | **string**| None |
- **byte_** | **string**| None |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**number** | **float32**| None |
+**double** | **float64**| None |
+**patternWithoutDelimiter** | **string**| None |
+**byte_** | **string**| None |
**optional** | ***TestEndpointParametersOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a TestEndpointParametersOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
@@ -317,12 +370,16 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: Not defined
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
-[[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)
+[[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
-# **TestEnumParameters**
> TestEnumParameters(ctx, optional)
To test enum parameters
@@ -330,14 +387,17 @@ To test enum parameters
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***TestEnumParametersOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a TestEnumParametersOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enumHeaderStringArray** | [**optional.Interface of []string**](string.md)| Header parameter enum test (string array) |
@@ -359,12 +419,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: Not defined
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
-[[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)
+[[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
-# **TestGroupParameters**
> TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional)
Fake endpoint to test group parameters (optional)
@@ -372,17 +436,20 @@ Fake endpoint to test group parameters (optional)
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **requiredStringGroup** | **int32**| Required String in group parameters |
- **requiredBooleanGroup** | **bool**| Required Boolean in group parameters |
- **requiredInt64Group** | **int64**| Required Integer in group parameters |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**requiredStringGroup** | **int32**| Required String in group parameters |
+**requiredBooleanGroup** | **bool**| Required Boolean in group parameters |
+**requiredInt64Group** | **int64**| Required Integer in group parameters |
**optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a TestGroupParametersOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
@@ -402,21 +469,26 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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
-# **TestInlineAdditionalProperties**
> TestInlineAdditionalProperties(ctx, param)
test inline additionalProperties
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **param** | [**map[string]string**](string.md)| request body |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**param** | [**map[string]string**](string.md)| request body |
### Return type
@@ -428,22 +500,27 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
- - **Accept**: Not defined
+- **Content-Type**: application/json
+- **Accept**: Not defined
-[[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)
+[[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
-# **TestJsonFormData**
> TestJsonFormData(ctx, param, param2)
test json serialization of form data
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **param** | **string**| field1 |
- **param2** | **string**| field2 |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**param** | **string**| field1 |
+**param2** | **string**| field2 |
### Return type
@@ -455,8 +532,10 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: Not defined
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
-[[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)
+[[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/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md
index d9311e369d..b3cbcc2c06 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeClassnameTags123Api.md
@@ -7,7 +7,9 @@ Method | HTTP request | Description
[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case
-# **TestClassname**
+
+## TestClassname
+
> Client TestClassname(ctx, body)
To test class name in snake case
@@ -15,10 +17,11 @@ To test class name in snake case
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**Client**](Client.md)| client model |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**Client**](Client.md)| client model |
### Return type
@@ -30,8 +33,10 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/json
- - **Accept**: application/json
+- **Content-Type**: application/json
+- **Accept**: application/json
-[[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)
+[[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/go/go-petstore-withXml/docs/File.md b/samples/client/petstore/go/go-petstore-withXml/docs/File.md
index e7f7d80e05..a113b0312c 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/File.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/File.md
@@ -1,6 +1,7 @@
# File
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SourceURI** | **string** | Test capitalization | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md
index 69cbfa2c18..ae51414dd6 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md
@@ -1,6 +1,7 @@
# FileSchemaTestClass
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**File** | [**File**](File.md) | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md
index 5f70da85aa..ee089a03cd 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md
@@ -1,6 +1,7 @@
# FormatTest
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Integer** | **int32** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md
index c259e8b325..9e2f495735 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md
@@ -1,6 +1,7 @@
# HasOnlyReadOnly
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Bar** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/List.md b/samples/client/petstore/go/go-petstore-withXml/docs/List.md
index 3255fa2786..bba2e52990 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/List.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/List.md
@@ -1,6 +1,7 @@
# List
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Var123List** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md
index 49381ec4b8..6645e04465 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md
@@ -1,6 +1,7 @@
# MapTest
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index 0e5f61f627..a2ce1068b2 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -1,6 +1,7 @@
# MixedPropertiesAndAdditionalPropertiesClass
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Uuid** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md b/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md
index c5abac20d8..27b93bd154 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md
@@ -1,6 +1,7 @@
# Model200Response
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **int32** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Name.md b/samples/client/petstore/go/go-petstore-withXml/docs/Name.md
index fccddf6389..453e54d985 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Name.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Name.md
@@ -1,6 +1,7 @@
# Name
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **int32** | |
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md
index 4d2ea1b041..604cf37eed 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md
@@ -1,6 +1,7 @@
# NumberOnly
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**JustNumber** | **float32** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Order.md b/samples/client/petstore/go/go-petstore-withXml/docs/Order.md
index befa9151a1..eeef097100 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Order.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Order.md
@@ -1,6 +1,7 @@
# Order
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **int64** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md b/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md
index 30732cf10b..df9bce1bd9 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md
@@ -1,6 +1,7 @@
# OuterComposite
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MyNumber** | **float32** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md b/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md
index 06d413b016..c97466159c 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md
@@ -1,6 +1,7 @@
# OuterEnum
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md b/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md
index 049c82eb5a..c48104c639 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md
@@ -1,6 +1,7 @@
# Pet
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **int64** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md
index e1fffc0351..de48d4b676 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md
@@ -15,16 +15,19 @@ Method | HTTP request | Description
[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
-# **AddPet**
+
+## AddPet
+
> AddPet(ctx, body)
Add a new pet to the store
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -36,26 +39,33 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/json, application/xml
- - **Accept**: Not defined
+- **Content-Type**: application/json, application/xml
+- **Accept**: Not defined
-[[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)
+[[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
-# **DeletePet**
> DeletePet(ctx, petId, optional)
Deletes a pet
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **petId** | **int64**| Pet id to delete |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**petId** | **int64**| Pet id to delete |
**optional** | ***DeletePetOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a DeletePetOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
@@ -71,12 +81,16 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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
-# **FindPetsByStatus**
> []Pet FindPetsByStatus(ctx, status)
Finds Pets by status
@@ -84,10 +98,11 @@ Multiple status values can be provided with comma separated strings
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **status** | [**[]string**](string.md)| Status values that need to be considered for filter |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**status** | [**[]string**](string.md)| Status values that need to be considered for filter |
### Return type
@@ -99,12 +114,16 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
-[[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)
+[[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
-# **FindPetsByTags**
> []Pet FindPetsByTags(ctx, tags)
Finds Pets by tags
@@ -112,10 +131,11 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **tags** | [**[]string**](string.md)| Tags to filter by |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**tags** | [**[]string**](string.md)| Tags to filter by |
### Return type
@@ -127,12 +147,16 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
-[[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)
+[[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
-# **GetPetById**
> Pet GetPetById(ctx, petId)
Find pet by ID
@@ -140,10 +164,11 @@ Returns a single pet
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **petId** | **int64**| ID of pet to return |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**petId** | **int64**| ID of pet to return |
### Return type
@@ -155,21 +180,26 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
-[[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)
+[[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
-# **UpdatePet**
> UpdatePet(ctx, body)
Update an existing pet
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -181,26 +211,33 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/json, application/xml
- - **Accept**: Not defined
+- **Content-Type**: application/json, application/xml
+- **Accept**: Not defined
-[[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)
+[[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
-# **UpdatePetWithForm**
> UpdatePetWithForm(ctx, petId, optional)
Updates a pet in the store with form data
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **petId** | **int64**| ID of pet that needs to be updated |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**petId** | **int64**| ID of pet that needs to be updated |
**optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
@@ -217,26 +254,33 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: Not defined
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
-[[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)
+[[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
-# **UploadFile**
> ApiResponse UploadFile(ctx, petId, optional)
uploads an image
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **petId** | **int64**| ID of pet to update |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**petId** | **int64**| ID of pet to update |
**optional** | ***UploadFileOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a UploadFileOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
@@ -253,27 +297,34 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: multipart/form-data
- - **Accept**: application/json
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
-[[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)
+[[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
-# **UploadFileWithRequiredFile**
> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional)
uploads an image (required)
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **petId** | **int64**| ID of pet to update |
- **requiredFile** | ***os.File*****os.File**| file to upload |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**petId** | **int64**| ID of pet to update |
+**requiredFile** | ***os.File*****os.File**| file to upload |
**optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters
### Optional Parameters
+
Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
@@ -290,8 +341,10 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: multipart/form-data
- - **Accept**: application/json
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
-[[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)
+[[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/go/go-petstore-withXml/docs/ReadOnlyFirst.md b/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md
index b3546db3cc..3fee799f29 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md
@@ -1,6 +1,7 @@
# ReadOnlyFirst
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Bar** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Return.md b/samples/client/petstore/go/go-petstore-withXml/docs/Return.md
index bcf50e4e5c..11be0b27c5 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Return.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Return.md
@@ -1,6 +1,7 @@
# Return
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Return** | **int32** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md b/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md
index 7b2dfb654c..96d7a28a40 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md
@@ -1,6 +1,7 @@
# SpecialModelName
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SpecialPropertyName** | **int64** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md
index 88d762e030..083ed77759 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/StoreApi.md
@@ -10,7 +10,9 @@ Method | HTTP request | Description
[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet
-# **DeleteOrder**
+
+## DeleteOrder
+
> DeleteOrder(ctx, orderId)
Delete purchase order by ID
@@ -18,10 +20,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **orderId** | **string**| ID of the order that needs to be deleted |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**orderId** | **string**| ID of the order that needs to be deleted |
### Return type
@@ -33,18 +36,23 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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
-# **GetInventory**
> map[string]int32 GetInventory(ctx, )
Returns pet inventories by status
Returns a map of status codes to quantities
### Required Parameters
+
This endpoint does not need any parameter.
### Return type
@@ -57,12 +65,16 @@ This endpoint does not need any parameter.
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/json
+- **Content-Type**: Not defined
+- **Accept**: application/json
-[[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)
+[[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
-# **GetOrderById**
> Order GetOrderById(ctx, orderId)
Find purchase order by ID
@@ -70,10 +82,11 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **orderId** | **int64**| ID of pet that needs to be fetched |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**orderId** | **int64**| ID of pet that needs to be fetched |
### Return type
@@ -85,21 +98,26 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
-[[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)
+[[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
-# **PlaceOrder**
> Order PlaceOrder(ctx, body)
Place an order for a pet
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -111,8 +129,10 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
-[[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)
+[[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/go/go-petstore-withXml/docs/Tag.md b/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md
index acacb4f54a..d6b3cc117b 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md
@@ -1,6 +1,7 @@
# Tag
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **int64** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md
index 080c12a02f..1b9f077c30 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md
@@ -1,6 +1,7 @@
# TypeHolderDefault
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**StringItem** | **string** | | [default to what]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md
index 231c2a1872..abe85f9799 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md
@@ -1,6 +1,7 @@
# TypeHolderExample
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**StringItem** | **string** | |
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/User.md b/samples/client/petstore/go/go-petstore-withXml/docs/User.md
index 87e1456c8a..7675d7ff70 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/User.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/User.md
@@ -1,6 +1,7 @@
# User
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **int64** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md
index e57a67b754..3201e1771d 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/UserApi.md
@@ -14,7 +14,9 @@ Method | HTTP request | Description
[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user
-# **CreateUser**
+
+## CreateUser
+
> CreateUser(ctx, body)
Create user
@@ -22,10 +24,11 @@ This can only be done by the logged in user.
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**User**](User.md)| Created user object |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**User**](User.md)| Created user object |
### Return type
@@ -37,21 +40,26 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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
-# **CreateUsersWithArrayInput**
> CreateUsersWithArrayInput(ctx, body)
Creates list of users with given input array
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**[]User**](array.md)| List of user object |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**[]User**](User.md)| List of user object |
### Return type
@@ -63,21 +71,26 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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
-# **CreateUsersWithListInput**
> CreateUsersWithListInput(ctx, body)
Creates list of users with given input array
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**[]User**](array.md)| List of user object |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**body** | [**[]User**](User.md)| List of user object |
### Return type
@@ -89,12 +102,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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
-# **DeleteUser**
> DeleteUser(ctx, username)
Delete user
@@ -102,10 +119,11 @@ This can only be done by the logged in user.
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **username** | **string**| The name that needs to be deleted |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**username** | **string**| The name that needs to be deleted |
### Return type
@@ -117,21 +135,26 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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
-# **GetUserByName**
> User GetUserByName(ctx, username)
Get user by user name
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **username** | **string**| The name that needs to be fetched. Use user1 for testing. |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
### Return type
@@ -143,22 +166,27 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
-[[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)
+[[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
-# **LoginUser**
> string LoginUser(ctx, username, password)
Logs user into the system
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **username** | **string**| The user name for login |
- **password** | **string**| The password for login in clear text |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**username** | **string**| The user name for login |
+**password** | **string**| The password for login in clear text |
### Return type
@@ -170,16 +198,21 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
-[[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)
+[[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
-# **LogoutUser**
> LogoutUser(ctx, )
Logs out current logged in user session
### Required Parameters
+
This endpoint does not need any parameter.
### Return type
@@ -192,12 +225,16 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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
-# **UpdateUser**
> UpdateUser(ctx, username, body)
Updated user
@@ -205,11 +242,12 @@ This can only be done by the logged in user.
### Required Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **username** | **string**| name that need to be deleted |
- **body** | [**User**](User.md)| Updated user object |
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**username** | **string**| name that need to be deleted |
+**body** | [**User**](User.md)| Updated user object |
### Return type
@@ -221,8 +259,10 @@ No authorization required
### HTTP request headers
- - **Content-Type**: Not defined
- - **Accept**: Not defined
+- **Content-Type**: Not defined
+- **Accept**: Not defined
-[[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)
+[[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/go/go-petstore-withXml/docs/XmlItem.md b/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md
index 573fac8e2d..8a9c2dc0b5 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md
@@ -1,6 +1,7 @@
# XmlItem
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AttributeString** | **string** | | [optional]
diff --git a/samples/client/petstore/go/go-petstore-withXml/go.mod b/samples/client/petstore/go/go-petstore-withXml/go.mod
new file mode 100644
index 0000000000..199809ed70
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/go.mod
@@ -0,0 +1,6 @@
+module github.com/GIT_USER_ID/GIT_REPO_ID
+
+require (
+ github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6
+ golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
+)
diff --git a/samples/client/petstore/go/go-petstore-withXml/go.sum b/samples/client/petstore/go/go-petstore-withXml/go.sum
new file mode 100644
index 0000000000..e3c16fef3a
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/go.sum
@@ -0,0 +1,11 @@
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA=
+golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go
new file mode 100644
index 0000000000..6977ea451b
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type AdditionalPropertiesAnyType struct {
+ Name string `json:"name,omitempty" xml:"name"`
+}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go
new file mode 100644
index 0000000000..ef3055a02b
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type AdditionalPropertiesArray struct {
+ Name string `json:"name,omitempty" xml:"name"`
+}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go
new file mode 100644
index 0000000000..6cd68b3662
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type AdditionalPropertiesBoolean struct {
+ Name string `json:"name,omitempty" xml:"name"`
+}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go
index afa3de3d95..363a62f7a3 100644
--- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go
+++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go
@@ -11,6 +11,15 @@
package petstore
type AdditionalPropertiesClass struct {
- MapProperty map[string]string `json:"map_property,omitempty" xml:"map_property"`
- MapOfMapProperty map[string]map[string]string `json:"map_of_map_property,omitempty" xml:"map_of_map_property"`
+ MapString map[string]string `json:"map_string,omitempty" xml:"map_string"`
+ MapNumber map[string]float32 `json:"map_number,omitempty" xml:"map_number"`
+ MapInteger map[string]int32 `json:"map_integer,omitempty" xml:"map_integer"`
+ MapBoolean map[string]bool `json:"map_boolean,omitempty" xml:"map_boolean"`
+ MapArrayInteger map[string][]int32 `json:"map_array_integer,omitempty" xml:"map_array_integer"`
+ MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty" xml:"map_array_anytype"`
+ MapMapString map[string]map[string]string `json:"map_map_string,omitempty" xml:"map_map_string"`
+ MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty" xml:"map_map_anytype"`
+ Anytype1 map[string]interface{} `json:"anytype_1,omitempty" xml:"anytype_1"`
+ Anytype2 map[string]interface{} `json:"anytype_2,omitempty" xml:"anytype_2"`
+ Anytype3 map[string]interface{} `json:"anytype_3,omitempty" xml:"anytype_3"`
}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go
new file mode 100644
index 0000000000..7878ce4a06
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type AdditionalPropertiesInteger struct {
+ Name string `json:"name,omitempty" xml:"name"`
+}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go
new file mode 100644
index 0000000000..f95c1a6e3d
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type AdditionalPropertiesNumber struct {
+ Name string `json:"name,omitempty" xml:"name"`
+}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go
new file mode 100644
index 0000000000..e69e515374
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type AdditionalPropertiesObject struct {
+ Name string `json:"name,omitempty" xml:"name"`
+}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go
new file mode 100644
index 0000000000..7fb9acc4f2
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type AdditionalPropertiesString struct {
+ Name string `json:"name,omitempty" xml:"name"`
+}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go b/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go
new file mode 100644
index 0000000000..c01d44785e
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type CatAllOf struct {
+ Declawed bool `json:"declawed,omitempty" xml:"declawed"`
+}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go b/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go
new file mode 100644
index 0000000000..a679641f74
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go
@@ -0,0 +1,15 @@
+/*
+ * 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: \" \\
+ *
+ * API version: 1.0.0
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package petstore
+
+type DogAllOf struct {
+ Breed string `json:"breed,omitempty" xml:"breed"`
+}
diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go
index eaf9bfd49a..152bf5be28 100644
--- a/samples/client/petstore/go/go-petstore/api_another_fake.go
+++ b/samples/client/petstore/go/go-petstore/api_another_fake.go
@@ -14,7 +14,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
)
// Linger please
@@ -33,7 +32,7 @@ To test special tags and operation ID starting with number
*/
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, body Client) (Client, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Patch")
+ localVarHttpMethod = http.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go
index 90af0bcb03..27c3ae978b 100644
--- a/samples/client/petstore/go/go-petstore/api_fake.go
+++ b/samples/client/petstore/go/go-petstore/api_fake.go
@@ -14,7 +14,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
"github.com/antihax/optional"
"os"
)
@@ -34,7 +33,7 @@ this route creates an XmlItem
*/
func (a *FakeApiService) CreateXmlItem(ctx context.Context, xmlItem XmlItem) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -109,7 +108,7 @@ type FakeOuterBooleanSerializeOpts struct {
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -207,7 +206,7 @@ type FakeOuterCompositeSerializeOpts struct {
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -309,7 +308,7 @@ type FakeOuterNumberSerializeOpts struct {
func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -407,7 +406,7 @@ type FakeOuterStringSerializeOpts struct {
func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -498,7 +497,7 @@ For this test, the body for this request much reference a schema named `Fil
*/
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSchemaTestClass) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
+ localVarHttpMethod = http.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -566,7 +565,7 @@ FakeApiService
*/
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, body User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
+ localVarHttpMethod = http.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -636,7 +635,7 @@ To test \"client\" model
*/
func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Client, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Patch")
+ localVarHttpMethod = http.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -752,7 +751,7 @@ type TestEndpointParametersOpts struct {
func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -896,7 +895,7 @@ type TestEnumParametersOpts struct {
func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -999,7 +998,7 @@ type TestGroupParametersOpts struct {
func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = http.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -1076,7 +1075,7 @@ FakeApiService test inline additionalProperties
*/
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, param map[string]string) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -1144,7 +1143,7 @@ FakeApiService test json serialization of form data
*/
func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
index 784a54e5e7..6c04d55739 100644
--- a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
+++ b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
@@ -14,7 +14,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
)
// Linger please
@@ -33,7 +32,7 @@ To test class name in snake case
*/
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, body Client) (Client, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Patch")
+ localVarHttpMethod = http.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go
index e3cbb84b58..243d16197f 100644
--- a/samples/client/petstore/go/go-petstore/api_pet.go
+++ b/samples/client/petstore/go/go-petstore/api_pet.go
@@ -14,8 +14,8 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
"fmt"
+ "strings"
"github.com/antihax/optional"
"os"
)
@@ -34,7 +34,7 @@ PetApiService Add a new pet to the store
*/
func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -108,7 +108,7 @@ type DeletePetOpts struct {
func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = http.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -179,7 +179,7 @@ Multiple status values can be provided with comma separated strings
*/
func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -267,7 +267,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
*/
func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -355,7 +355,7 @@ Returns a single pet
*/
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -453,7 +453,7 @@ PetApiService Update an existing pet
*/
func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
+ localVarHttpMethod = http.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -529,7 +529,7 @@ type UpdatePetWithFormOpts struct {
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -611,7 +611,7 @@ type UploadFileOpts struct {
func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -724,7 +724,7 @@ type UploadFileWithRequiredFileOpts struct {
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go
index 2b195275db..3211860d49 100644
--- a/samples/client/petstore/go/go-petstore/api_store.go
+++ b/samples/client/petstore/go/go-petstore/api_store.go
@@ -14,8 +14,8 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
"fmt"
+ "strings"
)
// Linger please
@@ -33,7 +33,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
*/
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = http.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -100,7 +100,7 @@ Returns a map of status codes to quantities
*/
func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -199,7 +199,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
*/
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -292,7 +292,7 @@ StoreApiService Place an order for a pet
*/
func (a *StoreApiService) PlaceOrder(ctx context.Context, body Order) (Order, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore/api_user.go b/samples/client/petstore/go/go-petstore/api_user.go
index 2e349b1d29..6a7d2b1195 100644
--- a/samples/client/petstore/go/go-petstore/api_user.go
+++ b/samples/client/petstore/go/go-petstore/api_user.go
@@ -14,8 +14,8 @@ import (
"io/ioutil"
"net/http"
"net/url"
- "strings"
"fmt"
+ "strings"
)
// Linger please
@@ -33,7 +33,7 @@ This can only be done by the logged in user.
*/
func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -100,7 +100,7 @@ UserApiService Creates list of users with given input array
*/
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -167,7 +167,7 @@ UserApiService Creates list of users with given input array
*/
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = http.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -235,7 +235,7 @@ This can only be done by the logged in user.
*/
func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = http.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -302,7 +302,7 @@ UserApiService Get user by user name
*/
func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -390,7 +390,7 @@ UserApiService Logs user into the system
*/
func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -476,7 +476,7 @@ UserApiService Logs out current logged in user session
*/
func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = http.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@@ -543,7 +543,7 @@ This can only be done by the logged in user.
*/
func (a *UserApiService) UpdateUser(ctx context.Context, username string, body User) (*http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Put")
+ localVarHttpMethod = http.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go
index e057b74529..e67a99338b 100644
--- a/samples/client/petstore/go/go-petstore/client.go
+++ b/samples/client/petstore/go/go-petstore/client.go
@@ -255,6 +255,16 @@ func (c *APIClient) prepareRequest(
return nil, err
}
+ // Override request host, if applicable
+ if c.cfg.Host != "" {
+ url.Host = c.cfg.Host
+ }
+
+ // Override request scheme, if applicable
+ if c.cfg.Scheme != "" {
+ url.Scheme = c.cfg.Scheme
+ }
+
// Adding Query Param
query := url.Query()
for k, v := range queryParams {
@@ -285,11 +295,6 @@ func (c *APIClient) prepareRequest(
localVarRequest.Header = headers
}
- // Override request host, if applicable
- if c.cfg.Host != "" {
- localVarRequest.Host = c.cfg.Host
- }
-
// Add the user agent to the request.
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
diff --git a/samples/client/petstore/go/go-petstore/docs/UserApi.md b/samples/client/petstore/go/go-petstore/docs/UserApi.md
index ea19e0e716..3201e1771d 100644
--- a/samples/client/petstore/go/go-petstore/docs/UserApi.md
+++ b/samples/client/petstore/go/go-petstore/docs/UserApi.md
@@ -59,7 +59,7 @@ Creates list of users with given input array
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**body** | [**[]User**](array.md)| List of user object |
+**body** | [**[]User**](User.md)| List of user object |
### Return type
@@ -90,7 +90,7 @@ Creates list of users with given input array
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
-**body** | [**[]User**](array.md)| List of user object |
+**body** | [**[]User**](User.md)| List of user object |
### Return type
diff --git a/samples/client/petstore/go/pet_api_test.go b/samples/client/petstore/go/pet_api_test.go
index 0e23ca936e..969fab1f66 100644
--- a/samples/client/petstore/go/pet_api_test.go
+++ b/samples/client/petstore/go/pet_api_test.go
@@ -14,12 +14,14 @@ import (
var client *sw.APIClient
-const testHost = "testhost"
+const testHost = "petstore.swagger.io:80"
+const testScheme = "http"
func TestMain(m *testing.M) {
cfg := sw.NewConfiguration()
cfg.AddDefaultHeader("testheader", "testvalue")
cfg.Host = testHost
+ cfg.Scheme = testScheme
client = sw.NewAPIClient(cfg)
retCode := m.Run()
os.Exit(retCode)
@@ -32,8 +34,7 @@ func TestAddPet(t *testing.T) {
r, err := client.PetApi.AddPet(context.Background(), newPet)
if err != nil {
- t.Errorf("Error while adding pet")
- t.Log(err)
+ t.Fatalf("Error while adding pet: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -44,8 +45,7 @@ func TestFindPetsByStatusWithMissingParam(t *testing.T) {
_, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil)
if err != nil {
- t.Errorf("Error while testing TestFindPetsByStatusWithMissingParam")
- t.Log(err)
+ t.Fatalf("Error while testing TestFindPetsByStatusWithMissingParam: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -66,8 +66,7 @@ func TestGetPetByIdWithInvalidID(t *testing.T) {
a.Contains(assertedError.Error(), "Not Found")
} else if err != nil {
- t.Errorf("Error while getting pet by invalid id")
- t.Log(err)
+ t.Fatalf("Error while getting pet by invalid id: %v", err)
t.Log(r)
} else {
t.Log(resp)
@@ -80,8 +79,7 @@ func TestUpdatePetWithForm(t *testing.T) {
Status: optional.NewString("available"),
})
if err != nil {
- t.Errorf("Error while updating pet by id")
- t.Log(err)
+ t.Fatalf("Error while updating pet by id: %v", err)
t.Log(r)
}
if r.StatusCode != 200 {
@@ -96,8 +94,7 @@ func TestFindPetsByTag(t *testing.T) {
var found = false
resp, r, err := client.PetApi.FindPetsByTags(context.Background(), []string{"tag2"})
if err != nil {
- t.Errorf("Error while getting pet by tag")
- t.Log(err)
+ t.Fatalf("Error while getting pet by tag: %v", err)
t.Log(r)
} else {
if len(resp) == 0 {
@@ -126,8 +123,7 @@ func TestFindPetsByTag(t *testing.T) {
func TestFindPetsByStatus(t *testing.T) {
resp, r, err := client.PetApi.FindPetsByStatus(context.Background(), []string{"available"})
if err != nil {
- t.Errorf("Error while getting pet by id")
- t.Log(err)
+ t.Fatalf("Error while getting pet by id: %v", err)
t.Log(r)
} else {
if len(resp) == 0 {
@@ -154,8 +150,7 @@ func TestUploadFile(t *testing.T) {
})
if err != nil {
- t.Errorf("Error while uploading file")
- t.Log(err)
+ t.Fatalf("Error while uploading file: %v", err)
}
if r.StatusCode != 200 {
@@ -174,8 +169,7 @@ func TestUploadFileRequired(t *testing.T) {
})
if err != nil {
- t.Errorf("Error while uploading file")
- t.Log(err)
+ t.Fatalf("Error while uploading file: %v", err)
}
if r.StatusCode != 200 {
@@ -187,8 +181,7 @@ func TestDeletePet(t *testing.T) {
r, err := client.PetApi.DeletePet(context.Background(), 12830, nil)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -269,8 +262,7 @@ func waitOnFunctions(t *testing.T, errc chan error, n int) {
for i := 0; i < n; i++ {
err := <-errc
if err != nil {
- t.Errorf("Error performing concurrent test")
- t.Log(err)
+ t.Fatalf("Error performing concurrent test: %v", err)
}
}
}
@@ -279,8 +271,7 @@ func deletePet(t *testing.T, id int64) {
r, err := client.PetApi.DeletePet(context.Background(), id, nil)
if err != nil {
- t.Errorf("Error while deleting pet by id")
- t.Log(err)
+ t.Fatalf("Error while deleting pet by id: %v", err)
}
if r.StatusCode != 200 {
t.Log(r)
@@ -291,8 +282,7 @@ func isPetCorrect(t *testing.T, id int64, name string, status string) {
assert := assert.New(t)
resp, r, err := client.PetApi.GetPetById(context.Background(), id)
if err != nil {
- t.Errorf("Error while getting pet by id")
- t.Log(err)
+ t.Fatalf("Error while getting pet by id: %v", err)
} else {
assert.Equal(resp.Id, int64(id), "Pet id should be equal")
assert.Equal(resp.Name, name, fmt.Sprintf("Pet name should be %s", name))
diff --git a/samples/client/petstore/go/store_api_test.go b/samples/client/petstore/go/store_api_test.go
index 72191d0dd6..3088adf7b4 100644
--- a/samples/client/petstore/go/store_api_test.go
+++ b/samples/client/petstore/go/store_api_test.go
@@ -28,9 +28,8 @@ func TestPlaceOrder(t *testing.T) {
MatchString(err.Error()) {
t.Log("Skipping error for parsing time with `+0000` UTC offset as Petstore Test Server does not return valid RFC 3339 datetime")
} else {
- t.Errorf("Error while placing order")
+ t.Fatalf("Error while placing order: %v", err)
}
- t.Log(err)
}
if r.StatusCode != 200 {
t.Log(r)
diff --git a/samples/client/petstore/go/user_api_test.go b/samples/client/petstore/go/user_api_test.go
index 67995a160a..012c608fab 100644
--- a/samples/client/petstore/go/user_api_test.go
+++ b/samples/client/petstore/go/user_api_test.go
@@ -23,8 +23,7 @@ func TestCreateUser(t *testing.T) {
apiResponse, err := client.UserApi.CreateUser(context.Background(), newUser)
if err != nil {
- t.Errorf("Error while adding user")
- t.Log(err)
+ t.Fatalf("Error while adding user: %v", err)
}
if apiResponse.StatusCode != 200 {
t.Log(apiResponse)
@@ -58,8 +57,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
apiResponse, err := client.UserApi.CreateUsersWithArrayInput(context.Background(), newUsers)
if err != nil {
- t.Errorf("Error while adding users")
- t.Log(err)
+ t.Fatalf("Error while adding users: %v", err)
}
if apiResponse.StatusCode != 200 {
t.Log(apiResponse)
@@ -84,8 +82,7 @@ func TestGetUserByName(t *testing.T) {
resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher")
if err != nil {
- t.Errorf("Error while getting user by id")
- t.Log(err)
+ t.Fatalf("Error while getting user by id: %v", err)
} else {
assert.Equal(resp.Id, int64(1000), "User id should be equal")
assert.Equal(resp.Username, "gopher", "User name should be gopher")
@@ -102,8 +99,7 @@ func TestGetUserByNameWithInvalidID(t *testing.T) {
if apiResponse != nil && apiResponse.StatusCode == 404 {
return // This is a pass condition. API will return with a 404 error.
} else if err != nil {
- t.Errorf("Error while getting user by invalid id")
- t.Log(err)
+ t.Fatalf("Error while getting user by invalid id: %v", err)
t.Log(apiResponse)
} else {
t.Log(resp)
@@ -128,8 +124,7 @@ func TestUpdateUser(t *testing.T) {
apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher", newUser)
if err != nil {
- t.Errorf("Error while deleting user by id")
- t.Log(err)
+ t.Fatalf("Error while deleting user by id: %v", err)
}
if apiResponse.StatusCode != 200 {
t.Log(apiResponse)
@@ -138,8 +133,7 @@ func TestUpdateUser(t *testing.T) {
//verify changings are correct
resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher")
if err != nil {
- t.Errorf("Error while getting user by id")
- t.Log(err)
+ t.Fatalf("Error while getting user by id: %v", err)
} else {
assert.Equal(resp.Id, int64(1000), "User id should be equal")
assert.Equal(resp.FirstName, "gopher20", "User name should be gopher")
@@ -151,8 +145,7 @@ func TestDeleteUser(t *testing.T) {
apiResponse, err := client.UserApi.DeleteUser(context.Background(), "gopher")
if err != nil {
- t.Errorf("Error while deleting user")
- t.Log(err)
+ t.Fatalf("Error while deleting user: %v", err)
}
if apiResponse.StatusCode != 200 {
t.Log(apiResponse)
diff --git a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md
index 707f9eda8c..059616ec6b 100644
--- a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md
@@ -20,18 +20,30 @@ To test special tags and operation ID starting with number
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.AnotherFakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.AnotherFakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-AnotherFakeApi apiInstance = new AnotherFakeApi();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.call123testSpecialTags(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
- e.printStackTrace();
+ AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.call123testSpecialTags(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -55,3 +67,8 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md
index 2ae7e52932..9a2e477020 100644
--- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md
@@ -32,17 +32,29 @@ this route creates an XmlItem
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
-try {
- apiInstance.createXmlItem(xmlItem);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#createXmlItem");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
+ try {
+ apiInstance.createXmlItem(xmlItem);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#createXmlItem");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -66,6 +78,11 @@ No authorization required
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## fakeOuterBooleanSerialize
@@ -79,18 +96,30 @@ Test serialization of outer boolean types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Boolean body = true; // Boolean | Input boolean as post body
-try {
- Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Boolean body = true; // Boolean | Input boolean as post body
+ try {
+ Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -114,6 +143,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output boolean | - |
+
## fakeOuterCompositeSerialize
@@ -127,18 +161,30 @@ Test serialization of object with outer number type
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
-try {
- OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
+ try {
+ OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -162,6 +208,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output composite | - |
+
## fakeOuterNumberSerialize
@@ -175,18 +226,30 @@ Test serialization of outer number types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
-try {
- BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
+ try {
+ BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -210,6 +273,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output number | - |
+
## fakeOuterStringSerialize
@@ -223,18 +291,30 @@ Test serialization of outer string types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String body = "body_example"; // String | Input string as post body
-try {
- String result = apiInstance.fakeOuterStringSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String body = "body_example"; // String | Input string as post body
+ try {
+ String result = apiInstance.fakeOuterStringSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -258,6 +338,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output string | - |
+
## testBodyWithFileSchema
@@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
-try {
- apiInstance.testBodyWithFileSchema(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
+ try {
+ apiInstance.testBodyWithFileSchema(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -305,6 +402,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
## testBodyWithQueryParams
@@ -316,18 +418,30 @@ No authorization required
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String query = "query_example"; // String |
-User body = new User(); // User |
-try {
- apiInstance.testBodyWithQueryParams(query, body);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String query = "query_example"; // String |
+ User body = new User(); // User |
+ try {
+ apiInstance.testBodyWithQueryParams(query, body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -352,6 +466,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
## testClientModel
@@ -365,18 +484,30 @@ To test \"client\" model
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.testClientModel(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testClientModel");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -400,6 +531,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## testEndpointParameters
@@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure HTTP basic authorization: http_basic_test
+ HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
+ http_basic_test.setUsername("YOUR USERNAME");
+ http_basic_test.setPassword("YOUR PASSWORD");
-// Configure HTTP basic authorization: http_basic_test
-HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
-http_basic_test.setUsername("YOUR USERNAME");
-http_basic_test.setPassword("YOUR PASSWORD");
-
-FakeApi apiInstance = new FakeApi();
-BigDecimal number = new BigDecimal(); // BigDecimal | None
-Double _double = 3.4D; // Double | None
-String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
-byte[] _byte = null; // byte[] | None
-Integer integer = 56; // Integer | None
-Integer int32 = 56; // Integer | None
-Long int64 = 56L; // Long | None
-Float _float = 3.4F; // Float | None
-String string = "string_example"; // String | None
-File binary = new File("/path/to/file"); // File | None
-LocalDate date = new LocalDate(); // LocalDate | None
-OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
-String password = "password_example"; // String | None
-String paramCallback = "paramCallback_example"; // String | None
-try {
- apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEndpointParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ BigDecimal number = new BigDecimal(); // BigDecimal | None
+ Double _double = 3.4D; // Double | None
+ String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
+ byte[] _byte = null; // byte[] | None
+ Integer integer = 56; // Integer | None
+ Integer int32 = 56; // Integer | None
+ Long int64 = 56L; // Long | None
+ Float _float = 3.4F; // Float | None
+ String string = "string_example"; // String | None
+ File binary = new File("/path/to/file"); // File | None
+ LocalDate date = new LocalDate(); // LocalDate | None
+ OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
+ String password = "password_example"; // String | None
+ String paramCallback = "paramCallback_example"; // String | None
+ try {
+ apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testEndpointParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -482,6 +627,12 @@ null (empty response body)
- **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 | - |
+
## testEnumParameters
@@ -495,24 +646,36 @@ To test enum parameters
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array)
-String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
-List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array)
-String enumQueryString = "-efg"; // String | Query parameter enum test (string)
-Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
-Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
-List enumFormStringArray = "$"; // List | Form parameter enum test (string array)
-String enumFormString = "-efg"; // String | Form parameter enum test (string)
-try {
- apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEnumParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array)
+ String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
+ List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array)
+ String enumQueryString = "-efg"; // String | Query parameter enum test (string)
+ Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
+ Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
+ List enumFormStringArray = "$"; // List | Form parameter enum test (string array)
+ String enumFormString = "-efg"; // String | Form parameter enum test (string)
+ try {
+ apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testEnumParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -543,6 +706,12 @@ No authorization required
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid request | - |
+| **404** | Not found | - |
+
## testGroupParameters
@@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional)
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Integer requiredStringGroup = 56; // Integer | Required String in group parameters
-Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
-Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
-Integer stringGroup = 56; // Integer | String in group parameters
-Boolean booleanGroup = true; // Boolean | Boolean in group parameters
-Long int64Group = 56L; // Long | Integer in group parameters
-try {
- apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testGroupParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Integer requiredStringGroup = 56; // Integer | Required String in group parameters
+ Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
+ Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
+ Integer stringGroup = 56; // Integer | String in group parameters
+ Boolean booleanGroup = true; // Boolean | Boolean in group parameters
+ Long int64Group = 56L; // Long | Integer in group parameters
+ try {
+ apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testGroupParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -600,6 +781,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Someting wrong | - |
+
## testInlineAdditionalProperties
@@ -611,17 +797,29 @@ test inline additionalProperties
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Map param = new HashMap(); // Map | request body
-try {
- apiInstance.testInlineAdditionalProperties(param);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Map param = new HashMap(); // Map | request body
+ try {
+ apiInstance.testInlineAdditionalProperties(param);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -645,6 +843,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## testJsonFormData
@@ -656,18 +859,30 @@ test json serialization of form data
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String param = "param_example"; // String | field1
-String param2 = "param2_example"; // String | field2
-try {
- apiInstance.testJsonFormData(param, param2);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testJsonFormData");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String param = "param_example"; // String | field1
+ String param2 = "param2_example"; // String | field2
+ try {
+ apiInstance.testJsonFormData(param, param2);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testJsonFormData");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -692,3 +907,8 @@ No authorization required
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md
index 9d22b2e3f9..14a74a37a4 100644
--- a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md
@@ -20,28 +20,37 @@ To test class name in snake case
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.FakeClassnameTags123Api;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeClassnameTags123Api;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key_query
+ ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
+ api_key_query.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key_query.setApiKeyPrefix("Token");
-// Configure API key authorization: api_key_query
-ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
-api_key_query.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key_query.setApiKeyPrefix("Token");
-
-FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.testClassname(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
- e.printStackTrace();
+ FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -65,3 +74,8 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/google-api-client/docs/PetApi.md b/samples/client/petstore/java/google-api-client/docs/PetApi.md
index 2c71fc8513..875a8e6783 100644
--- a/samples/client/petstore/java/google-api-client/docs/PetApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/PetApi.md
@@ -26,25 +26,34 @@ Add a new pet to the store
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
-try {
- apiInstance.addPet(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.addPet(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#addPet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -68,6 +77,12 @@ null (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **405** | Invalid input | - |
+
## deletePet
@@ -79,26 +94,35 @@ Deletes a pet
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | Pet id to delete
-String apiKey = "apiKey_example"; // String |
-try {
- apiInstance.deletePet(petId, apiKey);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#deletePet");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | Pet id to delete
+ String apiKey = "apiKey_example"; // String |
+ try {
+ apiInstance.deletePet(petId, apiKey);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#deletePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -123,6 +147,12 @@ null (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid pet value | - |
+
## findPetsByStatus
@@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-List status = Arrays.asList("available"); // List | Status values that need to be considered for filter
-try {
- List result = apiInstance.findPetsByStatus(status);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#findPetsByStatus");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ List status = Arrays.asList("available"); // List | Status values that need to be considered for filter
+ try {
+ List result = apiInstance.findPetsByStatus(status);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -179,6 +218,12 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+
## findPetsByTags
@@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-List tags = Arrays.asList(); // List | Tags to filter by
-try {
- List result = apiInstance.findPetsByTags(tags);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#findPetsByTags");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ List tags = Arrays.asList(); // List | Tags to filter by
+ try {
+ List result = apiInstance.findPetsByTags(tags);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -235,6 +289,12 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid tag value | - |
+
## getPetById
@@ -248,28 +308,37 @@ Returns a single pet
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key
+ ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
+ api_key.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key.setApiKeyPrefix("Token");
-// Configure API key authorization: api_key
-ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
-api_key.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.setApiKeyPrefix("Token");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | ID of pet to return
-try {
- Pet result = apiInstance.getPetById(petId);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#getPetById");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to return
+ try {
+ Pet result = apiInstance.getPetById(petId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#getPetById");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -293,6 +362,13 @@ Name | Type | Description | Notes
- **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 | - |
+
## updatePet
@@ -304,25 +380,34 @@ Update an existing pet
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
-try {
- apiInstance.updatePet(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#updatePet");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.updatePet(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#updatePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -346,6 +431,14 @@ null (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+| **405** | Validation exception | - |
+
## updatePetWithForm
@@ -357,27 +450,36 @@ Updates a pet in the store with form data
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | ID of pet that needs to be updated
-String name = "name_example"; // String | Updated name of the pet
-String status = "status_example"; // String | Updated status of the pet
-try {
- apiInstance.updatePetWithForm(petId, name, status);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#updatePetWithForm");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet that needs to be updated
+ String name = "name_example"; // String | Updated name of the pet
+ String status = "status_example"; // String | Updated status of the pet
+ try {
+ apiInstance.updatePetWithForm(petId, name, status);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#updatePetWithForm");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -403,6 +505,11 @@ null (empty response body)
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
## uploadFile
@@ -414,28 +521,37 @@ uploads an image
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | ID of pet to update
-String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
-File file = new File("/path/to/file"); // File | file to upload
-try {
- ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#uploadFile");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to update
+ String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
+ File file = new File("/path/to/file"); // File | file to upload
+ try {
+ ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#uploadFile");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -461,6 +577,11 @@ Name | Type | Description | Notes
- **Content-Type**: multipart/form-data
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## uploadFileWithRequiredFile
@@ -472,28 +593,37 @@ uploads an image (required)
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | ID of pet to update
-File requiredFile = new File("/path/to/file"); // File | file to upload
-String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
-try {
- ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to update
+ File requiredFile = new File("/path/to/file"); // File | file to upload
+ String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
+ try {
+ ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -519,3 +649,8 @@ Name | Type | Description | Notes
- **Content-Type**: multipart/form-data
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/google-api-client/docs/StoreApi.md b/samples/client/petstore/java/google-api-client/docs/StoreApi.md
index 65f7651545..352399ea51 100644
--- a/samples/client/petstore/java/google-api-client/docs/StoreApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/StoreApi.md
@@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.StoreApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-StoreApi apiInstance = new StoreApi();
-String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
-try {
- apiInstance.deleteOrder(orderId);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#deleteOrder");
- e.printStackTrace();
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
+ try {
+ apiInstance.deleteOrder(orderId);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#deleteOrder");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -57,6 +69,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
## getInventory
@@ -70,27 +88,36 @@ Returns a map of status codes to quantities
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.StoreApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key
+ ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
+ api_key.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key.setApiKeyPrefix("Token");
-// Configure API key authorization: api_key
-ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
-api_key.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.setApiKeyPrefix("Token");
-
-StoreApi apiInstance = new StoreApi();
-try {
- Map result = apiInstance.getInventory();
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#getInventory");
- e.printStackTrace();
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ try {
+ Map result = apiInstance.getInventory();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#getInventory");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -111,6 +138,11 @@ This endpoint does not need any parameter.
- **Content-Type**: Not defined
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## getOrderById
@@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.StoreApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-StoreApi apiInstance = new StoreApi();
-Long orderId = 56L; // Long | ID of pet that needs to be fetched
-try {
- Order result = apiInstance.getOrderById(orderId);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#getOrderById");
- e.printStackTrace();
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Long orderId = 56L; // Long | ID of pet that needs to be fetched
+ try {
+ Order result = apiInstance.getOrderById(orderId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#getOrderById");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -159,6 +203,13 @@ No authorization required
- **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 | - |
+
## placeOrder
@@ -170,18 +221,30 @@ Place an order for a pet
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.StoreApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-StoreApi apiInstance = new StoreApi();
-Order body = new Order(); // Order | order placed for purchasing the pet
-try {
- Order result = apiInstance.placeOrder(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#placeOrder");
- e.printStackTrace();
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Order body = new Order(); // Order | order placed for purchasing the pet
+ try {
+ Order result = apiInstance.placeOrder(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#placeOrder");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -205,3 +268,9 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid Order | - |
+
diff --git a/samples/client/petstore/java/google-api-client/docs/UserApi.md b/samples/client/petstore/java/google-api-client/docs/UserApi.md
index 9133d79c33..4154aba4f1 100644
--- a/samples/client/petstore/java/google-api-client/docs/UserApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/UserApi.md
@@ -27,17 +27,29 @@ This can only be done by the logged in user.
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-User body = new User(); // User | Created user object
-try {
- apiInstance.createUser(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ User body = new User(); // User | Created user object
+ try {
+ apiInstance.createUser(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -61,6 +73,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
## createUsersWithArrayInput
@@ -72,17 +89,29 @@ Creates list of users with given input array
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-List body = Arrays.asList(null); // List | List of user object
-try {
- apiInstance.createUsersWithArrayInput(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ List body = Arrays.asList(null); // List | List of user object
+ try {
+ apiInstance.createUsersWithArrayInput(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -91,7 +120,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -106,6 +135,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
## createUsersWithListInput
@@ -117,17 +151,29 @@ Creates list of users with given input array
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-List body = Arrays.asList(null); // List | List of user object
-try {
- apiInstance.createUsersWithListInput(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUsersWithListInput");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ List body = Arrays.asList(null); // List | List of user object
+ try {
+ apiInstance.createUsersWithListInput(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUsersWithListInput");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -136,7 +182,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -151,6 +197,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
## deleteUser
@@ -164,17 +215,29 @@ This can only be done by the logged in user.
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The name that needs to be deleted
-try {
- apiInstance.deleteUser(username);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#deleteUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The name that needs to be deleted
+ try {
+ apiInstance.deleteUser(username);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#deleteUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -198,6 +261,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
## getUserByName
@@ -209,18 +278,30 @@ Get user by user name
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
-try {
- User result = apiInstance.getUserByName(username);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#getUserByName");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
+ try {
+ User result = apiInstance.getUserByName(username);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#getUserByName");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -244,6 +325,13 @@ No authorization required
- **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 | - |
+
## loginUser
@@ -255,19 +343,31 @@ Logs user into the system
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The user name for login
-String password = "password_example"; // String | The password for login in clear text
-try {
- String result = apiInstance.loginUser(username, password);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#loginUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The user name for login
+ String password = "password_example"; // String | The password for login in clear text
+ try {
+ String result = apiInstance.loginUser(username, password);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#loginUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -292,6 +392,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user * X-Expires-After - date in UTC when token expires |
+| **400** | Invalid username/password supplied | - |
+
## logoutUser
@@ -303,16 +409,28 @@ Logs out current logged in user session
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-try {
- apiInstance.logoutUser();
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#logoutUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ try {
+ apiInstance.logoutUser();
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#logoutUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -333,6 +451,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
## updateUser
@@ -346,18 +469,30 @@ This can only be done by the logged in user.
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | name that need to be deleted
-User body = new User(); // User | Updated user object
-try {
- apiInstance.updateUser(username, body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#updateUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | name that need to be deleted
+ User body = new User(); // User | Updated user object
+ try {
+ apiInstance.updateUser(username, body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#updateUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -382,3 +517,9 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid user supplied | - |
+| **404** | User not found | - |
+
diff --git a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md
index 707f9eda8c..059616ec6b 100644
--- a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md
@@ -20,18 +20,30 @@ To test special tags and operation ID starting with number
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.AnotherFakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.AnotherFakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-AnotherFakeApi apiInstance = new AnotherFakeApi();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.call123testSpecialTags(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
- e.printStackTrace();
+ AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.call123testSpecialTags(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -55,3 +67,8 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md
index 2ae7e52932..9a2e477020 100644
--- a/samples/client/petstore/java/jersey1/docs/FakeApi.md
+++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md
@@ -32,17 +32,29 @@ this route creates an XmlItem
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
-try {
- apiInstance.createXmlItem(xmlItem);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#createXmlItem");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
+ try {
+ apiInstance.createXmlItem(xmlItem);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#createXmlItem");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -66,6 +78,11 @@ No authorization required
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## fakeOuterBooleanSerialize
@@ -79,18 +96,30 @@ Test serialization of outer boolean types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Boolean body = true; // Boolean | Input boolean as post body
-try {
- Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Boolean body = true; // Boolean | Input boolean as post body
+ try {
+ Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -114,6 +143,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output boolean | - |
+
## fakeOuterCompositeSerialize
@@ -127,18 +161,30 @@ Test serialization of object with outer number type
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
-try {
- OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
+ try {
+ OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -162,6 +208,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output composite | - |
+
## fakeOuterNumberSerialize
@@ -175,18 +226,30 @@ Test serialization of outer number types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
-try {
- BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
+ try {
+ BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -210,6 +273,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output number | - |
+
## fakeOuterStringSerialize
@@ -223,18 +291,30 @@ Test serialization of outer string types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String body = "body_example"; // String | Input string as post body
-try {
- String result = apiInstance.fakeOuterStringSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String body = "body_example"; // String | Input string as post body
+ try {
+ String result = apiInstance.fakeOuterStringSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -258,6 +338,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output string | - |
+
## testBodyWithFileSchema
@@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
-try {
- apiInstance.testBodyWithFileSchema(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
+ try {
+ apiInstance.testBodyWithFileSchema(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -305,6 +402,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
## testBodyWithQueryParams
@@ -316,18 +418,30 @@ No authorization required
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String query = "query_example"; // String |
-User body = new User(); // User |
-try {
- apiInstance.testBodyWithQueryParams(query, body);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String query = "query_example"; // String |
+ User body = new User(); // User |
+ try {
+ apiInstance.testBodyWithQueryParams(query, body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -352,6 +466,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
## testClientModel
@@ -365,18 +484,30 @@ To test \"client\" model
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.testClientModel(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testClientModel");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -400,6 +531,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## testEndpointParameters
@@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure HTTP basic authorization: http_basic_test
+ HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
+ http_basic_test.setUsername("YOUR USERNAME");
+ http_basic_test.setPassword("YOUR PASSWORD");
-// Configure HTTP basic authorization: http_basic_test
-HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
-http_basic_test.setUsername("YOUR USERNAME");
-http_basic_test.setPassword("YOUR PASSWORD");
-
-FakeApi apiInstance = new FakeApi();
-BigDecimal number = new BigDecimal(); // BigDecimal | None
-Double _double = 3.4D; // Double | None
-String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
-byte[] _byte = null; // byte[] | None
-Integer integer = 56; // Integer | None
-Integer int32 = 56; // Integer | None
-Long int64 = 56L; // Long | None
-Float _float = 3.4F; // Float | None
-String string = "string_example"; // String | None
-File binary = new File("/path/to/file"); // File | None
-LocalDate date = new LocalDate(); // LocalDate | None
-OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
-String password = "password_example"; // String | None
-String paramCallback = "paramCallback_example"; // String | None
-try {
- apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEndpointParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ BigDecimal number = new BigDecimal(); // BigDecimal | None
+ Double _double = 3.4D; // Double | None
+ String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
+ byte[] _byte = null; // byte[] | None
+ Integer integer = 56; // Integer | None
+ Integer int32 = 56; // Integer | None
+ Long int64 = 56L; // Long | None
+ Float _float = 3.4F; // Float | None
+ String string = "string_example"; // String | None
+ File binary = new File("/path/to/file"); // File | None
+ LocalDate date = new LocalDate(); // LocalDate | None
+ OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
+ String password = "password_example"; // String | None
+ String paramCallback = "paramCallback_example"; // String | None
+ try {
+ apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testEndpointParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -482,6 +627,12 @@ null (empty response body)
- **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 | - |
+
## testEnumParameters
@@ -495,24 +646,36 @@ To test enum parameters
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array)
-String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
-List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array)
-String enumQueryString = "-efg"; // String | Query parameter enum test (string)
-Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
-Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
-List enumFormStringArray = "$"; // List | Form parameter enum test (string array)
-String enumFormString = "-efg"; // String | Form parameter enum test (string)
-try {
- apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEnumParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array)
+ String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
+ List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array)
+ String enumQueryString = "-efg"; // String | Query parameter enum test (string)
+ Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
+ Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
+ List enumFormStringArray = "$"; // List | Form parameter enum test (string array)
+ String enumFormString = "-efg"; // String | Form parameter enum test (string)
+ try {
+ apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testEnumParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -543,6 +706,12 @@ No authorization required
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid request | - |
+| **404** | Not found | - |
+
## testGroupParameters
@@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional)
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Integer requiredStringGroup = 56; // Integer | Required String in group parameters
-Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
-Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
-Integer stringGroup = 56; // Integer | String in group parameters
-Boolean booleanGroup = true; // Boolean | Boolean in group parameters
-Long int64Group = 56L; // Long | Integer in group parameters
-try {
- apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testGroupParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Integer requiredStringGroup = 56; // Integer | Required String in group parameters
+ Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
+ Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
+ Integer stringGroup = 56; // Integer | String in group parameters
+ Boolean booleanGroup = true; // Boolean | Boolean in group parameters
+ Long int64Group = 56L; // Long | Integer in group parameters
+ try {
+ apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testGroupParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -600,6 +781,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Someting wrong | - |
+
## testInlineAdditionalProperties
@@ -611,17 +797,29 @@ test inline additionalProperties
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Map param = new HashMap(); // Map | request body
-try {
- apiInstance.testInlineAdditionalProperties(param);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Map param = new HashMap(); // Map | request body
+ try {
+ apiInstance.testInlineAdditionalProperties(param);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -645,6 +843,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## testJsonFormData
@@ -656,18 +859,30 @@ test json serialization of form data
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String param = "param_example"; // String | field1
-String param2 = "param2_example"; // String | field2
-try {
- apiInstance.testJsonFormData(param, param2);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testJsonFormData");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String param = "param_example"; // String | field1
+ String param2 = "param2_example"; // String | field2
+ try {
+ apiInstance.testJsonFormData(param, param2);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testJsonFormData");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -692,3 +907,8 @@ No authorization required
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md
index 9d22b2e3f9..14a74a37a4 100644
--- a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md
@@ -20,28 +20,37 @@ To test class name in snake case
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.FakeClassnameTags123Api;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeClassnameTags123Api;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key_query
+ ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
+ api_key_query.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key_query.setApiKeyPrefix("Token");
-// Configure API key authorization: api_key_query
-ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
-api_key_query.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key_query.setApiKeyPrefix("Token");
-
-FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.testClassname(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
- e.printStackTrace();
+ FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -65,3 +74,8 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/jersey1/docs/PetApi.md b/samples/client/petstore/java/jersey1/docs/PetApi.md
index 2c71fc8513..875a8e6783 100644
--- a/samples/client/petstore/java/jersey1/docs/PetApi.md
+++ b/samples/client/petstore/java/jersey1/docs/PetApi.md
@@ -26,25 +26,34 @@ Add a new pet to the store
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
-try {
- apiInstance.addPet(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.addPet(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#addPet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -68,6 +77,12 @@ null (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **405** | Invalid input | - |
+
## deletePet
@@ -79,26 +94,35 @@ Deletes a pet
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | Pet id to delete
-String apiKey = "apiKey_example"; // String |
-try {
- apiInstance.deletePet(petId, apiKey);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#deletePet");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | Pet id to delete
+ String apiKey = "apiKey_example"; // String |
+ try {
+ apiInstance.deletePet(petId, apiKey);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#deletePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -123,6 +147,12 @@ null (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid pet value | - |
+
## findPetsByStatus
@@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-List status = Arrays.asList("available"); // List | Status values that need to be considered for filter
-try {
- List result = apiInstance.findPetsByStatus(status);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#findPetsByStatus");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ List status = Arrays.asList("available"); // List | Status values that need to be considered for filter
+ try {
+ List result = apiInstance.findPetsByStatus(status);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -179,6 +218,12 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+
## findPetsByTags
@@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-List tags = Arrays.asList(); // List | Tags to filter by
-try {
- List result = apiInstance.findPetsByTags(tags);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#findPetsByTags");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ List tags = Arrays.asList(); // List | Tags to filter by
+ try {
+ List result = apiInstance.findPetsByTags(tags);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -235,6 +289,12 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid tag value | - |
+
## getPetById
@@ -248,28 +308,37 @@ Returns a single pet
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key
+ ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
+ api_key.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key.setApiKeyPrefix("Token");
-// Configure API key authorization: api_key
-ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
-api_key.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.setApiKeyPrefix("Token");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | ID of pet to return
-try {
- Pet result = apiInstance.getPetById(petId);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#getPetById");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to return
+ try {
+ Pet result = apiInstance.getPetById(petId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#getPetById");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -293,6 +362,13 @@ Name | Type | Description | Notes
- **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 | - |
+
## updatePet
@@ -304,25 +380,34 @@ Update an existing pet
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
-try {
- apiInstance.updatePet(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#updatePet");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.updatePet(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#updatePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -346,6 +431,14 @@ null (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+| **405** | Validation exception | - |
+
## updatePetWithForm
@@ -357,27 +450,36 @@ Updates a pet in the store with form data
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | ID of pet that needs to be updated
-String name = "name_example"; // String | Updated name of the pet
-String status = "status_example"; // String | Updated status of the pet
-try {
- apiInstance.updatePetWithForm(petId, name, status);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#updatePetWithForm");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet that needs to be updated
+ String name = "name_example"; // String | Updated name of the pet
+ String status = "status_example"; // String | Updated status of the pet
+ try {
+ apiInstance.updatePetWithForm(petId, name, status);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#updatePetWithForm");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -403,6 +505,11 @@ null (empty response body)
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
## uploadFile
@@ -414,28 +521,37 @@ uploads an image
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | ID of pet to update
-String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
-File file = new File("/path/to/file"); // File | file to upload
-try {
- ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#uploadFile");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to update
+ String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
+ File file = new File("/path/to/file"); // File | file to upload
+ try {
+ ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#uploadFile");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -461,6 +577,11 @@ Name | Type | Description | Notes
- **Content-Type**: multipart/form-data
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## uploadFileWithRequiredFile
@@ -472,28 +593,37 @@ uploads an image (required)
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | ID of pet to update
-File requiredFile = new File("/path/to/file"); // File | file to upload
-String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
-try {
- ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to update
+ File requiredFile = new File("/path/to/file"); // File | file to upload
+ String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
+ try {
+ ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -519,3 +649,8 @@ Name | Type | Description | Notes
- **Content-Type**: multipart/form-data
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/jersey1/docs/StoreApi.md b/samples/client/petstore/java/jersey1/docs/StoreApi.md
index 65f7651545..352399ea51 100644
--- a/samples/client/petstore/java/jersey1/docs/StoreApi.md
+++ b/samples/client/petstore/java/jersey1/docs/StoreApi.md
@@ -23,17 +23,29 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.StoreApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-StoreApi apiInstance = new StoreApi();
-String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
-try {
- apiInstance.deleteOrder(orderId);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#deleteOrder");
- e.printStackTrace();
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
+ try {
+ apiInstance.deleteOrder(orderId);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#deleteOrder");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -57,6 +69,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
## getInventory
@@ -70,27 +88,36 @@ Returns a map of status codes to quantities
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.StoreApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key
+ ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
+ api_key.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key.setApiKeyPrefix("Token");
-// Configure API key authorization: api_key
-ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
-api_key.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.setApiKeyPrefix("Token");
-
-StoreApi apiInstance = new StoreApi();
-try {
- Map result = apiInstance.getInventory();
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#getInventory");
- e.printStackTrace();
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ try {
+ Map result = apiInstance.getInventory();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#getInventory");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -111,6 +138,11 @@ This endpoint does not need any parameter.
- **Content-Type**: Not defined
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## getOrderById
@@ -124,18 +156,30 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.StoreApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-StoreApi apiInstance = new StoreApi();
-Long orderId = 56L; // Long | ID of pet that needs to be fetched
-try {
- Order result = apiInstance.getOrderById(orderId);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#getOrderById");
- e.printStackTrace();
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Long orderId = 56L; // Long | ID of pet that needs to be fetched
+ try {
+ Order result = apiInstance.getOrderById(orderId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#getOrderById");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -159,6 +203,13 @@ No authorization required
- **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 | - |
+
## placeOrder
@@ -170,18 +221,30 @@ Place an order for a pet
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.StoreApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-StoreApi apiInstance = new StoreApi();
-Order body = new Order(); // Order | order placed for purchasing the pet
-try {
- Order result = apiInstance.placeOrder(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#placeOrder");
- e.printStackTrace();
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Order body = new Order(); // Order | order placed for purchasing the pet
+ try {
+ Order result = apiInstance.placeOrder(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#placeOrder");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -205,3 +268,9 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid Order | - |
+
diff --git a/samples/client/petstore/java/jersey1/docs/UserApi.md b/samples/client/petstore/java/jersey1/docs/UserApi.md
index 9133d79c33..4154aba4f1 100644
--- a/samples/client/petstore/java/jersey1/docs/UserApi.md
+++ b/samples/client/petstore/java/jersey1/docs/UserApi.md
@@ -27,17 +27,29 @@ This can only be done by the logged in user.
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-User body = new User(); // User | Created user object
-try {
- apiInstance.createUser(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ User body = new User(); // User | Created user object
+ try {
+ apiInstance.createUser(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -61,6 +73,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
## createUsersWithArrayInput
@@ -72,17 +89,29 @@ Creates list of users with given input array
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-List body = Arrays.asList(null); // List | List of user object
-try {
- apiInstance.createUsersWithArrayInput(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ List body = Arrays.asList(null); // List | List of user object
+ try {
+ apiInstance.createUsersWithArrayInput(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -91,7 +120,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -106,6 +135,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
## createUsersWithListInput
@@ -117,17 +151,29 @@ Creates list of users with given input array
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-List body = Arrays.asList(null); // List | List of user object
-try {
- apiInstance.createUsersWithListInput(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUsersWithListInput");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ List body = Arrays.asList(null); // List | List of user object
+ try {
+ apiInstance.createUsersWithListInput(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUsersWithListInput");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -136,7 +182,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](List.md)| List of user object |
+ **body** | [**List<User>**](User.md)| List of user object |
### Return type
@@ -151,6 +197,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
## deleteUser
@@ -164,17 +215,29 @@ This can only be done by the logged in user.
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The name that needs to be deleted
-try {
- apiInstance.deleteUser(username);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#deleteUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The name that needs to be deleted
+ try {
+ apiInstance.deleteUser(username);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#deleteUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -198,6 +261,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
## getUserByName
@@ -209,18 +278,30 @@ Get user by user name
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
-try {
- User result = apiInstance.getUserByName(username);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#getUserByName");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
+ try {
+ User result = apiInstance.getUserByName(username);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#getUserByName");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -244,6 +325,13 @@ No authorization required
- **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 | - |
+
## loginUser
@@ -255,19 +343,31 @@ Logs user into the system
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The user name for login
-String password = "password_example"; // String | The password for login in clear text
-try {
- String result = apiInstance.loginUser(username, password);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#loginUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The user name for login
+ String password = "password_example"; // String | The password for login in clear text
+ try {
+ String result = apiInstance.loginUser(username, password);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#loginUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -292,6 +392,12 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user * X-Expires-After - date in UTC when token expires |
+| **400** | Invalid username/password supplied | - |
+
## logoutUser
@@ -303,16 +409,28 @@ Logs out current logged in user session
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-try {
- apiInstance.logoutUser();
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#logoutUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ try {
+ apiInstance.logoutUser();
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#logoutUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -333,6 +451,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
## updateUser
@@ -346,18 +469,30 @@ This can only be done by the logged in user.
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.UserApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | name that need to be deleted
-User body = new User(); // User | Updated user object
-try {
- apiInstance.updateUser(username, body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#updateUser");
- e.printStackTrace();
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | name that need to be deleted
+ User body = new User(); // User | Updated user object
+ try {
+ apiInstance.updateUser(username, body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#updateUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -382,3 +517,9 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid user supplied | - |
+| **404** | User not found | - |
+
diff --git a/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md
index 707f9eda8c..059616ec6b 100644
--- a/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md
@@ -20,18 +20,30 @@ To test special tags and operation ID starting with number
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.AnotherFakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.AnotherFakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-AnotherFakeApi apiInstance = new AnotherFakeApi();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.call123testSpecialTags(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
- e.printStackTrace();
+ AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.call123testSpecialTags(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -55,3 +67,8 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md
index 2ae7e52932..9a2e477020 100644
--- a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md
+++ b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md
@@ -32,17 +32,29 @@ this route creates an XmlItem
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
-try {
- apiInstance.createXmlItem(xmlItem);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#createXmlItem");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
+ try {
+ apiInstance.createXmlItem(xmlItem);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#createXmlItem");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -66,6 +78,11 @@ No authorization required
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## fakeOuterBooleanSerialize
@@ -79,18 +96,30 @@ Test serialization of outer boolean types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Boolean body = true; // Boolean | Input boolean as post body
-try {
- Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Boolean body = true; // Boolean | Input boolean as post body
+ try {
+ Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -114,6 +143,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output boolean | - |
+
## fakeOuterCompositeSerialize
@@ -127,18 +161,30 @@ Test serialization of object with outer number type
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
-try {
- OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
+ try {
+ OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -162,6 +208,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output composite | - |
+
## fakeOuterNumberSerialize
@@ -175,18 +226,30 @@ Test serialization of outer number types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
-try {
- BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
+ try {
+ BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -210,6 +273,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output number | - |
+
## fakeOuterStringSerialize
@@ -223,18 +291,30 @@ Test serialization of outer string types
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String body = "body_example"; // String | Input string as post body
-try {
- String result = apiInstance.fakeOuterStringSerialize(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String body = "body_example"; // String | Input string as post body
+ try {
+ String result = apiInstance.fakeOuterStringSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -258,6 +338,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: */*
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output string | - |
+
## testBodyWithFileSchema
@@ -271,17 +356,29 @@ For this test, the body for this request much reference a schema named `Fil
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
-try {
- apiInstance.testBodyWithFileSchema(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
+ try {
+ apiInstance.testBodyWithFileSchema(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -305,6 +402,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
## testBodyWithQueryParams
@@ -316,18 +418,30 @@ No authorization required
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String query = "query_example"; // String |
-User body = new User(); // User |
-try {
- apiInstance.testBodyWithQueryParams(query, body);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String query = "query_example"; // String |
+ User body = new User(); // User |
+ try {
+ apiInstance.testBodyWithQueryParams(query, body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -352,6 +466,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
## testClientModel
@@ -365,18 +484,30 @@ To test \"client\" model
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.testClientModel(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testClientModel");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.testClientModel(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -400,6 +531,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## testEndpointParameters
@@ -413,39 +549,48 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure HTTP basic authorization: http_basic_test
+ HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
+ http_basic_test.setUsername("YOUR USERNAME");
+ http_basic_test.setPassword("YOUR PASSWORD");
-// Configure HTTP basic authorization: http_basic_test
-HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
-http_basic_test.setUsername("YOUR USERNAME");
-http_basic_test.setPassword("YOUR PASSWORD");
-
-FakeApi apiInstance = new FakeApi();
-BigDecimal number = new BigDecimal(); // BigDecimal | None
-Double _double = 3.4D; // Double | None
-String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
-byte[] _byte = null; // byte[] | None
-Integer integer = 56; // Integer | None
-Integer int32 = 56; // Integer | None
-Long int64 = 56L; // Long | None
-Float _float = 3.4F; // Float | None
-String string = "string_example"; // String | None
-File binary = new File("/path/to/file"); // File | None
-LocalDate date = new LocalDate(); // LocalDate | None
-OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
-String password = "password_example"; // String | None
-String paramCallback = "paramCallback_example"; // String | None
-try {
- apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEndpointParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ BigDecimal number = new BigDecimal(); // BigDecimal | None
+ Double _double = 3.4D; // Double | None
+ String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
+ byte[] _byte = null; // byte[] | None
+ Integer integer = 56; // Integer | None
+ Integer int32 = 56; // Integer | None
+ Long int64 = 56L; // Long | None
+ Float _float = 3.4F; // Float | None
+ String string = "string_example"; // String | None
+ File binary = new File("/path/to/file"); // File | None
+ LocalDate date = new LocalDate(); // LocalDate | None
+ OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
+ String password = "password_example"; // String | None
+ String paramCallback = "paramCallback_example"; // String | None
+ try {
+ apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testEndpointParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -482,6 +627,12 @@ null (empty response body)
- **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 | - |
+
## testEnumParameters
@@ -495,24 +646,36 @@ To test enum parameters
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array)
-String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
-List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array)
-String enumQueryString = "-efg"; // String | Query parameter enum test (string)
-Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
-Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
-List enumFormStringArray = "$"; // List | Form parameter enum test (string array)
-String enumFormString = "-efg"; // String | Form parameter enum test (string)
-try {
- apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEnumParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array)
+ String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
+ List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array)
+ String enumQueryString = "-efg"; // String | Query parameter enum test (string)
+ Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
+ Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
+ List enumFormStringArray = "$"; // List | Form parameter enum test (string array)
+ String enumFormString = "-efg"; // String | Form parameter enum test (string)
+ try {
+ apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testEnumParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -543,6 +706,12 @@ No authorization required
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid request | - |
+| **404** | Not found | - |
+
## testGroupParameters
@@ -556,22 +725,34 @@ Fake endpoint to test group parameters (optional)
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Integer requiredStringGroup = 56; // Integer | Required String in group parameters
-Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
-Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
-Integer stringGroup = 56; // Integer | String in group parameters
-Boolean booleanGroup = true; // Boolean | Boolean in group parameters
-Long int64Group = 56L; // Long | Integer in group parameters
-try {
- apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testGroupParameters");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Integer requiredStringGroup = 56; // Integer | Required String in group parameters
+ Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
+ Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
+ Integer stringGroup = 56; // Integer | String in group parameters
+ Boolean booleanGroup = true; // Boolean | Boolean in group parameters
+ Long int64Group = 56L; // Long | Integer in group parameters
+ try {
+ apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testGroupParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -600,6 +781,11 @@ No authorization required
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Someting wrong | - |
+
## testInlineAdditionalProperties
@@ -611,17 +797,29 @@ test inline additionalProperties
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-Map param = new HashMap(); // Map | request body
-try {
- apiInstance.testInlineAdditionalProperties(param);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Map param = new HashMap(); // Map | request body
+ try {
+ apiInstance.testInlineAdditionalProperties(param);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -645,6 +843,11 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
## testJsonFormData
@@ -656,18 +859,30 @@ test json serialization of form data
```java
// Import classes:
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.api.FakeApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
-FakeApi apiInstance = new FakeApi();
-String param = "param_example"; // String | field1
-String param2 = "param2_example"; // String | field2
-try {
- apiInstance.testJsonFormData(param, param2);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testJsonFormData");
- e.printStackTrace();
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String param = "param_example"; // String | field1
+ String param2 = "param2_example"; // String | field2
+ try {
+ apiInstance.testJsonFormData(param, param2);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testJsonFormData");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -692,3 +907,8 @@ No authorization required
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md
index 9d22b2e3f9..14a74a37a4 100644
--- a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md
@@ -20,28 +20,37 @@ To test class name in snake case
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.FakeClassnameTags123Api;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeClassnameTags123Api;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key_query
+ ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
+ api_key_query.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key_query.setApiKeyPrefix("Token");
-// Configure API key authorization: api_key_query
-ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
-api_key_query.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key_query.setApiKeyPrefix("Token");
-
-FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.testClassname(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
- e.printStackTrace();
+ FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
+ Client body = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.testClassname(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -65,3 +74,8 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md
index 2c71fc8513..875a8e6783 100644
--- a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md
+++ b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md
@@ -26,25 +26,34 @@ Add a new pet to the store
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
-try {
- apiInstance.addPet(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.addPet(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#addPet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -68,6 +77,12 @@ null (empty response body)
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **405** | Invalid input | - |
+
## deletePet
@@ -79,26 +94,35 @@ Deletes a pet
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 56L; // Long | Pet id to delete
-String apiKey = "apiKey_example"; // String |
-try {
- apiInstance.deletePet(petId, apiKey);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#deletePet");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | Pet id to delete
+ String apiKey = "apiKey_example"; // String |
+ try {
+ apiInstance.deletePet(petId, apiKey);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#deletePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -123,6 +147,12 @@ null (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid pet value | - |
+
## findPetsByStatus
@@ -136,26 +166,35 @@ Multiple status values can be provided with comma separated strings
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-List status = Arrays.asList("available"); // List | Status values that need to be considered for filter
-try {
- List result = apiInstance.findPetsByStatus(status);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#findPetsByStatus");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ List status = Arrays.asList("available"); // List | Status values that need to be considered for filter
+ try {
+ List result = apiInstance.findPetsByStatus(status);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
}
```
@@ -179,6 +218,12 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+
## findPetsByTags
@@ -192,26 +237,35 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
```java
// Import classes:
-//import org.openapitools.client.ApiClient;
-//import org.openapitools.client.ApiException;
-//import org.openapitools.client.Configuration;
-//import org.openapitools.client.auth.*;
-//import org.openapitools.client.api.PetApi;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
-ApiClient defaultClient = Configuration.getDefaultApiClient();
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-List tags = Arrays.asList(); // List | Tags to filter by
-try {
- List result = apiInstance.findPetsByTags(tags);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#findPetsByTags");
- e.printStackTrace();
+ PetApi apiInstance = new PetApi(defaultClient);
+ List tags = Arrays.asList(); // List