diff --git a/CI/.drone.yml b/CI/.drone.yml
new file mode 100644
index 0000000000..d45a1a431e
--- /dev/null
+++ b/CI/.drone.yml
@@ -0,0 +1,9 @@
+kind: pipeline
+name: default
+
+steps:
+- name: test
+ image: hirokimatsumoto/alpine-openjdk-11
+ commands:
+ - ./mvnw clean install
+ - ./mvnw --quiet verify -Psamples.droneio
diff --git a/CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml b/CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml
new file mode 100644
index 0000000000..a6fc39c4f0
--- /dev/null
+++ b/CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml
@@ -0,0 +1,26 @@
+
+ 4.0.0
+ org.openapitools
+ TypeScriptAngularBuildPestoreClientTests
+ pom
+ 1.0-SNAPSHOT
+ TS Fetch Multiple Parameters Petstore Client
+
+
+
+ maven-dependency-plugin
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
index 797a761f59..e56010617b 100644
--- a/README.md
+++ b/README.md
@@ -6,11 +6,13 @@
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
+[](https://cloud.drone.io/OpenAPITools/openapi-generator)
[`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)
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
+[](https://cloud.drone.io/OpenAPITools/openapi-generator)
@@ -46,12 +48,18 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
[](https://www.namsor.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[](https://www.lightbow.net/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
+#### Thank you GoDaddy for sponsoring the domain names and Linode for sponsoring the VPS
+
+[
](https://www.godaddy.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
+[](https://www.linode.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
+
+
## Overview
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
| | Languages/Frameworks |
|-|-|
-**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 7.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
+**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client), **Kotlin**, **Lua**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 7.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin** (Spring Boot, Ktor), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
**API documentation generators** | **HTML**, **Confluence Wiki**
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
@@ -217,9 +225,9 @@ openapi-generator-cli version # is always 3.0.2, unless any of the above overrid
To build from source, you need the following installed and available in your `$PATH:`
-* [Java 8](http://java.oracle.com)
+* [Java 8](https://www.oracle.com/technetwork/java/index.html)
-* [Apache Maven 3.3.4 or greater](http://maven.apache.org/)
+* [Apache Maven 3.3.4 or greater](https://maven.apache.org/)
After cloning the project, you can build it from source with this command:
```sh
@@ -242,6 +250,17 @@ openapi-generator generate -i https://raw.githubusercontent.com/openapitools/ope
To reinstall with the latest master, run `brew uninstall openapi-generator && brew install --HEAD openapi-generator`
+To install OpenJDK (pre-requisites), please run
+```sh
+brew cask install adoptopenjdk12
+export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home/
+```
+
+To install Maven, please run
+```sh
+brew install maven
+```
+
### [1.6 - Docker](#table-of-contents)
#### Public Pre-built Docker images
@@ -342,7 +361,7 @@ Right now: no solution for this one :|
#### Run Docker in Vagrant
Prerequisite: install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
```sh
-git clone http://github.com/openapitools/openapi-generator.git
+git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator
vagrant up
vagrant ssh
@@ -500,8 +519,8 @@ Please refer to [integration.md](docs/integration.md) on how to integrate OpenAP
Here are the public online services:
-- latest stable version: http://api.openapi-generator.tech
-- latest master: http://api-latest-master.openapi-generator.tech (updated with latest master every hour)
+- latest stable version: https://api.openapi-generator.tech
+- latest master: https://api-latest-master.openapi-generator.tech (updated with latest master every hour)
The server is sponsored by [Linode](https://www.linode.com/) [](https://www.linode.com/)
@@ -552,6 +571,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [TUI InfoTec GmbH](http://www.tui-infotec.com/)
- [unblu inc.](https://www.unblu.com/)
- [Veamly](https://www.veamly.com/)
+- [WSO2](https://wso2.com/)
- [Xero](https://www.xero.com/)
- [Yelp](https://www.yelp.com/)
- [Zalando](https://www.zalando.com)
@@ -591,7 +611,12 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 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-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/)
+- 2019-06-28 [Codewind OpenAPI Tools](https://marketplace.eclipse.org/content/codewind-openapi-tools) in [Eclipse Marketplace](https://marketplace.eclipse.org/) by IBM
+- 2019-06-29 [Codewind OpenAPI Tools](https://marketplace.visualstudio.com/items?itemName=IBM.codewind-openapi-tools) in [Visual Studio Marketplace](https://marketplace.visualstudio.com/) by IBM
- 2019-07-04 - [REST API のためのコード生成入門 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328), [中野暁人](https://github.com/ackintosh), [和田拓朗](https://github.com/taxpon)
+- 2019-07-08 - [OpenAPI Generator にコントリビュートしたら社名が載った話。(CAM) - CAM TECH BLOG](https://tech.cam-inc.co.jp/entry/2019/07/08/140000) by [CAM, Inc.](https://www.cam-inc.co.jp/)
+- 2019-07-14 - [OpenAPI GeneratorでPythonのクライアントライブラリを作成した](https://qiita.com/yuji38kwmt/items/dfb929316a1335a161c0) by [yuji38kwmt](https://qiita.com/yuji38kwmt)
+- 2019-07-19 - [Developer Experience (DX) for Open-Source Projects: How to Engage Developers and Build a Growing Developer Community](https://speakerdeck.com/wing328/developer-experience-dx-for-open-source-projects-english-japanese) by [William Cheng](https://twitter.com/wing328), [中野暁人](https://github.com/ackintosh) at [Open Source Summit Japan 2019](https://events.linuxfoundation.org/events/open-source-summit-japan-2019/)
## [6 - About Us](#table-of-contents)
@@ -768,7 +793,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Elm | @eriktim (2018/09) |
| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) |
| F# | @nmfisher (2019/05) |
-| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09 |
+| Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09) @bkabrda (2019/07) |
| GraphQL | @renepardon (2018/12) |
| Groovy | |
| Haskell | |
@@ -856,7 +881,7 @@ Copyright 2018 SmartBear Software
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 [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
+You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/bin/go-experimental-petstore.sh b/bin/go-experimental-petstore.sh
index d4eabb177c..ea7d839795 100755
--- a/bin/go-experimental-petstore.sh
+++ b/bin/go-experimental-petstore.sh
@@ -34,6 +34,6 @@ rm -rf $STUB_DIR
# 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/$GENERATOR -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/$GENERATOR -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh
index b51ecebf17..d0beeb353c 100755
--- a/bin/java-petstore-all.sh
+++ b/bin/java-petstore-all.sh
@@ -7,6 +7,7 @@
./bin/java-petstore-feign-10x.sh
./bin/java-petstore-okhttp-gson.sh
./bin/java-petstore-okhttp-gson-parcelable.sh
+./bin/java-petstore-native.sh
./bin/java-petstore-retrofit.sh
./bin/java-petstore-retrofit2.sh
./bin/java-petstore-retrofit2rx.sh
diff --git a/bin/java-petstore-jersey1.sh b/bin/java-petstore-jersey1.sh
index cb6e0ea3a6..75a399b476 100755
--- a/bin/java-petstore-jersey1.sh
+++ b/bin/java-petstore-jersey1.sh
@@ -27,7 +27,7 @@ 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 --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true $@"
+ags="generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 $@"
echo "Removing files and folders under samples/client/petstore/java/jersey1/src/main"
rm -rf samples/client/petstore/java/jersey1/src/main
diff --git a/bin/java-petstore-jersey2.json b/bin/java-petstore-jersey2.json
index e5d741be32..79ed4cbc2e 100644
--- a/bin/java-petstore-jersey2.json
+++ b/bin/java-petstore-jersey2.json
@@ -1,7 +1,4 @@
{
"library": "jersey2",
- "artifactId": "petstore-jersey2",
- "additionalProperties" : {
- "useNullForUnknownEnumValue" : true
- }
+ "artifactId": "petstore-jersey2"
}
diff --git a/bin/java-petstore-native.json b/bin/java-petstore-native.json
new file mode 100644
index 0000000000..b5642e5b53
--- /dev/null
+++ b/bin/java-petstore-native.json
@@ -0,0 +1,4 @@
+{
+ "library": "native",
+ "artifactId": "petstore-native"
+}
diff --git a/bin/java-petstore-native.sh b/bin/java-petstore-native.sh
new file mode 100755
index 0000000000..d155429a3a
--- /dev/null
+++ b/bin/java-petstore-native.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 -B clean package
+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/Java/libraries/native -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-native.json -o samples/client/petstore/java/native --additional-properties hideGenerationTimestamp=true $@"
+
+echo "Removing files and folders under samples/client/petstore/java/httpclient/src/main"
+rm -rf samples/client/petstore/java/native/src/main
+find samples/client/petstore/java/native -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/swift4-petstore-objcCompatible.sh b/bin/swift4-petstore-objcCompatible.sh
index 1cec3c94b8..655d718fce 100755
--- a/bin/swift4-petstore-objcCompatible.sh
+++ b/bin/swift4-petstore-objcCompatible.sh
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-objcCompatible.json -o samples/client/petstore/swift4/objcCompatible $@"
java $JAVA_OPTS -jar $executable $ags
+
+if type "xcodegen" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/objcCompatible
+ xcodegen generate
+fi
+
+if type "swiftlint" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/objcCompatible
+ swiftlint autocorrect
+fi
\ No newline at end of file
diff --git a/bin/swift4-petstore-promisekit.sh b/bin/swift4-petstore-promisekit.sh
index 69c3836406..6fc3975d9d 100755
--- a/bin/swift4-petstore-promisekit.sh
+++ b/bin/swift4-petstore-promisekit.sh
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-promisekit.json -o samples/client/petstore/swift4/promisekit --generate-alias-as-model $@"
java $JAVA_OPTS -jar $executable $ags
+
+if type "xcodegen" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/promisekit
+ xcodegen generate
+fi
+
+if type "swiftlint" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/promisekit
+ swiftlint autocorrect
+fi
\ No newline at end of file
diff --git a/bin/swift4-petstore-rxswift.sh b/bin/swift4-petstore-rxswift.sh
index 3a50fbf823..80d2cee49a 100755
--- a/bin/swift4-petstore-rxswift.sh
+++ b/bin/swift4-petstore-rxswift.sh
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-rxswift.json -o samples/client/petstore/swift4/rxswift --generate-alias-as-model $@"
java $JAVA_OPTS -jar $executable $ags
+
+if type "xcodegen" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/rxswift
+ xcodegen generate
+fi
+
+if type "swiftlint" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/rxswift
+ swiftlint autocorrect
+fi
\ No newline at end of file
diff --git a/bin/swift4-petstore-unwrapRequired.sh b/bin/swift4-petstore-unwrapRequired.sh
index 7332dcd2ea..500ee6fbd1 100755
--- a/bin/swift4-petstore-unwrapRequired.sh
+++ b/bin/swift4-petstore-unwrapRequired.sh
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-unwrapRequired.json -o samples/client/petstore/swift4/unwrapRequired --generate-alias-as-model $@"
java $JAVA_OPTS -jar $executable $ags
+
+if type "xcodegen" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/unwrapRequired
+ xcodegen generate
+fi
+
+if type "swiftlint" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/unwrapRequired
+ swiftlint autocorrect
+fi
\ No newline at end of file
diff --git a/bin/swift4-petstore.sh b/bin/swift4-petstore.sh
index a99d4d69b1..9057c1ee23 100755
--- a/bin/swift4-petstore.sh
+++ b/bin/swift4-petstore.sh
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore.json -o samples/client/petstore/swift4/default --generate-alias-as-model $@"
java $JAVA_OPTS -jar $executable $ags
+
+if type "xcodegen" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/default
+ xcodegen generate
+fi
+
+if type "swiftlint" > /dev/null 2>&1; then
+ cd samples/client/petstore/swift4/default
+ swiftlint autocorrect
+fi
diff --git a/bin/swift4-test.sh b/bin/swift4-test.sh
index f43bd6e278..7bced643c4 100755
--- a/bin/swift4-test.sh
+++ b/bin/swift4-test.sh
@@ -30,3 +30,13 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift4Test.json -g swift4 -c ./bin/swift4-test.json -o samples/client/test/swift4/default $@"
java $JAVA_OPTS -jar $executable $ags
+
+if type "xcodegen" > /dev/null 2>&1; then
+ cd samples/client/test/swift4/default
+ xcodegen generate
+fi
+
+if type "swiftlint" > /dev/null 2>&1; then
+ cd samples/client/test/swift4/default
+ swiftlint autocorrect
+fi
diff --git a/bin/typescript-fetch-petstore-all.sh b/bin/typescript-fetch-petstore-all.sh
index 27cd5f104b..5611d4c6eb 100755
--- a/bin/typescript-fetch-petstore-all.sh
+++ b/bin/typescript-fetch-petstore-all.sh
@@ -4,3 +4,4 @@
./bin/typescript-fetch-petstore-with-npm-version.sh
./bin/typescript-fetch-petstore-interfaces.sh
./bin/typescript-fetch-petstore.sh
+./bin/typescript-fetch-petstore-multiple-parameters.sh
\ No newline at end of file
diff --git a/bin/typescript-fetch-petstore-multiple-parameters.json b/bin/typescript-fetch-petstore-multiple-parameters.json
new file mode 100644
index 0000000000..c165a82a50
--- /dev/null
+++ b/bin/typescript-fetch-petstore-multiple-parameters.json
@@ -0,0 +1,4 @@
+{
+ "snapshot" : false,
+ "useSingleRequestParameter": false
+}
\ No newline at end of file
diff --git a/bin/typescript-fetch-petstore-multiple-parameters.sh b/bin/typescript-fetch-petstore-multiple-parameters.sh
new file mode 100755
index 0000000000..6dfa018ef3
--- /dev/null
+++ b/bin/typescript-fetch-petstore-multiple-parameters.sh
@@ -0,0 +1,34 @@
+#!/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 -B clean package
+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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-multiple-parameters.json -o samples/client/petstore/typescript-fetch/builds/multiple-parameters $@"
+
+java $JAVA_OPTS -jar $executable $ags
+cp CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml samples/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml
+cp CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml samples/client/petstore/typescript-fetch/tests/default/pom.xml
\ No newline at end of file
diff --git a/bin/windows/java-petstore-all.bat b/bin/windows/java-petstore-all.bat
index 9c65d3375c..dd357cfd56 100644
--- a/bin/windows/java-petstore-all.bat
+++ b/bin/windows/java-petstore-all.bat
@@ -2,6 +2,7 @@ call .\bin\windows\java-petstore-jersey1.bat
call .\bin\windows\java-petstore-jersey2.bat
call .\bin\windows\java-petstore-feign.bat
call .\bin\windows\java-petstore-feign-10x.bat
+call .\bin\windows\java-petstore-native.bat
call .\bin\windows\java-petstore-okhttp-gson.bat
call .\bin\windows\java-petstore-okhttp-gson-parcelable.bat
call .\bin\windows\java-petstore-retrofit.bat
diff --git a/bin/windows/java-petstore-native.bat b/bin/windows/java-petstore-native.bat
new file mode 100644
index 0000000000..e7301e9067
--- /dev/null
+++ b/bin/windows/java-petstore-native.bat
@@ -0,0 +1,10 @@
+set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
+set ags=generate -t modules\openapi-generator\src\main\resources\Java\libraries\native -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-native.json -o samples\client\petstore\java\native --additional-properties hideGenerationTimestamp=true
+
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/typescript-fetch-petstore-all.bat b/bin/windows/typescript-fetch-petstore-all.bat
index 69af38cf6a..c07605f175 100644
--- a/bin/windows/typescript-fetch-petstore-all.bat
+++ b/bin/windows/typescript-fetch-petstore-all.bat
@@ -4,3 +4,4 @@ call bin\windows\typescript-fetch-petstore.bat
call bin\windows\typescript-fetch-petstore-target-es6.bat
call bin\windows\typescript-fetch-petstore-with-npm-version.bat
call bin\windows\typescript-fetch-petstore-interfaces.bat
+call bin\windows\typescript-fetch-petstore-multiple-parameters.bat
diff --git a/bin/windows/typescript-fetch-petstore-multiple-parameters.bat b/bin/windows/typescript-fetch-petstore-multiple-parameters.bat
new file mode 100644
index 0000000000..095fdb3e5d
--- /dev/null
+++ b/bin/windows/typescript-fetch-petstore-multiple-parameters.bat
@@ -0,0 +1,12 @@
+@ECHO OFF
+
+set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -c bin\typescript-fetch-petstore-multiple-parameters.json -o samples\client\petstore\typescript-fetch\builds\multiple-parameters
+
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 4decc3de64..3b993a1be3 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -19,7 +19,7 @@ if [[ -f "${codegen}" && -n "$(java ${JAVA_OPTS} -jar "${codegen}" completion |
command=$1
shift
exec java ${JAVA_OPTS} -jar "${codegen}" "${command}" "$@"
-elif [[ -n "$(echo commands | tr ',' '\n' | grep "^$1\$" )" ]]; then
+elif [[ -n "$(echo $commands | tr ',' '\n' | grep "^$1\$" )" ]]; then
# If CLI jar does not exist, and $1 is a known CLI command, build the CLI jar and run that command.
if [[ ! -f "${codegen}" ]]; then
(cd "${GEN_DIR}" && exec mvn -am -pl "modules/openapi-generator-cli" -Duser.home=$(dirname $MAVEN_CONFIG) package)
diff --git a/docs/debugging.md b/docs/debugging.md
index 99c47c658e..783a6012be 100644
--- a/docs/debugging.md
+++ b/docs/debugging.md
@@ -62,3 +62,26 @@ The steps are shown here for a specific version of the generator, but apply the
Listening for transport dt_socket at address: 5005
```
* Set breakpoints in code, and then attach your remote debugger from your IDE (see above). The generator will automatically unblock once the remote debugger is attached. You can now step through the code.
+
+## Logs
+
+You can try to enable debugging log with `-Dlog.level=debug` option to the `JAVA_OPTS` environment variable to see more information:
+
+```bash
+export JAVA_OPTS="${JAVA_OPTS} -Dlog.level=debug"
+```
+
+Set the option then DEBUG logs are printed out:
+
+```bash
+openapi-generator generate -g go ...
+
+...
+...
+[main] DEBUG o.o.codegen.DefaultCodegen - debugging fromProperty for files : class Schema {
+ type: null
+ format: null
+ $ref: #/components/schemas/File
+...
+...
+```
diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md
index 8c72f0bedd..fb3cd18844 100644
--- a/docs/generators/cpp-qt5-client.md
+++ b/docs/generators/cpp-qt5-client.md
@@ -12,5 +12,5 @@ sidebar_label: cpp-qt5-client
|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|
|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
-|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
+|modelNamePrefix|Prefix that will be prepended to all model names.| |OAI|
|optionalProjectFile|Generate client.pri.| |true|
diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md
index 364066a0d8..171c325638 100644
--- a/docs/generators/cpp-qt5-qhttpengine-server.md
+++ b/docs/generators/cpp-qt5-qhttpengine-server.md
@@ -12,4 +12,4 @@ sidebar_label: cpp-qt5-qhttpengine-server
|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|
|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
-|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
+|modelNamePrefix|Prefix that will be prepended to all model names.| |OAI|
diff --git a/docs/generators/java.md b/docs/generators/java.md
index bb4b92d6ff..84b9056b7a 100644
--- a/docs/generators/java.md
+++ b/docs/generators/java.md
@@ -55,4 +55,4 @@ sidebar_label: java
|feignVersion|Version of OpenFeign: '10.x', '9.x' (default)| |false|
|useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false|
|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive. Available on okhttp-gson, jersey2 libraries| |false|
-|library|library template (sub-template) to use|
**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 : 4.x. JSON processing: Gson 2.x. Only for Java8 |okhttp-gson|
+|library|library template (sub-template) to use|**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 : 4.x. JSON processing: Gson 2.x. Only for Java8 **native** HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+ |okhttp-gson|
diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md
index ae4443c496..78d31c8573 100644
--- a/docs/generators/jaxrs-cxf-cdi.md
+++ b/docs/generators/jaxrs-cxf-cdi.md
@@ -51,4 +51,5 @@ sidebar_label: jaxrs-cxf-cdi
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false|
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
+|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null|
|useBeanValidation|Use BeanValidation API annotations| |true|
diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md
index 9ea4207189..8d338ebfef 100644
--- a/docs/generators/jaxrs-spec.md
+++ b/docs/generators/jaxrs-spec.md
@@ -51,3 +51,4 @@ sidebar_label: jaxrs-spec
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false|
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
+|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null|
diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md
index 6aaa4d1017..e7b3a46bf6 100644
--- a/docs/generators/scala-play-server.md
+++ b/docs/generators/scala-play-server.md
@@ -15,7 +15,7 @@ sidebar_label: scala-play-server
|apiPackage|package for generated api classes| |null|
|sourceFolder|source folder for generated code| |null|
|routesFileName|Name of the routes file to generate.| |routes|
-|routesFileName|Base package in which supporting classes are generated.| |org.openapitools|
+|basePackage|Base package in which supporting classes are generated.| |org.openapitools|
|skipStubs|If set, skips generation of stub classes.| |false|
|supportAsync|If set, wraps API return types with Futures and generates async actions.| |false|
|generateCustomExceptions|If set, generates custom exception types.| |true|
diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md
index 1ccb820eee..af45a95161 100644
--- a/docs/generators/typescript-fetch.md
+++ b/docs/generators/typescript-fetch.md
@@ -18,3 +18,4 @@ sidebar_label: typescript-fetch
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
+|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java
index 8453c1c905..71716ba25c 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java
@@ -19,6 +19,7 @@ package org.openapitools.codegen;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.parser.core.models.AuthorizationValue;
+
import org.openapitools.codegen.auth.AuthParser;
import java.util.List;
@@ -64,6 +65,10 @@ public class ClientOptInput {
return config;
}
+ /**
+ * @deprecated use {@link #config(CodegenConfig)} instead
+ * @param config codegen config
+ */
@Deprecated
public void setConfig(CodegenConfig config) {
this.config = config;
@@ -74,6 +79,10 @@ public class ClientOptInput {
return openAPI;
}
+ /**
+ * @deprecated use {@link #openAPI(OpenAPI)} instead
+ * @param openAPI the specification
+ */
@Deprecated
public void setOpenAPI(OpenAPI openAPI) {
this.openAPI = openAPI;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
index 02ec63ec5b..50f35eff4b 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
@@ -203,10 +203,10 @@ public class CodegenConstants {
public static final String ENUM_PROPERTY_NAMING_DESC = "Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'";
public static final String MODEL_NAME_PREFIX = "modelNamePrefix";
- public static final String MODEL_NAME_PREFIX_DESC = "Prefix that will be prepended to all model names. Default is the empty string.";
+ public static final String MODEL_NAME_PREFIX_DESC = "Prefix that will be prepended to all model names.";
public static final String MODEL_NAME_SUFFIX = "modelNameSuffix";
- public static final String MODEL_NAME_SUFFIX_DESC = "Suffix that will be appended to all model names. Default is the empty string.";
+ public static final String MODEL_NAME_SUFFIX_DESC = "Suffix that will be appended to all model names.";
public static final String GIT_USER_ID = "gitUserId";
public static final String GIT_USER_ID_DESC = "Git user ID, e.g. openapitools.";
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
index 760033ec35..8f5c6d2b16 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
@@ -46,7 +46,7 @@ public class CodegenModel {
public String defaultValue;
public String arrayModelType;
public boolean isAlias; // Is this effectively an alias of another simple type
- public boolean isString, isInteger;
+ public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble;
public List vars = new ArrayList(); // all properties (without parent's properties)
public List allVars = new ArrayList(); // all properties (with parent's properties)
public List requiredVars = new ArrayList(); // a list of required properties
@@ -61,7 +61,7 @@ public class CodegenModel {
public Set allMandatory = new TreeSet(); // with parent's required properties
public Set imports = new TreeSet();
- public boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum, hasRequired, hasOptional, isArrayModel, hasChildren, isMapModel;
+ public boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum, isNullable, hasRequired, hasOptional, isArrayModel, hasChildren, isMapModel;
public boolean hasOnlyReadOnly = true; // true if all properties are read-only
public ExternalDocumentation externalDocumentation;
@@ -96,7 +96,12 @@ public class CodegenModel {
.append("arrayModelType", arrayModelType)
.append("isAlias", isAlias)
.append("isString", isString)
+ .append("isNumeric", isNumeric)
.append("isInteger", isInteger)
+ .append("isLong", isLong)
+ .append("isNumber", isNumber)
+ .append("isFloat", isFloat)
+ .append("isDouble", isDouble)
.append("vars", vars)
.append("requiredVars", requiredVars)
.append("optionalVars", optionalVars)
@@ -113,6 +118,7 @@ public class CodegenModel {
.append("hasMoreModels", hasMoreModels)
.append("hasEnums", hasEnums)
.append("isEnum", isEnum)
+ .append("isNullable", isEnum)
.append("hasRequired", hasRequired)
.append("hasOptional", hasOptional)
.append("isArrayModel", isArrayModel)
@@ -133,86 +139,86 @@ public class CodegenModel {
CodegenModel that = (CodegenModel) o;
return Objects.equals(parent, that.parent) &&
- Objects.equals(parentSchema, that.parentSchema) &&
- Objects.equals(interfaces, that.interfaces) &&
- Objects.equals(allParents, that.allParents) &&
- Objects.equals(parentModel, that.parentModel) &&
- Objects.equals(interfaceModels, that.interfaceModels) &&
- Objects.equals(name, that.name) &&
- Objects.equals(classname, that.classname) &&
- Objects.equals(title, that.title) &&
- Objects.equals(description, that.description) &&
- Objects.equals(classVarName, that.classVarName) &&
- Objects.equals(modelJson, that.modelJson) &&
- Objects.equals(dataType, that.dataType) &&
- Objects.equals(xmlPrefix, that.xmlPrefix) &&
- Objects.equals(xmlNamespace, that.xmlNamespace) &&
- Objects.equals(xmlName, that.xmlName) &&
- Objects.equals(classFilename, that.classFilename) &&
- Objects.equals(unescapedDescription, that.unescapedDescription) &&
- Objects.equals(discriminator, that.discriminator) &&
- Objects.equals(defaultValue, that.defaultValue) &&
- Objects.equals(vars, that.vars) &&
- Objects.equals(requiredVars, that.requiredVars) &&
- Objects.equals(optionalVars, that.optionalVars) &&
- Objects.equals(allVars, that.allVars) &&
- Objects.equals(allowableValues, that.allowableValues) &&
- Objects.equals(mandatory, that.mandatory) &&
- Objects.equals(allMandatory, that.allMandatory) &&
- Objects.equals(imports, that.imports) &&
- Objects.equals(hasVars, that.hasVars) &&
- Objects.equals(emptyVars, that.emptyVars) &&
- Objects.equals(hasMoreModels, that.hasMoreModels) &&
- Objects.equals(hasEnums, that.hasEnums) &&
- Objects.equals(isEnum, that.isEnum) &&
- Objects.equals(externalDocumentation, that.externalDocumentation) &&
- Objects.equals(hasOnlyReadOnly, that.hasOnlyReadOnly) &&
- Objects.equals(hasChildren, that.hasChildren) &&
- Objects.equals(parentVars, that.parentVars) &&
- Objects.equals(vendorExtensions, that.vendorExtensions);
+ Objects.equals(parentSchema, that.parentSchema) &&
+ Objects.equals(interfaces, that.interfaces) &&
+ Objects.equals(allParents, that.allParents) &&
+ Objects.equals(parentModel, that.parentModel) &&
+ Objects.equals(interfaceModels, that.interfaceModels) &&
+ Objects.equals(name, that.name) &&
+ Objects.equals(classname, that.classname) &&
+ Objects.equals(title, that.title) &&
+ Objects.equals(description, that.description) &&
+ Objects.equals(classVarName, that.classVarName) &&
+ Objects.equals(modelJson, that.modelJson) &&
+ Objects.equals(dataType, that.dataType) &&
+ Objects.equals(xmlPrefix, that.xmlPrefix) &&
+ Objects.equals(xmlNamespace, that.xmlNamespace) &&
+ Objects.equals(xmlName, that.xmlName) &&
+ Objects.equals(classFilename, that.classFilename) &&
+ Objects.equals(unescapedDescription, that.unescapedDescription) &&
+ Objects.equals(discriminator, that.discriminator) &&
+ Objects.equals(defaultValue, that.defaultValue) &&
+ Objects.equals(vars, that.vars) &&
+ Objects.equals(requiredVars, that.requiredVars) &&
+ Objects.equals(optionalVars, that.optionalVars) &&
+ Objects.equals(allVars, that.allVars) &&
+ Objects.equals(allowableValues, that.allowableValues) &&
+ Objects.equals(mandatory, that.mandatory) &&
+ Objects.equals(allMandatory, that.allMandatory) &&
+ Objects.equals(imports, that.imports) &&
+ Objects.equals(hasVars, that.hasVars) &&
+ Objects.equals(emptyVars, that.emptyVars) &&
+ Objects.equals(hasMoreModels, that.hasMoreModels) &&
+ Objects.equals(hasEnums, that.hasEnums) &&
+ Objects.equals(isEnum, that.isEnum) &&
+ Objects.equals(externalDocumentation, that.externalDocumentation) &&
+ Objects.equals(hasOnlyReadOnly, that.hasOnlyReadOnly) &&
+ Objects.equals(hasChildren, that.hasChildren) &&
+ Objects.equals(parentVars, that.parentVars) &&
+ Objects.equals(vendorExtensions, that.vendorExtensions);
}
@Override
public int hashCode() {
return Objects.hash(
- parent,
- parentSchema,
- interfaces,
- allParents,
- parentModel,
- interfaceModels,
- name,
- classname,
- title,
- description,
- classVarName,
- modelJson,
- dataType,
- xmlPrefix,
- xmlNamespace,
- xmlName,
- classFilename,
- unescapedDescription,
- discriminator,
- defaultValue,
- vars,
- requiredVars,
- optionalVars,
- allVars,
- allowableValues,
- mandatory,
- allMandatory,
- imports,
- hasVars,
- emptyVars,
- hasMoreModels,
- hasEnums,
- isEnum,
- externalDocumentation,
- vendorExtensions,
- hasOnlyReadOnly,
- hasChildren,
- parentVars);
+ parent,
+ parentSchema,
+ interfaces,
+ allParents,
+ parentModel,
+ interfaceModels,
+ name,
+ classname,
+ title,
+ description,
+ classVarName,
+ modelJson,
+ dataType,
+ xmlPrefix,
+ xmlNamespace,
+ xmlName,
+ classFilename,
+ unescapedDescription,
+ discriminator,
+ defaultValue,
+ vars,
+ requiredVars,
+ optionalVars,
+ allVars,
+ allowableValues,
+ mandatory,
+ allMandatory,
+ imports,
+ hasVars,
+ emptyVars,
+ hasMoreModels,
+ hasEnums,
+ isEnum,
+ externalDocumentation,
+ vendorExtensions,
+ hasOnlyReadOnly,
+ hasChildren,
+ parentVars);
}
public String getParent() {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index 5373b99e93..39415e2698 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -19,7 +19,11 @@ package org.openapitools.codegen;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.base.CaseFormat;
+import com.google.common.collect.ImmutableMap;
+import com.samskivert.mustache.Mustache;
import com.samskivert.mustache.Mustache.Compiler;
+import com.samskivert.mustache.Mustache.Lambda;
+
import io.swagger.v3.core.util.Json;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
@@ -48,6 +52,11 @@ import org.openapitools.codegen.meta.GeneratorMetadata;
import org.openapitools.codegen.meta.Stability;
import org.openapitools.codegen.serializer.SerializerUtils;
import org.openapitools.codegen.templating.MustacheEngineAdapter;
+import org.openapitools.codegen.templating.mustache.CamelCaseLambda;
+import org.openapitools.codegen.templating.mustache.IndentedLambda;
+import org.openapitools.codegen.templating.mustache.LowercaseLambda;
+import org.openapitools.codegen.templating.mustache.TitlecaseLambda;
+import org.openapitools.codegen.templating.mustache.UppercaseLambda;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -199,6 +208,47 @@ public class DefaultCodegen implements CodegenConfig {
}
}
+ /***
+ * Preset map builder with commonly used Mustache lambdas.
+ *
+ * To extend the map, override addMustacheLambdas(), call parent method
+ * first and then add additional lambdas to the returned builder.
+ *
+ * If common lambdas are not desired, override addMustacheLambdas() method
+ * and return empty builder.
+ *
+ * @return preinitialized map builder with common lambdas
+ */
+ protected ImmutableMap.Builder addMustacheLambdas() {
+
+ return new ImmutableMap.Builder()
+ .put("lowercase", new LowercaseLambda().generator(this))
+ .put("uppercase", new UppercaseLambda())
+ .put("titlecase", new TitlecaseLambda())
+ .put("camelcase", new CamelCaseLambda().generator(this))
+ .put("indented", new IndentedLambda())
+ .put("indented_8", new IndentedLambda(8, " "))
+ .put("indented_12", new IndentedLambda(12, " "))
+ .put("indented_16", new IndentedLambda(16, " "));
+ }
+
+ private void registerMustacheLambdas() {
+ ImmutableMap lambdas = addMustacheLambdas().build();
+
+ if (lambdas.size() == 0) {
+ return;
+ }
+
+ if (additionalProperties.containsKey("lambda")) {
+ LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'. " +
+ "You'll likely need to use a custom template, " +
+ "see https://github.com/OpenAPITools/openapi-generator/blob/master/docs/templating.md. ");
+ additionalProperties.put("_lambda", lambdas);
+ } else {
+ additionalProperties.put("lambda", lambdas);
+ }
+ }
+
// override with any special post-processing for all models
@SuppressWarnings({"static-method", "unchecked"})
public Map postProcessAllModels(Map objs) {
@@ -1060,6 +1110,9 @@ public class DefaultCodegen implements CodegenConfig {
// initialize special character mapping
initalizeSpecialCharacterMapping();
+
+ // Register common Mustache lambdas.
+ registerMustacheLambdas();
}
/**
@@ -1519,11 +1572,11 @@ public class DefaultCodegen implements CodegenConfig {
} else if (ModelUtils.isURISchema(schema)) {
return "URI";
} else if (ModelUtils.isStringSchema(schema)) {
- if(typeMapping.containsKey(schema.getFormat())) {
+ if (typeMapping.containsKey(schema.getFormat())) {
// If the format matches a typeMapping (supplied with the --typeMappings flag)
// then treat the format as a primitive type.
// This allows the typeMapping flag to add a new custom type which can then
- // be used in the format field.
+ // be used in the format field.
return schema.getFormat();
}
return "string";
@@ -1831,14 +1884,28 @@ public class DefaultCodegen implements CodegenConfig {
if (ModelUtils.isMapSchema(schema)) {
addAdditionPropertiesToCodeGenModel(m, schema);
m.isMapModel = true;
- }
- if (ModelUtils.isIntegerSchema(schema)) { // integer type
- if (!ModelUtils.isLongSchema(schema)) { // long type is not integer
+ } else if (ModelUtils.isIntegerSchema(schema)) { // integer type
+ m.isNumeric = Boolean.TRUE;
+ if (ModelUtils.isLongSchema(schema)) { // int64/long format
+ m.isLong = Boolean.TRUE;
+ } else { // int32 format
m.isInteger = Boolean.TRUE;
}
- }
- if (ModelUtils.isStringSchema(schema)) {
+ } else if (ModelUtils.isStringSchema(schema)) {
m.isString = Boolean.TRUE;
+ } else if (ModelUtils.isNumberSchema(schema)) {
+ m.isNumeric = Boolean.TRUE;
+ if (ModelUtils.isFloatSchema(schema)) { // float
+ m.isFloat = Boolean.TRUE;
+ } else if (ModelUtils.isDoubleSchema(schema)) { // double
+ m.isDouble = Boolean.TRUE;
+ } else { // type is number and without format
+ m.isNumber = Boolean.TRUE;
+ }
+ }
+
+ if (Boolean.TRUE.equals(schema.getNullable())) {
+ m.isNullable = Boolean.TRUE;
}
// passing null to allProperties and allRequired as there's no parent
@@ -2006,7 +2073,7 @@ public class DefaultCodegen implements CodegenConfig {
String type = getSchemaType(p);
if (ModelUtils.isIntegerSchema(p)) { // integer type
property.isNumeric = Boolean.TRUE;
- if (SchemaTypeUtil.INTEGER64_FORMAT.equals(p.getFormat())) { // int64/long format
+ if (ModelUtils.isLongSchema(p)) { // int64/long format
property.isLong = Boolean.TRUE;
} else { // int32 format
property.isInteger = Boolean.TRUE;
@@ -2584,7 +2651,7 @@ public class DefaultCodegen implements CodegenConfig {
if (requestBody != null) {
if (getContentType(requestBody) != null &&
(getContentType(requestBody).toLowerCase(Locale.ROOT).startsWith("application/x-www-form-urlencoded") ||
- getContentType(requestBody).toLowerCase(Locale.ROOT).startsWith("multipart/form-data"))) {
+ getContentType(requestBody).toLowerCase(Locale.ROOT).startsWith("multipart/form-data"))) {
// process form parameters
formParams = fromRequestBodyToFormParameters(requestBody, imports);
for (CodegenParameter cp : formParams) {
@@ -2952,7 +3019,7 @@ public class DefaultCodegen implements CodegenConfig {
}
Schema s;
- if(parameter.getSchema() != null) {
+ if (parameter.getSchema() != null) {
s = parameter.getSchema();
} else if (parameter.getContent() != null) {
Content content = parameter.getContent();
@@ -4876,7 +4943,7 @@ public class DefaultCodegen implements CodegenConfig {
}
protected void removeOption(String key) {
- for(int i = 0; i < cliOptions.size(); i++) {
+ for (int i = 0; i < cliOptions.size(); i++) {
if (key.equals(cliOptions.get(i).getOpt())) {
cliOptions.remove(i);
break;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java
index 4c251ffc4a..88f2a54898 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java
@@ -223,6 +223,7 @@ public class CodegenConfigurator {
}
public CodegenConfigurator setImportMappings(Map importMappings) {
+ this.importMappings = importMappings;
generatorSettingsBuilder.withImportMappings(importMappings);
return this;
}
@@ -234,6 +235,7 @@ public class CodegenConfigurator {
}
public CodegenConfigurator setInstantiationTypes(Map instantiationTypes) {
+ this.instantiationTypes = instantiationTypes;
generatorSettingsBuilder.withInstantiationTypes(instantiationTypes);
return this;
}
@@ -295,6 +297,7 @@ public class CodegenConfigurator {
}
public CodegenConfigurator setReservedWordsMappings(Map reservedWordMappings) {
+ this.reservedWordMappings = reservedWordMappings;
generatorSettingsBuilder.withReservedWordMappings(reservedWordMappings);
return this;
}
@@ -310,6 +313,7 @@ public class CodegenConfigurator {
}
public CodegenConfigurator setSystemProperties(Map systemProperties) {
+ this.systemProperties = systemProperties;
workflowSettingsBuilder.withSystemProperties(systemProperties);
return this;
}
@@ -326,6 +330,7 @@ public class CodegenConfigurator {
}
public CodegenConfigurator setTypeMappings(Map typeMappings) {
+ this.typeMappings = typeMappings;
generatorSettingsBuilder.withTypeMappings(typeMappings);
return this;
}
@@ -454,6 +459,12 @@ public class CodegenConfigurator {
config.reservedWordsMappings().putAll(generatorSettings.getReservedWordMappings());
config.additionalProperties().putAll(generatorSettings.getAdditionalProperties());
+ // any other additional properties?
+ String templateDir = workflowSettings.getTemplateDir();
+ if (templateDir != null) {
+ config.additionalProperties().put(CodegenConstants.TEMPLATE_DIR, workflowSettings.getTemplateDir());
+ }
+
ClientOptInput input = new ClientOptInput()
.config(config);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
index 1e7a454007..d39c6c07ab 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
@@ -17,8 +17,9 @@
package org.openapitools.codegen.languages;
-import com.google.common.collect.ImmutableMap;
-import com.samskivert.mustache.Mustache;
+import com.google.common.collect.ImmutableMap.Builder;
+import com.samskivert.mustache.Mustache.Lambda;
+
import io.swagger.v3.core.util.Json;
import io.swagger.v3.oas.models.media.ArraySchema;
import io.swagger.v3.oas.models.media.Schema;
@@ -359,32 +360,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
// This either updates additionalProperties with the above fixes, or sets the default if the option was not specified.
additionalProperties.put(CodegenConstants.INTERFACE_PREFIX, interfacePrefix);
-
- addMustacheLambdas(additionalProperties);
}
- private void addMustacheLambdas(Map objs) {
-
- Map lambdas = new ImmutableMap.Builder()
- .put("lowercase", new LowercaseLambda().generator(this))
- .put("uppercase", new UppercaseLambda())
- .put("titlecase", new TitlecaseLambda())
- .put("camelcase", new CamelCaseLambda().generator(this))
- .put("camelcase_param", new CamelCaseLambda().generator(this).escapeAsParamName(true))
- .put("indented", new IndentedLambda())
- .put("indented_8", new IndentedLambda(8, " "))
- .put("indented_12", new IndentedLambda(12, " "))
- .put("indented_16", new IndentedLambda(16, " "))
- .build();
-
- if (objs.containsKey("lambda")) {
- LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'. " +
- "You'll likely need to use a custom template, " +
- "see https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format. ");
- objs.put("_lambda", lambdas);
- } else {
- objs.put("lambda", lambdas);
- }
+ @Override
+ protected Builder addMustacheLambdas() {
+ return super.addMustacheLambdas()
+ .put("camelcase_param", new CamelCaseLambda().generator(this).escapeAsParamName(true));
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java
index 65105e467a..afbbae6684 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java
@@ -17,8 +17,8 @@
package org.openapitools.codegen.languages;
-import com.google.common.collect.ImmutableMap;
-import com.samskivert.mustache.Mustache;
+import com.google.common.collect.ImmutableMap.Builder;
+import com.samskivert.mustache.Mustache.Lambda;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.media.Schema;
@@ -35,7 +35,6 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.net.URL;
import java.util.Arrays;
-import java.util.Map;
abstract public class AbstractCppCodegen extends DefaultCodegen implements CodegenConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCppCodegen.class);
@@ -260,22 +259,12 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg
LOGGER.info("Environment variable CPP_POST_PROCESS_FILE not defined so the C++ code may not be properly formatted. To define it, try 'export CPP_POST_PROCESS_FILE=\"/usr/local/bin/clang-format -i\"' (Linux/Mac)");
LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).");
}
-
- addMustacheLambdas(additionalProperties);
}
- private void addMustacheLambdas(Map objs) {
-
- Map lambdas = new ImmutableMap.Builder()
- .put("multiline_comment_4", new IndentedLambda(4, " ", "///"))
- .build();
-
- if (objs.containsKey("lambda")) {
- LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'.");
- objs.put("_lambda", lambdas);
- } else {
- objs.put("lambda", lambdas);
- }
+ @Override
+ protected Builder addMustacheLambdas() {
+ return super.addMustacheLambdas()
+ .put("multiline_comment_4", new IndentedLambda(4, " ", "///"));
}
@Override
@@ -304,17 +293,17 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg
}
}
}
-
+
@Override
public void preprocessOpenAPI(OpenAPI openAPI) {
URL url = URLPathUtils.getServerURL(openAPI);
String port = URLPathUtils.getPort(url, "");
String host = url.getHost();
if(!port.isEmpty()) {
- this.additionalProperties.put("serverPort", port);
+ this.additionalProperties.put("serverPort", port);
}
if(!host.isEmpty()) {
- this.additionalProperties.put("serverHost", host);
- }
+ this.additionalProperties.put("serverHost", host);
+ }
}
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java
index 9d82448ffb..04a626eac7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java
@@ -16,8 +16,9 @@
package org.openapitools.codegen.languages;
-import com.google.common.collect.ImmutableMap;
-import com.samskivert.mustache.Mustache;
+import com.google.common.collect.ImmutableMap.Builder;
+import com.samskivert.mustache.Mustache.Lambda;
+
import io.swagger.v3.core.util.Json;
import io.swagger.v3.oas.models.media.ArraySchema;
import io.swagger.v3.oas.models.media.Schema;
@@ -67,7 +68,7 @@ public abstract class AbstractFSharpCodegen extends DefaultCodegen implements Co
protected Set collectionTypes;
protected Set mapTypes;
- // true if nullable types will be supported (as option)
+ // true if nullable types will be supported (as option)
protected boolean supportNullable = Boolean.TRUE;
protected Set nullableType = new HashSet();
@@ -329,32 +330,12 @@ public abstract class AbstractFSharpCodegen extends DefaultCodegen implements Co
// This either updates additionalProperties with the above fixes, or sets the default if the option was not specified.
additionalProperties.put(CodegenConstants.INTERFACE_PREFIX, interfacePrefix);
-
- addMustacheLambdas(additionalProperties);
}
- private void addMustacheLambdas(Map objs) {
-
- Map lambdas = new ImmutableMap.Builder()
- .put("lowercase", new LowercaseLambda().generator(this))
- .put("uppercase", new UppercaseLambda())
- .put("titlecase", new TitlecaseLambda())
- .put("camelcase", new CamelCaseLambda().generator(this))
- .put("camelcase_param", new CamelCaseLambda().generator(this).escapeAsParamName(true))
- .put("indented", new IndentedLambda())
- .put("indented_8", new IndentedLambda(8, " "))
- .put("indented_12", new IndentedLambda(12, " "))
- .put("indented_16", new IndentedLambda(16, " "))
- .build();
-
- if (objs.containsKey("lambda")) {
- LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'. " +
- "You'll likely need to use a custom template, " +
- "see https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format. ");
- objs.put("_lambda", lambdas);
- } else {
- objs.put("lambda", lambdas);
- }
+ @Override
+ protected Builder addMustacheLambdas() {
+ return super.addMustacheLambdas()
+ .put("camelcase_param", new CamelCaseLambda().generator(this).escapeAsParamName(true));
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
index 066f424bfa..2d7f3d2ce6 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
@@ -52,7 +52,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
public static final String SUPPORT_JAVA6 = "supportJava6";
public static final String DISABLE_HTML_ESCAPING = "disableHtmlEscaping";
public static final String BOOLEAN_GETTER_PREFIX = "booleanGetterPrefix";
- public static final String USE_NULL_FOR_UNKNOWN_ENUM_VALUE = "useNullForUnknownEnumValue";
protected String dateLibrary = "threetenbp";
protected boolean supportAsync = false;
@@ -86,7 +85,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
protected boolean supportJava6 = false;
protected boolean disableHtmlEscaping = false;
protected String booleanGetterPrefix = "get";
- protected boolean useNullForUnknownEnumValue = false;
protected String parentGroupId = "";
protected String parentArtifactId = "";
protected String parentVersion = "";
@@ -220,10 +218,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
this.setBooleanGetterPrefix(additionalProperties.get(BOOLEAN_GETTER_PREFIX).toString());
}
additionalProperties.put(BOOLEAN_GETTER_PREFIX, booleanGetterPrefix);
- if (additionalProperties.containsKey(USE_NULL_FOR_UNKNOWN_ENUM_VALUE)) {
- this.setUseNullForUnknownEnumValue(Boolean.valueOf(additionalProperties.get(USE_NULL_FOR_UNKNOWN_ENUM_VALUE).toString()));
- }
- additionalProperties.put(USE_NULL_FOR_UNKNOWN_ENUM_VALUE, useNullForUnknownEnumValue);
if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) {
this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
@@ -417,6 +411,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
// imports for pojos
importMapping.put("ApiModelProperty", "io.swagger.annotations.ApiModelProperty");
importMapping.put("ApiModel", "io.swagger.annotations.ApiModel");
+ importMapping.put("BigDecimal", "java.math.BigDecimal");
importMapping.put("JsonProperty", "com.fasterxml.jackson.annotation.JsonProperty");
importMapping.put("JsonSubTypes", "com.fasterxml.jackson.annotation.JsonSubTypes");
importMapping.put("JsonTypeInfo", "com.fasterxml.jackson.annotation.JsonTypeInfo");
@@ -585,6 +580,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
name = "_u";
}
+ // numbers are not allowed at the beginning
+ if (name.matches("^\\d.*")) {
+ name = "_" + name;
+ }
+
// if it's all uppper case, do nothing
if (name.matches("^[A-Z0-9_]*$")) {
return name;
@@ -944,6 +944,9 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
final CodegenModel parentCodegenModel = super.fromModel(codegenModel.parent, parentModel);
codegenModel = AbstractJavaCodegen.reconcileInlineEnums(codegenModel, parentCodegenModel);
}
+ if ("BigDecimal".equals(codegenModel.dataType)) {
+ codegenModel.imports.add("BigDecimal");
+ }
return codegenModel;
}
@@ -1107,7 +1110,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
// number
if ("Integer".equals(datatype) || "Long".equals(datatype) ||
- "Float".equals(datatype) || "Double".equals(datatype)) {
+ "Float".equals(datatype) || "Double".equals(datatype) || "BigDecimal".equals(datatype)) {
String varName = "NUMBER_" + value;
varName = varName.replaceAll("-", "MINUS_");
varName = varName.replaceAll("\\+", "PLUS_");
@@ -1134,6 +1137,9 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
} else if ("Float".equals(datatype)) {
// add f to number, e.g. 3.14 => 3.14f
return value + "f";
+ } else if ("BigDecimal".equals(datatype)) {
+ // use BigDecimal String constructor
+ return "new BigDecimal(\"" + value + "\")";
} else {
return "\"" + escapeText(value) + "\"";
}
@@ -1393,10 +1399,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
this.booleanGetterPrefix = booleanGetterPrefix;
}
- public void setUseNullForUnknownEnumValue(boolean useNullForUnknownEnumValue) {
- this.useNullForUnknownEnumValue = useNullForUnknownEnumValue;
- }
-
@Override
public String escapeQuotationMark(String input) {
// remove " to avoid code injection
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java
index 7dcd055d9a..cfaac199a1 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java
@@ -5,6 +5,7 @@ import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.CodegenConfig;
+import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenParameter;
@@ -34,6 +35,7 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen
}
// CLI options
addOption(CPP_NAMESPACE, CPP_NAMESPACE_DESC, this.cppNamespace);
+ addOption(CodegenConstants.MODEL_NAME_PREFIX, CodegenConstants.MODEL_NAME_PREFIX_DESC, this.modelNamePrefix);
/*
* Additional Properties. These values can be passed to the templates and
@@ -45,9 +47,7 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen
// Write defaults namespace in properties so that it can be accessible in templates.
// At this point command line has not been parsed so if value is given
// in command line it will supersede this content
- additionalProperties.put("cppNamespace", cppNamespace);
- // CLI options
- addOption(CPP_NAMESPACE, CPP_NAMESPACE_DESC, this.cppNamespace);
+ additionalProperties.put("cppNamespace", cppNamespace);
/*
* Language Specific Primitives. These types will not trigger imports by
* the client generator
@@ -112,7 +112,9 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen
}
additionalProperties.put("cppNamespaceDeclarations", cppNamespace.split("\\::"));
+
if (additionalProperties.containsKey("modelNamePrefix")) {
+ modelNamePrefix = (String) additionalProperties.get("modelNamePrefix");
typeMapping.put("object", modelNamePrefix + "Object");
additionalProperties().put("prefix", modelNamePrefix);
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java
index 5e60619cd9..cc2516fee7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java
@@ -16,15 +16,12 @@
package org.openapitools.codegen.languages;
-import org.apache.commons.io.FilenameUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.media.*;
import org.apache.commons.lang3.StringUtils;
-import org.openapitools.codegen.*;
-import org.openapitools.codegen.utils.ModelUtils;
import org.openapitools.codegen.utils.ProcessUtils;
import java.io.File;
@@ -37,6 +34,8 @@ public class DartJaguarClientCodegen extends DartClientCodegen {
private static final String SERIALIZATION_FORMAT = "serialization";
private static final String IS_FORMAT_JSON = "jsonFormat";
private static final String IS_FORMAT_PROTO = "protoFormat";
+ private static final String CLIENT_NAME = "clientName";
+
private static Set modelToIgnore = new HashSet<>();
private HashMap protoTypeMapping = new HashMap<>();
@@ -141,6 +140,7 @@ public class DartJaguarClientCodegen extends DartClientCodegen {
//not set, use to be passed to template
additionalProperties.put(PUB_NAME, pubName);
}
+ additionalProperties.put(CLIENT_NAME, org.openapitools.codegen.utils.StringUtils.camelize(pubName));
if (additionalProperties.containsKey(PUB_VERSION)) {
this.setPubVersion((String) additionalProperties.get(PUB_VERSION));
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java
index 14148714e6..ff0aafe24c 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java
@@ -16,15 +16,23 @@
package org.openapitools.codegen.languages;
+import org.openapitools.codegen.CodegenModel;
+import org.openapitools.codegen.CodegenProperty;
+import org.openapitools.codegen.SupportingFile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.List;
+import java.util.Map;
+
public class GoClientExperimentalCodegen extends GoClientCodegen {
private static final Logger LOGGER = LoggerFactory.getLogger(GoClientExperimentalCodegen.class);
public GoClientExperimentalCodegen() {
super();
+ outputFolder = "generated-code/go-experimental";
+ embeddedTemplateDir = templateDir = "go-experimental";
}
/**
@@ -49,4 +57,35 @@ public class GoClientExperimentalCodegen extends GoClientCodegen {
return "Generates a Go client library (experimental and may subject to breaking changes without further notice).";
}
+ @Override
+ public void processOpts() {
+ super.processOpts();
+ supportingFiles.add(new SupportingFile("utils.mustache", "", "utils.go"));
+ }
+
+ @Override
+ public Map postProcessModels(Map objs) {
+ objs = super.postProcessModels(objs);
+ List> imports = (List>) objs.get("imports");
+
+ boolean addedErrorsImport = false;
+ List> models = (List>) objs.get("models");
+ for (Map m : models) {
+ Object v = m.get("model");
+ if (v instanceof CodegenModel) {
+ CodegenModel model = (CodegenModel) v;
+ if (!model.isEnum) {
+ imports.add(createMapping("import", "encoding/json"));
+ }
+ for (CodegenProperty param : model.vars) {
+ if (!addedErrorsImport && param.required) {
+ imports.add(createMapping("import", "errors"));
+ addedErrorsImport = true;
+ }
+ }
+ }
+ }
+
+ return objs;
+ }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
index 83938212fb..8f1a232f80 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
@@ -67,6 +67,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
public static final String GOOGLE_API_CLIENT = "google-api-client";
public static final String JERSEY1 = "jersey1";
public static final String JERSEY2 = "jersey2";
+ public static final String NATIVE = "native";
public static final String OKHTTP_GSON = "okhttp-gson";
public static final String RESTEASY = "resteasy";
public static final String RESTTEMPLATE = "resttemplate";
@@ -139,6 +140,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportedLibraries.put(VERTX, "HTTP client: VertX client 3.x. JSON processing: Jackson 2.8.x");
supportedLibraries.put(GOOGLE_API_CLIENT, "HTTP client: Google API client 1.x. JSON processing: Jackson 2.8.x");
supportedLibraries.put(REST_ASSURED, "HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x. Only for Java8");
+ supportedLibraries.put(NATIVE, "HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+");
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
libraryOption.setEnum(supportedLibraries);
@@ -166,7 +168,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
@Override
public void processOpts() {
- if (WEBCLIENT.equals(getLibrary()) && "threetenbp".equals(dateLibrary)) {
+ if ((WEBCLIENT.equals(getLibrary()) && "threetenbp".equals(dateLibrary)) || NATIVE.equals(getLibrary())) {
dateLibrary = "java8";
}
@@ -254,12 +256,12 @@ public class JavaClientCodegen extends AbstractJavaCodegen
writeOptional(outputFolder, new SupportingFile("manifest.mustache", projectFolder, "AndroidManifest.xml"));
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
supportingFiles.add(new SupportingFile("ApiClient.mustache", invokerFolder, "ApiClient.java"));
- if (!(RESTTEMPLATE.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()))) {
+ if (!(RESTTEMPLATE.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || NATIVE.equals(getLibrary()))) {
supportingFiles.add(new SupportingFile("StringUtil.mustache", invokerFolder, "StringUtil.java"));
}
// google-api-client doesn't use the OpenAPI auth, because it uses Google Credential directly (HttpRequestInitializer)
- if (!(GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()))) {
+ if (!(GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || NATIVE.equals(getLibrary()))) {
supportingFiles.add(new SupportingFile("auth/HttpBasicAuth.mustache", authFolder, "HttpBasicAuth.java"));
supportingFiles.add(new SupportingFile("auth/HttpBearerAuth.mustache", authFolder, "HttpBearerAuth.java"));
supportingFiles.add(new SupportingFile("auth/ApiKeyAuth.mustache", authFolder, "ApiKeyAuth.java"));
@@ -293,7 +295,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportingFiles.add(new SupportingFile("Pair.mustache", invokerFolder, "Pair.java"));
}
- if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || usesAnyRetrofitLibrary() || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()))) {
+ if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || usesAnyRetrofitLibrary() || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || NATIVE.equals(getLibrary()))) {
supportingFiles.add(new SupportingFile("auth/Authentication.mustache", authFolder, "Authentication.java"));
}
@@ -325,6 +327,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java"));
additionalProperties.put("jackson", "true");
+ } else if (NATIVE.equals(getLibrary())) {
+ setJava8Mode(true);
+ additionalProperties.put("java8", "true");
+ additionalProperties.put("jackson", "true");
} else if (RESTEASY.equals(getLibrary())) {
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
additionalProperties.put("jackson", "true");
@@ -412,7 +418,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
additionalProperties.remove("gson");
}
- if (additionalProperties.containsKey("jackson")) {
+ if (additionalProperties.containsKey("jackson") && !NATIVE.equals(getLibrary())) {
supportingFiles.add(new SupportingFile("RFC3339DateFormat.mustache", invokerFolder, "RFC3339DateFormat.java"));
if ("threetenbp".equals(dateLibrary) && !usePlayWS) {
supportingFiles.add(new SupportingFile("CustomInstantDeserializer.mustache", invokerFolder, "CustomInstantDeserializer.java"));
@@ -500,7 +506,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
}
// google-api-client doesn't use the OpenAPI auth, because it uses Google Credential directly (HttpRequestInitializer)
- if ((!(GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || usePlayWS)) && ProcessUtils.hasOAuthMethods(objs)) {
+ if ((!(GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || usePlayWS || NATIVE.equals(getLibrary()))) && ProcessUtils.hasOAuthMethods(objs)) {
supportingFiles.add(new SupportingFile("auth/OAuth.mustache", authFolder, "OAuth.java"));
supportingFiles.add(new SupportingFile("auth/OAuthFlow.mustache", authFolder, "OAuthFlow.java"));
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java
index 776915734a..8b7736fce3 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java
@@ -37,12 +37,14 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
public static final String GENERATE_POM = "generatePom";
public static final String USE_SWAGGER_ANNOTATIONS = "useSwaggerAnnotations";
public static final String JACKSON = "jackson";
+ public static final String OPEN_API_SPEC_FILE_LOCATION = "openApiSpecFileLocation";
private boolean interfaceOnly = false;
private boolean returnResponse = false;
private boolean generatePom = true;
private boolean useSwaggerAnnotations = true;
private boolean useJackson = false;
+ private String openApiSpecFileLocation = "src/main/openapi/openapi.yaml";
private String primaryResourceName;
@@ -91,6 +93,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
cliOptions.add(CliOption.newBoolean(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files.").defaultValue(String.valueOf(interfaceOnly)));
cliOptions.add(CliOption.newBoolean(RETURN_RESPONSE, "Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.").defaultValue(String.valueOf(returnResponse)));
cliOptions.add(CliOption.newBoolean(USE_SWAGGER_ANNOTATIONS, "Whether to generate Swagger annotations.", useSwaggerAnnotations));
+ cliOptions.add(CliOption.newString(OPEN_API_SPEC_FILE_LOCATION, "Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string."));
}
@Override
@@ -114,6 +117,10 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
useSwaggerAnnotations = Boolean.valueOf(additionalProperties.get(USE_SWAGGER_ANNOTATIONS).toString());
}
writePropertyBack(USE_SWAGGER_ANNOTATIONS, useSwaggerAnnotations);
+ if (additionalProperties.containsKey(OPEN_API_SPEC_FILE_LOCATION)) {
+ openApiSpecFileLocation = additionalProperties.get(OPEN_API_SPEC_FILE_LOCATION).toString();
+ }
+ additionalProperties.put(OPEN_API_SPEC_FILE_LOCATION, openApiSpecFileLocation);
useJackson = convertPropertyToBoolean(JACKSON);
@@ -134,18 +141,38 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestApplication.java"));
}
- supportingFiles.add(new SupportingFile("openapi.mustache",
- "src/main/openapi",
- "openapi.yaml")
- );
+ if(StringUtils.isNotEmpty(openApiSpecFileLocation)) {
+ int index = openApiSpecFileLocation.lastIndexOf('/');
+ String fileFolder;
+ String fileName;
+ if(index >= 0) {
+ fileFolder = openApiSpecFileLocation.substring(0, index);
+ fileName = openApiSpecFileLocation.substring(index + 1);
+ } else {
+ fileFolder = "";
+ fileName = openApiSpecFileLocation;
+ }
+ supportingFiles.add(new SupportingFile("openapi.mustache", fileFolder, fileName));
+ }
}
-
@Override
public String getName() {
return "jaxrs-spec";
}
+ public String getOpenApiSpecFileLocation() {
+ return openApiSpecFileLocation;
+ }
+
+ /**
+ * Location where the file containing the spec will be generated in the output folder.
+ * @param location location inside the output folder. No file generated when set to null or empty string.
+ */
+ public void setOpenApiSpecFileLocation(String location) {
+ this.openApiSpecFileLocation = location;
+ }
+
@Override
public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map> operations) {
String basePath = resourcePath;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
index 80e48bf0bc..4bd48eb218 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
@@ -18,13 +18,11 @@
package org.openapitools.codegen.languages;
import com.google.common.collect.ImmutableMap;
-import com.samskivert.mustache.Mustache;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile;
-import org.openapitools.codegen.templating.mustache.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -211,31 +209,6 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
final String infrastructureFolder = (sourceFolder + File.separator + packageName + File.separator + "infrastructure").replace(".", File.separator);
supportingFiles.add(new SupportingFile("ApiKeyAuth.kt.mustache", infrastructureFolder, "ApiKeyAuth.kt"));
-
- addMustacheLambdas(additionalProperties);
- }
-
- private void addMustacheLambdas(Map objs) {
-
- Map lambdas = new ImmutableMap.Builder()
- .put("lowercase", new LowercaseLambda().generator(this))
- .put("uppercase", new UppercaseLambda())
- .put("titlecase", new TitlecaseLambda())
- .put("camelcase", new CamelCaseLambda().generator(this))
- .put("indented", new IndentedLambda())
- .put("indented_8", new IndentedLambda(8, " "))
- .put("indented_12", new IndentedLambda(12, " "))
- .put("indented_16", new IndentedLambda(16, " "))
- .build();
-
- if (objs.containsKey("lambda")) {
- LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'. " +
- "You'll likely need to use a custom template, " +
- "see https://github.com/OpenAPITools/openapi-generator/blob/master/docs/templating.md. ");
- objs.put("_lambda", lambdas);
- } else {
- objs.put("lambda", lambdas);
- }
}
public static class Constants {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
index 28e45eb7af..36c99c39a7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
@@ -16,9 +16,11 @@
package org.openapitools.codegen.languages;
-import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap.Builder;
import com.samskivert.mustache.Mustache;
import com.samskivert.mustache.Template;
+import com.samskivert.mustache.Mustache.Lambda;
+
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.media.Schema;
import org.openapitools.codegen.*;
@@ -51,7 +53,6 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
));
public static final String TITLE = "title";
- public static final String LAMBDA = "lambda";
public static final String SERVER_PORT = "serverPort";
public static final String BASE_PACKAGE = "basePackage";
public static final String SPRING_BOOT = "spring-boot";
@@ -370,22 +371,14 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
sanitizeDirectory(sourceFolder + File.separator + basePackage), "Application.kt"));
}
- addMustacheLambdas(additionalProperties);
-
// spring uses the jackson lib, and we disallow configuration.
additionalProperties.put("jackson", "true");
}
- private void addMustacheLambdas(final Map objs) {
- Map lambdas =
- new ImmutableMap.Builder()
- .put("escapeDoubleQuote", new EscapeLambda("\"", "\\\""))
- .build();
-
- if (objs.containsKey(LAMBDA)) {
- LOGGER.warn("The lambda property is a reserved word, and will be overwritten!");
- }
- objs.put(LAMBDA, lambdas);
+ @Override
+ protected Builder addMustacheLambdas() {
+ return super.addMustacheLambdas()
+ .put("escapeDoubleQuote", new EscapeLambda("\"", "\\\""));
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java
index e0d2a98294..ca1e910266 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java
@@ -18,9 +18,17 @@
package org.openapitools.codegen.languages;
import org.openapitools.codegen.*;
+import org.openapitools.codegen.templating.mustache.OnChangeLambda;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.collect.ImmutableMap.Builder;
+import com.samskivert.mustache.Mustache.Lambda;
+
+import io.swagger.v3.oas.models.Operation;
+
+import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfig {
@@ -63,6 +71,24 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi
supportingFiles.add(new SupportingFile("openapi.mustache", outputFile));
}
+ @Override
+ protected Builder addMustacheLambdas() {
+ return super.addMustacheLambdas()
+ .put("onchange", new OnChangeLambda());
+ }
+
+ /**
+ * Group operations by resourcePath so that operations with same path and
+ * different http method can be rendered one after the other.
+ */
+ @Override
+ public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation
+ co, Map> operations) {
+ List opList = operations.computeIfAbsent(resourcePath,
+ k -> new ArrayList<>());
+ opList.add(co);
+ }
+
@Override
public Map postProcessSupportingFileData(Map objs) {
generateYAMLSpecFile(objs);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
index 6bd358bd23..ad2c260cac 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
@@ -124,9 +124,9 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig {
// I tried to map as "std::io::File", but Reqwest multipart file requires a "AsRef" param.
// Getting a file from a Path is simple, but the opposite is difficult. So I map as "std::path::Path".
typeMapping.put("file", "std::path::PathBuf");
- typeMapping.put("binary", "::models::File");
+ typeMapping.put("binary", "crate::models::File");
typeMapping.put("ByteArray", "String");
- typeMapping.put("object", "Value");
+ typeMapping.put("object", "serde_json::Value");
// no need for rust
//importMapping = new HashMap();
@@ -352,8 +352,8 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig {
}
// return fully-qualified model name
- // ::models::{{classnameFile}}::{{classname}}
- return "::models::" + toModelName(schemaType);
+ // crate::models::{{classnameFile}}::{{classname}}
+ return "crate::models::" + toModelName(schemaType);
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java
index 881b2cb6dc..1f02cc989f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java
@@ -16,8 +16,9 @@
package org.openapitools.codegen.languages;
-import com.google.common.collect.ImmutableMap;
-import com.samskivert.mustache.Mustache;
+import com.google.common.collect.ImmutableMap.Builder;
+import com.samskivert.mustache.Mustache.Lambda;
+
import io.swagger.v3.oas.models.media.ArraySchema;
import io.swagger.v3.oas.models.media.Schema;
import org.openapitools.codegen.*;
@@ -84,7 +85,7 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem
importMapping.put("TemporaryFile", "play.api.libs.Files.TemporaryFile");
cliOptions.add(new CliOption(ROUTES_FILE_NAME, "Name of the routes file to generate.").defaultValue(routesFileName));
- cliOptions.add(new CliOption(ROUTES_FILE_NAME, "Base package in which supporting classes are generated.").defaultValue(basePackage));
+ cliOptions.add(new CliOption(BASE_PACKAGE, "Base package in which supporting classes are generated.").defaultValue(basePackage));
addCliOptionWithDefault(SKIP_STUBS, "If set, skips generation of stub classes.", skipStubs);
addCliOptionWithDefault(SUPPORT_ASYNC, "If set, wraps API return types with Futures and generates async actions.", supportAsync);
@@ -192,15 +193,12 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem
supportingFiles.add(new SupportingFile("public/openapi.json.mustache", "public", "openapi.json"));
supportingFiles.add(new SupportingFile("app/apiDocController.scala.mustache", String.format(Locale.ROOT, "app/%s", apiPackage.replace(".", File.separator)), "ApiDocController.scala"));
}
- addMustacheLambdas(additionalProperties);
}
- private void addMustacheLambdas(Map objs) {
- Map lambdas = new ImmutableMap.Builder()
- .put("indented_4", new IndentedLambda(4, " "))
- .put("indented_8", new IndentedLambda(8, " "))
- .build();
- objs.put("lambda", lambdas);
+ @Override
+ protected Builder addMustacheLambdas() {
+ return super.addMustacheLambdas()
+ .put("indented_4", new IndentedLambda(4, " "));
}
@SuppressWarnings("unchecked")
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java
index b78891af4f..1422504281 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java
@@ -421,6 +421,9 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
supportingFiles.add(new SupportingFile("README.mustache",
"",
"README.md"));
+ supportingFiles.add(new SupportingFile("XcodeGen.mustache",
+ "",
+ "project.yml"));
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java
index 4d80efd6a7..f663409561 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java
@@ -24,19 +24,21 @@ import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import java.io.File;
-import java.text.SimpleDateFormat;
import java.util.TreeSet;
-import java.util.Date;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodegen {
public static final String NPM_REPOSITORY = "npmRepository";
public static final String WITH_INTERFACES = "withInterfaces";
+ public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter";
protected String npmRepository = null;
+ private boolean useSingleRequestParameter = true;
+ protected boolean addedApiIndex = false;
+ protected boolean addedModelIndex = false;
+
public TypeScriptFetchClientCodegen() {
super();
@@ -56,6 +58,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json"));
this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
+ this.cliOptions.add(new CliOption(USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString()));
}
@Override
@@ -83,10 +86,14 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
additionalProperties.put("modelPropertyNaming", getModelPropertyNaming());
supportingFiles.add(new SupportingFile("index.mustache", "", "index.ts"));
supportingFiles.add(new SupportingFile("runtime.mustache", "", "runtime.ts"));
- supportingFiles.add(new SupportingFile("apis.index.mustache", apiPackage().replace('.', File.separatorChar), "index.ts"));
- supportingFiles.add(new SupportingFile("models.index.mustache", modelPackage().replace('.', File.separatorChar), "index.ts"));
supportingFiles.add(new SupportingFile("tsconfig.mustache", "", "tsconfig.json"));
supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
+
+ if (additionalProperties.containsKey(USE_SINGLE_REQUEST_PARAMETER)) {
+ this.setUseSingleRequestParameter(convertPropertyToBoolean(USE_SINGLE_REQUEST_PARAMETER));
+ }
+ writePropertyBack(USE_SINGLE_REQUEST_PARAMETER, getUseSingleRequestParameter());
+
if (additionalProperties.containsKey(NPM_NAME)) {
addNpmPackageGeneration();
}
@@ -121,8 +128,9 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
@Override
public Map postProcessModels(Map objs) {
- // process enum in models
List models = (List) postProcessModelsEnum(objs).get("models");
+
+ // process enum in models
for (Object _mo : models) {
Map mo = (Map) _mo;
CodegenModel cm = (CodegenModel) mo.get("model");
@@ -184,8 +192,21 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
@Override
public Map postProcessOperationsWithModels(Map operations, List allModels) {
+ // Add supporting file only if we plan to generate files in /apis
+ if (operations.size() > 0 && !addedApiIndex) {
+ addedApiIndex = true;
+ supportingFiles.add(new SupportingFile("apis.index.mustache", apiPackage().replace('.', File.separatorChar), "index.ts"));
+ }
+
+ // Add supporting file only if we plan to generate files in /models
+ if (allModels.size() > 0 && !addedModelIndex) {
+ addedModelIndex = true;
+ supportingFiles.add(new SupportingFile("models.index.mustache", modelPackage().replace('.', File.separatorChar), "index.ts"));
+ }
+
this.addOperationModelImportInfomation(operations);
this.updateOperationParameterEnumInformation(operations);
+ this.addOperationObjectResponseInformation(operations);
return operations;
}
@@ -218,6 +239,20 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
operations.put("hasEnums", hasEnum);
}
+ private void addOperationObjectResponseInformation(Map operations) {
+ // This method will modify the infomation on the operations' return type.
+ // The api template uses this infomation to know when to return a text
+ // response for a given simple response operation.
+ Map _operations = (Map) operations.get("operations");
+ List operationList = (List) _operations.get("operation");
+ for (CodegenOperation op : operationList) {
+ if(op.returnType == "object") {
+ op.isMapContainer = true;
+ op.returnSimpleType = false;
+ }
+ }
+ }
+
private void addExtraReservedWords() {
this.reservedWords.add("BASE_PATH");
this.reservedWords.add("BaseAPI");
@@ -245,4 +280,12 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
this.reservedWords.add("BlobApiResponse");
this.reservedWords.add("TextApiResponse");
}
+
+ private boolean getUseSingleRequestParameter() {
+ return useSingleRequestParameter;
+ }
+
+ private void setUseSingleRequestParameter(boolean useSingleRequestParameter) {
+ this.useSingleRequestParameter = useSingleRequestParameter;
+ }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java
index f7f96501dd..93a25c21f4 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java
@@ -28,6 +28,7 @@ import java.text.SimpleDateFormat;
import java.util.TreeSet;
import java.util.Date;
import java.util.List;
+import java.util.ArrayList;
import java.util.Locale;
import java.util.Map;
@@ -41,10 +42,6 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
public TypeScriptRxjsClientCodegen() {
super();
- // clear import mapping (from default generator) as TS does not use it
- // at the moment
- importMapping.clear();
-
outputFolder = "generated-code/typescript-rxjs";
embeddedTemplateDir = templateDir = "typescript-rxjs";
@@ -54,6 +51,9 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
this.modelTemplateFiles.put("models.mustache", ".ts");
this.addExtraReservedWords();
+ languageSpecificPrimitives.add("Blob");
+ typeMapping.put("file", "Blob");
+
this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json"));
this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
}
@@ -92,6 +92,11 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
}
}
+ @Override
+ public boolean isDataTypeFile(final String dataType) {
+ return dataType != null && dataType.equals("Blob");
+ }
+
@Override
public String getTypeDeclaration(Schema p) {
Schema inner;
@@ -161,27 +166,64 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
return result;
}
- private void addNpmPackageGeneration() {
+ @Override
+ public void postProcessParameter(CodegenParameter parameter) {
+ super.postProcessParameter(parameter);
+ parameter.dataType = applyLocalTypeMapping(parameter.dataType);
+ }
+ @Override
+ public String getSchemaType(Schema p) {
+ String openAPIType = super.getSchemaType(p);
+ if (isLanguagePrimitive(openAPIType)) {
+ return openAPIType;
+ }
+ applyLocalTypeMapping(openAPIType);
+ return openAPIType;
+ }
+
+ private String applyLocalTypeMapping(String type) {
+ if (typeMapping.containsKey(type)) {
+ type = typeMapping.get(type);
+ }
+ return type;
+ }
+
+ private boolean isLanguagePrimitive(String type) {
+ return languageSpecificPrimitives.contains(type);
+ }
+
+ private void addNpmPackageGeneration() {
if (additionalProperties.containsKey(NPM_REPOSITORY)) {
this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString());
}
- //Files for building our lib
+ // Files for building our lib
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("package.mustache", "", "package.json"));
}
@Override
public Map postProcessOperationsWithModels(Map operations, List allModels) {
- this.addOperationModelImportInfomation(operations);
+ // Convert List of CodegenOperation to List of ExtendedCodegenOperation
+ Map _operations = (Map) operations.get("operations");
+ List os = (List) _operations.get("operation");
+ List newOs = new ArrayList();
+ for (CodegenOperation o : os) {
+ newOs.add(new ExtendedCodegenOperation(o));
+ }
+ _operations.put("operation", newOs);
+
+ this.addOperationModelImportInformation(operations);
this.updateOperationParameterEnumInformation(operations);
+ this.addConditionalImportInformation(operations);
+
return operations;
}
- private void addOperationModelImportInfomation(Map operations) {
- // This method will add extra infomation to the operations.imports array.
- // The api template uses this infomation to import all the required
+ private void addOperationModelImportInformation(Map operations) {
+ // This method will add extra information to the operations.imports array.
+ // The api template uses this information to import all the required
// models for a given operation.
List> imports = (List>) operations.get("imports");
for (Map im : imports) {
@@ -190,22 +232,79 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
}
private void updateOperationParameterEnumInformation(Map operations) {
- // This method will add extra infomation as to whether or not we have enums and
+ // This method will add extra information as to whether or not we have enums and
// update their names with the operation.id prefixed.
Map _operations = (Map) operations.get("operations");
- List operationList = (List) _operations.get("operation");
- boolean hasEnum = false;
- for (CodegenOperation op : operationList) {
+ List operationList = (List) _operations.get("operation");
+ boolean hasEnums = false;
+ for (ExtendedCodegenOperation op : operationList) {
for (CodegenParameter param : op.allParams) {
if (Boolean.TRUE.equals(param.isEnum)) {
- hasEnum = true;
+ hasEnums = true;
param.datatypeWithEnum = param.datatypeWithEnum
.replace(param.enumName, op.operationIdCamelCase + param.enumName);
}
}
}
- operations.put("hasEnums", hasEnum);
+ operations.put("hasEnums", hasEnums);
+ }
+
+ private void addConditionalImportInformation(Map operations) {
+ // This method will determine if there are required parameters and if there are list containers
+ Map _operations = (Map) operations.get("operations");
+ List operationList = (List) _operations.get("operation");
+
+ boolean hasRequiredParameters = false;
+ boolean hasListContainers = false;
+ boolean hasHttpHeaders = false;
+ boolean hasQueryParams = false;
+ boolean hasPathParams = false;
+
+ for (ExtendedCodegenOperation op : operationList) {
+ if (op.getHasRequiredParams()) {
+ hasRequiredParameters = true;
+ }
+
+ for (CodegenParameter param : op.headerParams) {
+ if (param.isListContainer) {
+ hasListContainers = true;
+ break;
+ }
+ }
+ for (CodegenParameter param : op.queryParams) {
+ if (param.isListContainer && !param.isCollectionFormatMulti) {
+ hasListContainers = true;
+ break;
+ }
+ }
+ for (CodegenParameter param : op.formParams) {
+ if (param.isListContainer && !param.isCollectionFormatMulti) {
+ hasListContainers = true;
+ break;
+ }
+ }
+
+ if (op.hasHttpHeaders) {
+ hasHttpHeaders = true;
+ }
+ if (op.getHasQueryParams()) {
+ hasQueryParams = true;
+ }
+ if (op.getHasPathParams()) {
+ hasPathParams = true;
+ }
+
+ if(hasRequiredParameters && hasListContainers && hasHttpHeaders && hasQueryParams && hasPathParams){
+ break;
+ }
+ }
+
+ operations.put("hasRequiredParameters", hasRequiredParameters);
+ operations.put("hasListContainers", hasListContainers);
+ operations.put("hasHttpHeaders", hasHttpHeaders);
+ operations.put("hasQueryParams", hasQueryParams);
+ operations.put("hasPathParams", hasPathParams);
}
private void addExtraReservedWords() {
@@ -222,10 +321,88 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
this.reservedWords.add("ModelPropertyNaming");
this.reservedWords.add("RequestArgs");
this.reservedWords.add("RequestOpts");
+ this.reservedWords.add("ResponseArgs");
this.reservedWords.add("exists");
- this.reservedWords.add("RequestContext");
- this.reservedWords.add("ResponseContext");
this.reservedWords.add("Middleware");
+ this.reservedWords.add("AjaxRequest");
this.reservedWords.add("AjaxResponse");
}
+
+ class ExtendedCodegenOperation extends CodegenOperation {
+ public boolean hasHttpHeaders;
+
+ public ExtendedCodegenOperation(CodegenOperation o) {
+ super();
+
+ // Copy all fields of CodegenOperation
+ this.responseHeaders.addAll(o.responseHeaders);
+ this.hasAuthMethods = o.hasAuthMethods;
+ this.hasConsumes = o.hasConsumes;
+ this.hasProduces = o.hasProduces;
+ this.hasParams = o.hasParams;
+ this.hasOptionalParams = o.hasOptionalParams;
+ this.hasRequiredParams = o.hasRequiredParams;
+ this.returnTypeIsPrimitive = o.returnTypeIsPrimitive;
+ this.returnSimpleType = o.returnSimpleType;
+ this.subresourceOperation = o.subresourceOperation;
+ this.isMapContainer = o.isMapContainer;
+ this.isListContainer = o.isListContainer;
+ this.isMultipart = o.isMultipart;
+ this.hasMore = o.hasMore;
+ this.isResponseBinary = o.isResponseBinary;
+ this.isResponseFile = o.isResponseFile;
+ this.hasReference = o.hasReference;
+ this.isRestfulIndex = o.isRestfulIndex;
+ this.isRestfulShow = o.isRestfulShow;
+ this.isRestfulCreate = o.isRestfulCreate;
+ this.isRestfulUpdate = o.isRestfulUpdate;
+ this.isRestfulDestroy = o.isRestfulDestroy;
+ this.isRestful = o.isRestful;
+ this.isDeprecated = o.isDeprecated;
+ this.isCallbackRequest = o.isCallbackRequest;
+ this.path = o.path;
+ this.operationId = o.operationId;
+ this.returnType = o.returnType;
+ this.httpMethod = o.httpMethod;
+ this.returnBaseType = o.returnBaseType;
+ this.returnContainer = o.returnContainer;
+ this.summary = o.summary;
+ this.unescapedNotes = o.unescapedNotes;
+ this.notes = o.notes;
+ this.baseName = o.baseName;
+ this.defaultResponse = o.defaultResponse;
+ this.discriminator = o.discriminator;
+ this.consumes = o.consumes;
+ this.produces = o.produces;
+ this.prioritizedContentTypes = o.prioritizedContentTypes;
+ this.servers = o.servers;
+ this.bodyParam = o.bodyParam;
+ this.allParams = o.allParams;
+ this.bodyParams = o.bodyParams;
+ this.pathParams = o.pathParams;
+ this.queryParams = o.queryParams;
+ this.headerParams = o.headerParams;
+ this.formParams = o.formParams;
+ this.cookieParams = o.cookieParams;
+ this.requiredParams = o.requiredParams;
+ this.optionalParams = o.optionalParams;
+ this.authMethods = o.authMethods;
+ this.tags = o.tags;
+ this.responses = o.responses;
+ this.callbacks = o.callbacks;
+ this.imports = o.imports;
+ this.examples = o.examples;
+ this.requestBodyExamples = o.requestBodyExamples;
+ this.externalDocs = o.externalDocs;
+ this.vendorExtensions = o.vendorExtensions;
+ this.nickname = o.nickname;
+ this.operationIdOriginal = o.operationIdOriginal;
+ this.operationIdLowerCase = o.operationIdLowerCase;
+ this.operationIdCamelCase = o.operationIdCamelCase;
+ this.operationIdSnakeCase = o.operationIdSnakeCase;
+
+ // new fields
+ this.hasHttpHeaders = o.getHasHeaderParams() || o.getHasBodyParam() || o.hasAuthMethods;
+ }
+ }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/OnChangeLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/OnChangeLambda.java
new file mode 100644
index 0000000000..11efbfae5b
--- /dev/null
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/OnChangeLambda.java
@@ -0,0 +1,40 @@
+package org.openapitools.codegen.templating.mustache;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.samskivert.mustache.Mustache;
+import com.samskivert.mustache.Template;
+
+/**
+ * Lambda writes current fragment to the output when it is different than
+ * the previous fragment.
+ *
+ * Register:
+ *
+ * additionalProperties.put("onchange", new OnChangeLambda());
+ *
+ *
+ * Use:
+ *
+ * {{#onchange}}{{name}}{{/onchange}}
+ *
+ */
+public class OnChangeLambda implements Mustache.Lambda {
+ private static final Logger LOGGER = LoggerFactory.getLogger(OnChangeLambda.class);
+
+ private String lastVal = null;
+
+ @Override
+ public void execute(Template.Fragment frag, Writer out) throws IOException {
+ String curVal = frag.execute();
+ LOGGER.debug("[lastVal={}, curVal={}]", lastVal, curVal);
+ if (curVal != null && !curVal.equals(lastVal)) {
+ out.write(curVal);
+ lastVal = curVal;
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache
index 2e00ae91d1..c65fb3cea2 100644
--- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache
@@ -145,6 +145,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "com.sun.jersey:jersey-client:$jersey_version"
compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache
index 24e5e816ca..982faaa462 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache
@@ -133,6 +133,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "io.github.openfeign:feign-core:$feign_version"
compile "io.github.openfeign:feign-jackson:$feign_version"
compile "io.github.openfeign:feign-slf4j:$feign_version"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache
index 21954ad8ad..d2634ca5df 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache
@@ -199,6 +199,13 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
io.github.openfeign
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache
index f8d3ce9d78..84ae616aad 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache
@@ -133,6 +133,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "com.google.api-client:google-api-client:${google_api_client_version}"
compile "org.glassfish.jersey.core:jersey-common:${jersey_common_version}"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache
index 35f0cafdf9..0269a88c3b 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache
@@ -219,6 +219,12 @@
swagger-annotations
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.google.api-client
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache
index 08462012dd..3f192edafd 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache
@@ -137,6 +137,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache
index a6b6d039f8..27a94b5631 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache
@@ -229,6 +229,13 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
org.glassfish.jersey.core
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache
new file mode 100644
index 0000000000..eee8f2923d
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache
@@ -0,0 +1,306 @@
+{{>licenseInfo}}
+package {{invokerPackage}};
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.nio.charset.Charset;
+import java.time.Duration;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.StringJoiner;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+
+/**
+ * Configuration and utility class for API clients.
+ *
+ * This class can be constructed and modified, then used to instantiate the
+ * various API classes. The API classes use the settings in this class to
+ * configure themselves, but otherwise do not store a link to this class.
+ *
+ * This class is mutable and not synchronized, so it is not thread-safe.
+ * The API classes generated from this are immutable and thread-safe.
+ *
+ * The setter methods of this class return the current object to facilitate
+ * a fluent style of configuration.
+ */
+{{>generatedAnnotation}}
+public class ApiClient {
+
+ private static final Charset UTF_8 = Charset.forName("UTF-8");
+
+ private HttpClient.Builder builder;
+ private ObjectMapper mapper;
+ private String scheme;
+ private String host;
+ private int port;
+ private String basePath;
+ private Consumer interceptor;
+ private Duration readTimeout;
+
+ private static String valueToString(Object value) {
+ if (value == null) {
+ return "";
+ }
+ return value.toString();
+ }
+
+ /**
+ * URL encode a string in the UTF-8 encoding.
+ *
+ * @param s String to encode.
+ * @return URL-encoded representation of the input string.
+ */
+ public static String urlEncode(String s) {
+ return URLEncoder.encode(s, UTF_8);
+ }
+
+ /**
+ * Convert a URL query name/value parameter to a list of encoded {@link Pair}
+ * objects.
+ *
+ * The value can be null, in which case an empty list is returned.
+ *
+ * @param name The query name parameter.
+ * @param value The query value, which may not be a collection but may be
+ * null.
+ * @return A singleton list of the {@link Pair} objects representing the input
+ * parameters, which is encoded for use in a URL. If the value is null, an
+ * empty list is returned.
+ */
+ public static List parameterToPairs(String name, Object value) {
+ if (name == null || name.isEmpty() || value == null) {
+ return Collections.emptyList();
+ }
+ return Collections.singletonList(new Pair(urlEncode(name), urlEncode(value.toString())));
+ }
+
+ /**
+ * Convert a URL query name/collection parameter to a list of encoded
+ * {@link Pair} objects.
+ *
+ * @param collectionFormat The swagger collectionFormat string (csv, tsv, etc).
+ * @param name The query name parameter.
+ * @param values A collection of values for the given query name, which may be
+ * null.
+ * @return A list of {@link Pair} objects representing the input parameters,
+ * which is encoded for use in a URL. If the values collection is null, an
+ * empty list is returned.
+ */
+ public static List parameterToPairs(
+ String collectionFormat, String name, Collection> values) {
+ if (name == null || name.isEmpty() || values == null || values.isEmpty()) {
+ return Collections.emptyList();
+ }
+
+ // get the collection format (default: csv)
+ String format = collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat;
+
+ // create the params based on the collection format
+ if ("multi".equals(format)) {
+ return values.stream()
+ .map(value -> new Pair(urlEncode(name), urlEncode(valueToString(value))))
+ .collect(Collectors.toList());
+ }
+
+ String delimiter;
+ switch(format) {
+ case "csv":
+ delimiter = urlEncode(",");
+ break;
+ case "ssv":
+ delimiter = urlEncode(" ");
+ break;
+ case "tsv":
+ delimiter = urlEncode("\t");
+ break;
+ case "pipes":
+ delimiter = urlEncode("|");
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal collection format: " + collectionFormat);
+ }
+
+ StringJoiner joiner = new StringJoiner(delimiter);
+ for (Object value : values) {
+ joiner.add(urlEncode(valueToString(value)));
+ }
+
+ return Collections.singletonList(new Pair(urlEncode(name), joiner.toString()));
+ }
+
+ /**
+ * Ctor.
+ */
+ public ApiClient() {
+ builder = HttpClient.newBuilder();
+ mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
+ mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+ mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
+ mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
+ mapper.registerModule(new JavaTimeModule());
+ URI baseURI = URI.create("{{{basePath}}}");
+ scheme = baseURI.getScheme();
+ host = baseURI.getHost();
+ port = baseURI.getPort();
+ basePath = baseURI.getRawPath();
+ interceptor = null;
+ readTimeout = null;
+ }
+
+ /**
+ * Set a custom {@link HttpClient.Builder} object to use when creating the
+ * {@link HttpClient} that is used by the API client.
+ *
+ * @param builder Custom client builder.
+ * @return This object.
+ */
+ public ApiClient setHttpClientBuilder(HttpClient.Builder builder) {
+ this.builder = builder;
+ return this;
+ }
+
+ /**
+ * Get an {@link HttpClient} based on the current {@link HttpClient.Builder}.
+ *
+ * The returned object is immutable and thread-safe.
+ *
+ * @return The HTTP client.
+ */
+ public HttpClient getHttpClient() {
+ return builder.build();
+ }
+
+ /**
+ * Set a custom {@link ObjectMapper} to serialize and deserialize the request
+ * and response bodies.
+ *
+ * @param mapper Custom object mapper.
+ * @return This object.
+ */
+ public ApiClient setObjectMapper(ObjectMapper mapper) {
+ this.mapper = mapper;
+ return this;
+ }
+
+ /**
+ * Get a copy of the current {@link ObjectMapper}.
+ *
+ * @return A copy of the current object mapper.
+ */
+ public ObjectMapper getObjectMapper() {
+ return mapper.copy();
+ }
+
+ /**
+ * Set a custom host name for the target service.
+ *
+ * @param host The host name of the target service.
+ * @return This object.
+ */
+ public ApiClient setHost(String host) {
+ this.host = host;
+ return this;
+ }
+
+ /**
+ * Set a custom port number for the target service.
+ *
+ * @param port The port of the target service. Set this to -1 to reset the
+ * value to the default for the scheme.
+ * @return This object.
+ */
+ public ApiClient setPort(int port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * Set a custom base path for the target service, for example '/v2'.
+ *
+ * @param basePath The base path against which the rest of the path is
+ * resolved.
+ * @return This object.
+ */
+ public ApiClient setBasePath(String basePath) {
+ this.basePath = basePath;
+ return this;
+ }
+
+ /**
+ * Get the base URI to resolve the endpoint paths against.
+ *
+ * @return The complete base URI that the rest of the API parameters are
+ * resolved against.
+ */
+ public String getBaseUri() {
+ return scheme + "://" + host + (port == -1 ? "" : ":" + port) + basePath;
+ }
+
+ /**
+ * Set a custom request interceptor.
+ *
+ * A request interceptor is a mechanism for altering each request before it
+ * is sent. After the request has been fully configured but not yet built, the
+ * request builder is passed into this function for further modification,
+ * after which it is sent out.
+ *
+ * This is useful for altering the requests in a custom manner, such as
+ * adding headers. It could also be used for logging and monitoring.
+ *
+ * @param interceptor A function invoked before creating each request. A value
+ * of null resets the interceptor to a no-op.
+ * @return This object.
+ */
+ public ApiClient setRequestInterceptor(Consumer interceptor) {
+ this.interceptor = interceptor;
+ return this;
+ }
+
+ /**
+ * Get the custom interceptor.
+ *
+ * @return The custom interceptor that was set, or null if there isn't any.
+ */
+ public Consumer getRequestInterceptor() {
+ return interceptor;
+ }
+
+ /**
+ * Set the read timeout for the http client.
+ *
+ * This is the value used by default for each request, though it can be
+ * overridden on a per-request basis with a request interceptor.
+ *
+ * @param readTimeout The read timeout used by default by the http client.
+ * Setting this value to null resets the timeout to an
+ * effectively infinite value.
+ * @return This object.
+ */
+ public ApiClient setReadTimeout(Duration readTimeout) {
+ this.readTimeout = readTimeout;
+ return this;
+ }
+
+ /**
+ * Get the read timeout that was set.
+ *
+ * @return The read timeout, or null if no timeout was set. Null represents
+ * an infinite wait time.
+ */
+ public Duration getReadTimeout() {
+ return readTimeout;
+ }
+}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache
new file mode 100644
index 0000000000..44356cca82
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache
@@ -0,0 +1,161 @@
+# {{artifactId}}
+
+{{appName}}
+
+- API version: {{appVersion}}
+{{^hideGenerationTimestamp}}
+
+- Build date: {{generatedDate}}
+{{/hideGenerationTimestamp}}
+
+{{#appDescription}}{{{appDescription}}}{{/appDescription}}
+
+{{#infoUrl}}
+ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
+{{/infoUrl}}
+
+*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
+
+## Requirements
+
+Building the API client library requires:
+
+1. Java 11+
+2. Maven/Gradle
+
+## Installation
+
+To install the API client library to your local Maven repository, simply execute:
+
+```shell
+mvn clean install
+```
+
+To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
+
+```shell
+mvn clean deploy
+```
+
+Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
+
+### Maven users
+
+Add this dependency to your project's POM:
+
+```xml
+
+ {{{groupId}}}
+ {{{artifactId}}}
+ {{{artifactVersion}}}
+ compile
+
+```
+
+### Gradle users
+
+Add this dependency to your project's build file:
+
+```groovy
+compile "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}"
+```
+
+### Others
+
+At first generate the JAR by executing:
+
+```shell
+mvn clean package
+```
+
+Then manually install the following JARs:
+
+- `target/{{{artifactId}}}-{{{artifactVersion}}}.jar`
+- `target/lib/*.jar`
+
+## Getting Started
+
+Please follow the [installation](#installation) instruction and execute the following Java code:
+
+```java
+{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
+import {{{invokerPackage}}}.*;
+import {{{modelPackage}}}.*;
+import {{{package}}}.{{{classname}}};
+
+public class {{{classname}}}Example {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ // Configure clients using the `defaultClient` object, such as
+ // overriding the host and port, timeout, etc.
+ {{{classname}}} apiInstance = new {{{classname}}}(defaultClient);
+ {{#allParams}}
+ {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
+ {{/allParams}}
+ try {
+ {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
+ System.out.println(result);{{/returnType}}
+ } catch (ApiException e) {
+ System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *{{basePath}}*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
+{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
+
+## Documentation for Models
+
+{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md)
+{{/model}}{{/models}}
+
+## Documentation for Authorization
+
+{{^authMethods}}All endpoints do not require authorization.
+{{/authMethods}}Authentication schemes defined for the API:
+{{#authMethods}}### {{name}}
+
+{{#isApiKey}}
+
+- **Type**: API key
+- **API key parameter name**: {{keyParamName}}
+- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
+{{/isApiKey}}
+{{#isBasic}}
+
+- **Type**: HTTP basic authentication
+{{/isBasic}}
+{{#isOAuth}}
+
+- **Type**: OAuth
+- **Flow**: {{flow}}
+- **Authorization URL**: {{authorizationUrl}}
+- **Scopes**: {{^scopes}}N/A{{/scopes}}
+{{#scopes}} - {{scope}}: {{description}}
+{{/scopes}}
+{{/isOAuth}}
+
+{{/authMethods}}
+
+## Recommendation
+
+It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
+However, the instances of the api clients created from the `ApiClient` are thread-safe and can be re-used.
+
+## Author
+
+{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}
+{{/hasMore}}{{/apis}}{{/apiInfo}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache
new file mode 100644
index 0000000000..f045c81743
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache
@@ -0,0 +1,157 @@
+{{>licenseInfo}}
+package {{package}};
+
+import {{invokerPackage}}.ApiClient;
+import {{invokerPackage}}.ApiException;
+import {{invokerPackage}}.Pair;
+
+{{#imports}}
+import {{import}};
+{{/imports}}
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.util.function.Consumer;
+
+{{^fullJavaUtil}}
+import java.util.ArrayList;
+import java.util.StringJoiner;
+import java.util.List;
+import java.util.Map;
+{{/fullJavaUtil}}
+
+{{>generatedAnnotation}}
+{{#operations}}
+public class {{classname}} {
+ private final HttpClient memberVarHttpClient;
+ private final ObjectMapper memberVarObjectMapper;
+ private final String memberVarBaseUri;
+ private final Consumer memberVarInterceptor;
+ private final Duration memberVarReadTimeout;
+
+ public {{classname}}() {
+ this(new ApiClient());
+ }
+
+ public {{classname}}(ApiClient apiClient) {
+ memberVarHttpClient = apiClient.getHttpClient();
+ memberVarObjectMapper = apiClient.getObjectMapper();
+ memberVarBaseUri = apiClient.getBaseUri();
+ memberVarInterceptor = apiClient.getRequestInterceptor();
+ memberVarReadTimeout = apiClient.getReadTimeout();
+ }
+
+ {{#operation}}
+ /**
+ * {{summary}}
+ * {{notes}}
+ {{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}}
+ {{/allParams}}
+ {{#returnType}}
+ * @return {{returnType}}
+ {{/returnType}}
+ * @throws ApiException if fails to make API call
+ {{#isDeprecated}}
+ * @deprecated
+ {{/isDeprecated}}
+ {{#externalDocs}}
+ * {{description}}
+ * @see {{summary}} Documentation
+ {{/externalDocs}}
+ */
+ {{#isDeprecated}}
+ @Deprecated
+ {{/isDeprecated}}
+ public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
+ {{#allParams}}
+ {{#required}}
+ // verify the required parameter '{{paramName}}' is set
+ if ({{paramName}} == null) {
+ throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}");
+ }
+ {{/required}}
+ {{/allParams}}
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ {{! Switch delimiters for baseName so we can write constants like "{query}" }}
+ String localVarPath = "{{{path}}}"{{#pathParams}}
+ .replace({{=<% %>=}}"{<%baseName%>}"<%={{ }}=%>, ApiClient.urlEncode({{{paramName}}}.toString())){{/pathParams}};
+
+ {{#hasQueryParams}}
+ {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList<>();
+ {{#queryParams}}
+ {{#collectionFormat}}
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}));
+ {{/collectionFormat}}
+ {{^collectionFormat}}
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("{{baseName}}", {{paramName}}));
+ {{/collectionFormat}}
+ {{/queryParams}}
+
+ if (!localVarQueryParams.isEmpty()) {
+ {{javaUtilPrefix}}StringJoiner queryJoiner = new StringJoiner("&");
+ localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
+ } else {
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ }
+ {{/hasQueryParams}}
+ {{^hasQueryParams}}
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ {{/hasQueryParams}}
+
+ {{#headerParams}}
+ if ({{paramName}} != null) {
+ localVarRequestBuilder.header("{{baseName}}", {{paramName}}.toString());
+ }
+ {{/headerParams}}
+ {{#bodyParam}}
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ {{/bodyParam}}
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ {{#bodyParam}}
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes({{paramName}});
+ localVarRequestBuilder.method("{{httpMethod}}", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ {{/bodyParam}}
+ {{^bodyParam}}
+ localVarRequestBuilder.method("{{httpMethod}}", HttpRequest.BodyPublishers.noBody());
+ {{/bodyParam}}
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "{{operationId}} call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ {{#returnType}}
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {});
+ {{/returnType}}
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ {{/operation}}
+}
+{{/operations}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/apiException.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/apiException.mustache
new file mode 100644
index 0000000000..3d0eee4bf9
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/apiException.mustache
@@ -0,0 +1,79 @@
+{{>licenseInfo}}
+
+package {{invokerPackage}};
+
+import java.net.http.HttpHeaders;
+
+{{>generatedAnnotation}}
+public class ApiException extends{{#useRuntimeException}} RuntimeException {{/useRuntimeException}}{{^useRuntimeException}} Exception {{/useRuntimeException}}{
+ private int code = 0;
+ private HttpHeaders responseHeaders = null;
+ private String responseBody = null;
+
+ public ApiException() {}
+
+ public ApiException(Throwable throwable) {
+ super(throwable);
+ }
+
+ public ApiException(String message) {
+ super(message);
+ }
+
+ public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders, String responseBody) {
+ super(message, throwable);
+ this.code = code;
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ public ApiException(String message, int code, HttpHeaders responseHeaders, String responseBody) {
+ this(message, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders) {
+ this(message, throwable, code, responseHeaders, null);
+ }
+
+ public ApiException(int code, HttpHeaders responseHeaders, String responseBody) {
+ this((String) null, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ public ApiException(int code, String message) {
+ super(message);
+ this.code = code;
+ }
+
+ public ApiException(int code, String message, HttpHeaders responseHeaders, String responseBody) {
+ this(code, message);
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Get the HTTP status code.
+ *
+ * @return HTTP status code
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Get the HTTP response headers.
+ *
+ * @return Headers as an HttpHeaders object
+ */
+ public HttpHeaders getResponseHeaders() {
+ return responseHeaders;
+ }
+
+ /**
+ * Get the HTTP response body.
+ *
+ * @return Response body in the form of string
+ */
+ public String getResponseBody() {
+ return responseBody;
+ }
+}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache
new file mode 100644
index 0000000000..f81df201eb
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache
@@ -0,0 +1,66 @@
+apply plugin: 'idea'
+apply plugin: 'eclipse'
+
+group = '{{groupId}}'
+version = '{{artifactVersion}}'
+
+buildscript {
+ repositories {
+ mavenCentral()
+ jcenter()
+ }
+}
+
+repositories {
+ mavenCentral()
+ jcenter()
+}
+
+apply plugin: 'java'
+apply plugin: 'maven'
+
+sourceCompatibility = JavaVersion.VERSION_11
+targetCompatibility = JavaVersion.VERSION_11
+
+install {
+ repositories.mavenInstaller {
+ pom.artifactId = '{{artifactId}}'
+ }
+}
+
+task execute(type:JavaExec) {
+ main = System.getProperty('mainClass')
+ classpath = sourceSets.main.runtimeClasspath
+}
+
+task sourcesJar(type: Jar, dependsOn: classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+
+artifacts {
+ archives sourcesJar
+ archives javadocJar
+}
+
+
+ext {
+ swagger_annotations_version = "1.5.22"
+ jackson_version = "2.9.9"
+ junit_version = "4.12"
+}
+
+dependencies {
+ compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
+ compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
+ compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
+ compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
+ compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
+ testCompile "junit:junit:$junit_version"
+}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/gradle-wrapper.jar b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradle-wrapper.jar
new file mode 100644
index 0000000000..5c2d1cf016
Binary files /dev/null and b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradle-wrapper.jar differ
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/gradle-wrapper.properties.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradle-wrapper.properties.mustache
new file mode 100644
index 0000000000..b0acbdcd73
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradle-wrapper.properties.mustache
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/gradle.properties.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradle.properties.mustache
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/gradlew.bat.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradlew.bat.mustache
new file mode 100644
index 0000000000..9618d8d960
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradlew.bat.mustache
@@ -0,0 +1,100 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/gradlew.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradlew.mustache
new file mode 100755
index 0000000000..8e25e6c19d
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/gradlew.mustache
@@ -0,0 +1,188 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache
new file mode 100644
index 0000000000..ad7c4234c1
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache
@@ -0,0 +1,215 @@
+
+ 4.0.0
+ {{groupId}}
+ {{artifactId}}
+ jar
+ {{artifactId}}
+ {{artifactVersion}}
+ {{artifactUrl}}
+ {{artifactDescription}}
+
+ {{scmConnection}}
+ {{scmDeveloperConnection}}
+ {{scmUrl}}
+
+{{#parentOverridden}}
+
+ {{{parentGroupId}}}
+ {{{parentArtifactId}}}
+ {{{parentVersion}}}
+
+{{/parentOverridden}}
+
+
+
+ {{licenseName}}
+ {{licenseUrl}}
+ repo
+
+
+
+
+
+ {{developerName}}
+ {{developerEmail}}
+ {{developerOrganization}}
+ {{developerOrganizationUrl}}
+
+
+
+
+
+
+ maven-enforcer-plugin
+ 3.0.0-M1
+
+
+ enforce-maven
+
+ enforce
+
+
+
+
+ 3
+
+
+ 11
+
+
+
+
+
+
+
+ maven-surefire-plugin
+ 3.0.0-M3
+
+
+ conf/log4j.properties
+
+ -Xms512m -Xmx1500m
+ methods
+ 10
+
+
+
+ maven-dependency-plugin
+ 3.1.1
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/lib
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.1.2
+
+
+
+ test-jar
+
+
+
+
+
+
+
+ maven-compiler-plugin
+ 3.8.1
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.1.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ maven-source-plugin
+ 3.1.0
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ maven-gpg-plugin
+ 1.6
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
+
+
+ io.swagger
+ swagger-annotations
+ ${swagger-annotations-version}
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ ${jackson-version}
+
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+
+
+ junit
+ junit
+ ${junit-version}
+ test
+
+
+
+ UTF-8
+ 1.5.22
+ 11
+ 11
+ 2.9.9
+ 4.12
+
+
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/travis.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/travis.mustache
new file mode 100644
index 0000000000..d489da682e
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/travis.mustache
@@ -0,0 +1,16 @@
+#
+# Generated by: https://openapi-generator.tech
+#
+language: java
+jdk:
+ - oraclejdk11
+before_install:
+ # ensure gradlew has proper permission
+ - chmod a+x ./gradlew
+script:
+ # test using maven
+ - mvn test
+ # uncomment below to test using gradle
+ # - gradle test
+ # uncomment below to test using sbt
+ # - sbt test
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache
index a5617334a8..cd173326c1 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache
@@ -52,6 +52,7 @@ import java.util.regex.Pattern;
import {{invokerPackage}}.auth.Authentication;
import {{invokerPackage}}.auth.HttpBasicAuth;
+import {{invokerPackage}}.auth.HttpBearerAuth;
import {{invokerPackage}}.auth.ApiKeyAuth;
{{#hasOAuthMethods}}
import {{invokerPackage}}.auth.OAuth;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache
index f255d0123c..d6ae8e3146 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache
@@ -127,6 +127,7 @@ if(hasProperty('target') && target == 'android') {
dependencies {
compile 'io.swagger:swagger-annotations:1.5.22'
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile 'com.squareup.okhttp3:okhttp:3.14.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.14.2'
compile 'com.google.code.gson:gson:2.8.5'
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
index 7aa9c2c8a8..759b9fe824 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
@@ -207,6 +207,12 @@
swagger-annotations
${swagger-core-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.squareup.okhttp3
okhttp
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache
index 42bdf68613..19ab0fa98c 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache
@@ -34,13 +34,13 @@ public class ApiClient {
{{#apiInfo}}
{{#apis}}
public {{classname}} {{classVarName}}() {
- return {{classname}}.{{classVarName}}(config.baseReqSpec.get());
+ return {{classname}}.{{classVarName}}(config.reqSpecSupplier);
}
{{/apis}}
{{/apiInfo}}
public static class Config {
- private Supplier baseReqSpec = () -> new RequestSpecBuilder()
+ private Supplier reqSpecSupplier = () -> new RequestSpecBuilder()
{{#basePath}}.setBaseUri(BASE_URI){{/basePath}}
.setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson())));
@@ -50,7 +50,7 @@ public class ApiClient {
* @return configuration
*/
public Config reqSpecSupplier(Supplier supplier) {
- this.baseReqSpec = supplier;
+ this.reqSpecSupplier = supplier;
return this;
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache
index 75c3a373ae..75ea07db60 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache
@@ -31,14 +31,23 @@ import static io.restassured.http.Method.*;
@Api(value = "{{{baseName}}}")
public class {{classname}} {
- private RequestSpecBuilder reqSpec;
+ private Supplier reqSpecSupplier;
+ private Consumer reqSpecCustomizer;
- private {{classname}}(RequestSpecBuilder reqSpec) {
- this.reqSpec = reqSpec;
+ private {{classname}}(Supplier reqSpecSupplier) {
+ this.reqSpecSupplier = reqSpecSupplier;
}
- public static {{classname}} {{classVarName}}(RequestSpecBuilder reqSpec) {
- return new {{classname}}(reqSpec);
+ public static {{classname}} {{classVarName}}(Supplier reqSpecSupplier) {
+ return new {{classname}}(reqSpecSupplier);
+ }
+
+ private RequestSpecBuilder createReqSpec() {
+ RequestSpecBuilder reqSpec = reqSpecSupplier.get();
+ if(reqSpecCustomizer != null) {
+ reqSpecCustomizer.accept(reqSpec);
+ }
+ return reqSpec;
}
{{#operations}}
@@ -54,18 +63,18 @@ public class {{classname}} {
@Deprecated
{{/isDeprecated}}
public {{operationIdCamelCase}}Oper {{operationId}}() {
- return new {{operationIdCamelCase}}Oper(reqSpec);
+ return new {{operationIdCamelCase}}Oper(createReqSpec());
}
{{/operation}}
{{/operations}}
/**
- * Customise request specification
- * @param consumer consumer
+ * Customize request specification
+ * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder
* @return api
*/
- public {{classname}} reqSpec(Consumer consumer) {
- consumer.accept(reqSpec);
+ public {{classname}} reqSpec(Consumer reqSpecCustomizer) {
+ this.reqSpecCustomizer = reqSpecCustomizer;
return this;
}
@@ -216,22 +225,22 @@ public class {{classname}} {
{{/formParams}}
/**
- * Customise request specification
- * @param consumer consumer
+ * Customize request specification
+ * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder
* @return operation
*/
- public {{operationIdCamelCase}}Oper reqSpec(Consumer consumer) {
- consumer.accept(reqSpec);
+ public {{operationIdCamelCase}}Oper reqSpec(Consumer reqSpecCustomizer) {
+ reqSpecCustomizer.accept(reqSpec);
return this;
}
/**
- * Customise response specification
- * @param consumer consumer
+ * Customize response specification
+ * @param respSpecCustomizer consumer to modify the ResponseSpecBuilder
* @return operation
*/
- public {{operationIdCamelCase}}Oper respSpec(Consumer consumer) {
- consumer.accept(respSpec);
+ public {{operationIdCamelCase}}Oper respSpec(Consumer respSpecCustomizer) {
+ respSpecCustomizer.accept(respSpec);
return this;
}
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache
index 285f42e475..b2d8683d3a 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache
@@ -111,6 +111,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "io.rest-assured:scala-support:$rest_assured_version"
compile "io.gsonfire:gson-fire:$gson_fire_version"
{{#joda}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache
index 5aa3ab7c61..f8a8b5a1c8 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache
@@ -206,6 +206,12 @@
swagger-annotations
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
io.rest-assured
rest-assured
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache
index 16da888f26..4232b110be 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache
@@ -135,6 +135,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "org.jboss.resteasy:resteasy-client:$resteasy_version"
compile "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"
compile "org.jboss.resteasy:resteasy-jackson2-provider:$resteasy_version"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache
index 48b5241973..7d6927871f 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache
@@ -179,6 +179,12 @@
swagger-annotations
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
org.jboss.resteasy
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache
index eae0fa4e4a..a3a9716286 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache
@@ -132,6 +132,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "org.springframework:spring-web:$spring_web_version"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache
index 39a4a7c8d8..77d021644d 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache
@@ -219,6 +219,13 @@
swagger-annotations
${swagger-annotations-version}
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache
index dc0acee384..3927003a31 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache
@@ -120,6 +120,7 @@ ext {
dependencies {
compile "com.squareup.okhttp:okhttp:$okhttp_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "com.squareup.retrofit:retrofit:$retrofit_version"
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache
index c2a5eeced6..5e91585eed 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache
@@ -219,6 +219,12 @@
swagger-annotations
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.squareup.retrofit
retrofit
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache
index 39574a5755..41ba481134 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache
@@ -166,6 +166,7 @@ dependencies {
compile "io.reactivex.rxjava2:rxjava:$rx_java_version"
{{/useRxJava2}}
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache
index 4653b6650a..aef50309c1 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache
@@ -198,6 +198,12 @@
swagger-annotations
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.squareup.retrofit2
converter-gson
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache
index 1e97c1e259..cf71f23769 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache
@@ -36,6 +36,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "io.vertx:vertx-web-client:$vertx_version"
compile "io.vertx:vertx-rx-java:$vertx_version"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache
index c3976600d9..db6ef66924 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache
@@ -208,6 +208,13 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
io.vertx
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache
index 8919c3d481..44098edb0f 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache
@@ -72,6 +72,13 @@
swagger-annotations
${swagger-annotations-version}
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
io.projectreactor
diff --git a/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache b/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache
index e22a8e6ece..9428bc70f9 100644
--- a/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache
@@ -53,7 +53,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
{{#gson}}
@@ -65,8 +65,8 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
@Override
public {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException {
- {{{dataType}}} value = jsonReader.{{#isInteger}}nextInt(){{/isInteger}}{{^isInteger}}next{{{dataType}}}(){{/isInteger}};
- return {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue(value);
+ {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{^isNumber}}{{^isInteger}}next{{{dataType}}}(){{/isInteger}}{{/isNumber}};
+ return {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}});
}
}
{{/gson}}
diff --git a/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache
index 87c23108c1..614e260c97 100644
--- a/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache
@@ -44,7 +44,7 @@
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
{{#gson}}
@@ -56,8 +56,8 @@
@Override
public {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException {
- {{{dataType}}} value = jsonReader.{{#isInteger}}nextInt(){{/isInteger}}{{^isInteger}}next{{{dataType}}}(){{/isInteger}};
- return {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue(value);
+ {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{^isNumber}}{{^isInteger}}next{{{dataType}}}(){{/isInteger}}{{/isNumber}};
+ return {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}});
}
}
{{/gson}}
diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache
index e021bf24b2..afd1ebf409 100644
--- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache
@@ -129,6 +129,14 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
{{/maximum}}
* @return {{name}}
**/
+{{#required}}
+{{#isNullable}}
+ @javax.annotation.Nullable
+{{/isNullable}}
+{{/required}}
+{{^required}}
+ @javax.annotation.Nullable
+{{/required}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
{{#vendorExtensions.extraAnnotation}}
{{{vendorExtensions.extraAnnotation}}}
diff --git a/modules/openapi-generator/src/main/resources/Java/pom.mustache b/modules/openapi-generator/src/main/resources/Java/pom.mustache
index ed6e39c78e..7dde4b12d9 100644
--- a/modules/openapi-generator/src/main/resources/Java/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/pom.mustache
@@ -220,6 +220,14 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+
com.sun.jersey
diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/enumClass.mustache
index 2f36ba0b6c..0fe7d8c27b 100644
--- a/modules/openapi-generator/src/main/resources/JavaInflector/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaInflector/enumClass.mustache
@@ -39,6 +39,6 @@
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/enumOuterClass.mustache
index 0808ffda73..9e032184be 100644
--- a/modules/openapi-generator/src/main/resources/JavaInflector/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaInflector/enumOuterClass.mustache
@@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache
index dc7b2db827..2d7d5388cf 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache
@@ -28,6 +28,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache
index 99a7dea415..2e4a164927 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache
@@ -77,6 +77,13 @@
[1.5.3,1.5.16]
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
{{#useBeanValidation}}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumClass.mustache
index 549a7b100c..34b72f9a05 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumClass.mustache
@@ -28,6 +28,6 @@ public enum {{datatypeWithEnum}} {
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumOuterClass.mustache
index d807cfb17a..86916472d2 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumOuterClass.mustache
@@ -42,7 +42,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumClass.mustache
index 10170a28a1..3e19ca9809 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumClass.mustache
@@ -28,6 +28,6 @@ public enum {{datatypeWithEnum}} {
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache
index d807cfb17a..86916472d2 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache
@@ -42,7 +42,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/enumClass.mustache
index 383b36a572..67c7fcc520 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/enumClass.mustache
@@ -49,6 +49,6 @@
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/enumOuterClass.mustache
index 48b9beb1a7..eb063d56c6 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/enumOuterClass.mustache
@@ -47,6 +47,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/modelEnum.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/modelEnum.mustache
index 33dc27b702..906ebdb28f 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/modelEnum.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/modelEnum.mustache
@@ -45,7 +45,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
{{/jackson}}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache
index d0000c1cd5..d6389cce09 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache
@@ -71,6 +71,12 @@
swagger-annotations
${swagger-core-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
org.slf4j
slf4j-log4j12
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumClass.mustache
index ab47115aae..81284b7dd3 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumClass.mustache
@@ -28,6 +28,6 @@ public enum {{datatypeWithEnum}} {
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumOuterClass.mustache
index e6c303b1e7..2865cf70cf 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumOuterClass.mustache
@@ -38,6 +38,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache
index 40d6eba4c6..a770196382 100644
--- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache
@@ -88,6 +88,12 @@
1.5.3
{{/useSwaggerAnnotations}}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
junit
junit
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumClass.mustache
index 64fd1abbc8..211fddf21f 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumClass.mustache
@@ -39,6 +39,6 @@
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumOuterClass.mustache
index fa51217a5c..91d3edab7b 100644
--- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumOuterClass.mustache
@@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache
index c1ca5e39b7..2e90275477 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache
@@ -39,6 +39,6 @@
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache
index b83507092e..60d13571cb 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache
@@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
index 5c396de030..e3cf4da321 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
@@ -111,6 +111,12 @@
swagger-annotations
1.5.14
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.fasterxml.jackson.dataformat
jackson-dataformat-yaml
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache
index 4e1f61b8ae..1ba3588ac5 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache
@@ -47,6 +47,12 @@
swagger-annotations
${swagger-core-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
org.springframework.cloud
spring-cloud-starter-openfeign
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache
index dc9c843bc2..842a9926d1 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache
@@ -177,6 +177,12 @@
swagger-annotations
1.5.14
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.fasterxml.jackson.dataformat
jackson-dataformat-yaml
diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/enumOuterClass.mustache
index 97d8170d5f..e89caa5a3f 100644
--- a/modules/openapi-generator/src/main/resources/JavaVertXServer/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/enumOuterClass.mustache
@@ -31,6 +31,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache
index 4f2598fa34..f2a1f86966 100644
--- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache
+++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache
@@ -33,6 +33,7 @@
"@babel/preset-flow": "^7.0.0",
"babel-preset-react-app": "^7.0.0",
"flow-copy-source": "^2.0.0",
- "rimraf": "^2.6.2"
+ "rimraf": "^2.6.2",
+ "lodash": ">=4.17.13"
}
}
diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/.babelrc.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/.babelrc.mustache
index 67b369ed37..c73df9d50b 100644
--- a/modules/openapi-generator/src/main/resources/Javascript/es6/.babelrc.mustache
+++ b/modules/openapi-generator/src/main/resources/Javascript/es6/.babelrc.mustache
@@ -1,3 +1,33 @@
{
- "presets": ["env", "stage-0"]
+ "presets": [
+ "@babel/preset-env"
+ ],
+ "plugins": [
+ "@babel/plugin-syntax-dynamic-import",
+ "@babel/plugin-syntax-import-meta",
+ "@babel/plugin-proposal-class-properties",
+ "@babel/plugin-proposal-json-strings",
+ [
+ "@babel/plugin-proposal-decorators",
+ {
+ "legacy": true
+ }
+ ],
+ "@babel/plugin-proposal-function-sent",
+ "@babel/plugin-proposal-export-namespace-from",
+ "@babel/plugin-proposal-numeric-separator",
+ "@babel/plugin-proposal-throw-expressions",
+ "@babel/plugin-proposal-export-default-from",
+ "@babel/plugin-proposal-logical-assignment-operators",
+ "@babel/plugin-proposal-optional-chaining",
+ [
+ "@babel/plugin-proposal-pipeline-operator",
+ {
+ "proposal": "minimal"
+ }
+ ],
+ "@babel/plugin-proposal-nullish-coalescing-operator",
+ "@babel/plugin-proposal-do-expressions",
+ "@babel/plugin-proposal-function-bind"
+ ]
}
diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache
index a50b249f59..bfe24d5570 100644
--- a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache
+++ b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache
@@ -7,19 +7,35 @@
"scripts": {
"build": "babel src -d dist",
"prepack": "npm run build",
- "test": "mocha --compilers js:babel-core/register --recursive"
+ "test": "mocha --compilers js:@babel/register --recursive"
},
"browser": {
"fs": false
},
"dependencies": {
- "babel-cli": "^6.26.0",
+ "@babel/cli": "^7.0.0",
"superagent": "3.7.0"
},
"devDependencies": {
- "babel-core": "6.26.0",
- "babel-preset-env": "^1.6.1",
- "babel-preset-stage-0": "^6.24.1",
+ "@babel/core": "^7.0.0",
+ "@babel/plugin-proposal-class-properties": "^7.0.0",
+ "@babel/plugin-proposal-decorators": "^7.0.0",
+ "@babel/plugin-proposal-do-expressions": "^7.0.0",
+ "@babel/plugin-proposal-export-default-from": "^7.0.0",
+ "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
+ "@babel/plugin-proposal-function-bind": "^7.0.0",
+ "@babel/plugin-proposal-function-sent": "^7.0.0",
+ "@babel/plugin-proposal-json-strings": "^7.0.0",
+ "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
+ "@babel/plugin-proposal-numeric-separator": "^7.0.0",
+ "@babel/plugin-proposal-optional-chaining": "^7.0.0",
+ "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
+ "@babel/plugin-proposal-throw-expressions": "^7.0.0",
+ "@babel/plugin-syntax-dynamic-import": "^7.0.0",
+ "@babel/plugin-syntax-import-meta": "^7.0.0",
+ "@babel/preset-env": "^7.0.0",
+ "@babel/register": "^7.0.0",
"expect.js": "^0.3.1",
"mocha": "^5.2.0",
"sinon": "^7.2.0"
diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/pom.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/pom.mustache
index 0ba404590b..66f1be9033 100644
--- a/modules/openapi-generator/src/main/resources/android/libraries/volley/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/pom.mustache
@@ -11,6 +11,12 @@
swagger-annotations
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
org.apache.httpcomponents
httpcore
diff --git a/modules/openapi-generator/src/main/resources/android/pom.mustache b/modules/openapi-generator/src/main/resources/android/pom.mustache
index 375a52a374..ec8f2759cc 100644
--- a/modules/openapi-generator/src/main/resources/android/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/android/pom.mustache
@@ -131,6 +131,12 @@
swagger-annotations
${swagger-core-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.google.code.gson
gson
diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/model.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/model.mustache
index 8cbfaf0efd..101e95cbfc 100644
--- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/model.mustache
+++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/model.mustache
@@ -28,10 +28,10 @@ namespace {{packageName}}.Models
{{/required}}
[DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})]
{{#isEnum}}
- public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }
+ public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}}
{{/isEnum}}
{{^isEnum}}
- public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
+ public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}}
{{/isEnum}}
{{#hasMore}}
{{/hasMore}}
diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/model.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/model.mustache
index e4be72baec..e198e2447e 100644
--- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/model.mustache
+++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/model.mustache
@@ -31,10 +31,10 @@ namespace {{modelPackage}}
{{/pattern}}
[DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})]
{{#isEnum}}
- public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }
+ public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}}
{{/isEnum}}
{{^isEnum}}
- public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
+ public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}}
{{/isEnum}}
{{#hasMore}}
{{/hasMore}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-source.mustache
index c58a2fc79a..e69d65cafc 100644
--- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-source.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-source.mustache
@@ -37,7 +37,7 @@ void to_json(nlohmann::json& j, const {{classname}}& o)
void from_json(const nlohmann::json& j, {{classname}}& o)
{
{{#vars}}
- {{#required}}j.at("{{baseName}}").get_to(o.m_{{name}});{{/required}}{{^required}}if(j.contains("{{baseName}}"))
+ {{#required}}j.at("{{baseName}}").get_to(o.m_{{name}});{{/required}}{{^required}}if(j.find("{{baseName}}") != j.end())
{
j.at("{{baseName}}").get_to(o.m_{{name}});
o.m_{{name}}IsSet = true;
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache
index f9c036f820..05bad7539e 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache
@@ -45,7 +45,7 @@ void {{prefix}}HttpRequestInput::add_file(QString variable_name, QString local_f
: QObject(parent), manager(nullptr)
{
qsrand(QDateTime::currentDateTime().toTime_t());
- timeout = 0;
+ timeout = 0;
timer = new QTimer();
manager = new QNetworkAccessManager(this);
connect(manager, &QNetworkAccessManager::finished, this, &{{prefix}}HttpRequestWorker::on_manager_finished);
@@ -57,7 +57,7 @@ void {{prefix}}HttpRequestInput::add_file(QString variable_name, QString local_f
timer->stop();
}
timer->deleteLater();
- }
+ }
}
QMap {{prefix}}HttpRequestWorker::getResponseHeaders() const {
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache
index 6ba6b63117..0af88c4070 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache
@@ -76,10 +76,10 @@ signals:
private:
QNetworkAccessManager *manager;
QMap headers;
- int timeout;
- void on_manager_timeout(QNetworkReply *reply);
+ int timeout;
+ void on_manager_timeout(QNetworkReply *reply);
private slots:
- void on_manager_finished(QNetworkReply *reply);
+ void on_manager_finished(QNetworkReply *reply);
};
{{#cppNamespaceDeclarations}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/Project.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/Project.mustache
index 11a0eb49bf..9f530b381a 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/Project.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/Project.mustache
@@ -19,7 +19,7 @@ HEADERS += \
$${PWD}/{{prefix}}Helpers.h \
$${PWD}/{{prefix}}HttpRequest.h \
$${PWD}/{{prefix}}Object.h
- $${PWD}/{{prefix}}Enum.h
+ $${PWD}/{{prefix}}Enum.h
SOURCES += \
# Models
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache
index 899a16b059..5777507ec9 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache
@@ -49,7 +49,7 @@ void
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("{{{path}}}");
{{#pathParams}}
- QString {{paramName}}PathParam("{");
+ QString {{paramName}}PathParam("{");
{{paramName}}PathParam.append("{{baseName}}").append("}");
fullPath.replace({{paramName}}PathParam, QUrl::toPercentEncoding(::{{cppNamespace}}::toStringValue({{paramName}})));
{{/pathParams}}
@@ -103,7 +103,7 @@ void
}
{{/collectionFormat}}{{/queryParams}}
{{prefix}}HttpRequestWorker *worker = new {{prefix}}HttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
{{prefix}}HttpRequestInput input(fullPath, "{{httpMethod}}");
{{#formParams}}
if ({{paramName}} != nullptr) {
@@ -166,7 +166,7 @@ void
{{^isListContainer}}
{{^isMapContainer}}
{{#returnTypeIsPrimitive}}
- {{{returnType}}} output;
+ {{{returnType}}} output;
::{{cppNamespace}}::fromStringValue(QString(worker->response), output);
{{/returnTypeIsPrimitive}}
{{/isMapContainer}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache
index ea9218ad52..5f02327975 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache
@@ -25,7 +25,7 @@ public:
void setHost(const QString& host);
void setApiTimeOutMs(const int tout);
void addHeaders(const QString& key, const QString& value);
-
+
{{#operations}}{{#operation}}void {{nickname}}({{#allParams}}const {{{dataType}}}& {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
{{/operation}}{{/operations}}
private:
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache
index 2874ef8c71..bf34a3a150 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/enum.mustache
@@ -15,7 +15,7 @@ class {{prefix}}Enum {
{{prefix}}Enum() {
}
-
+
{{prefix}}Enum(QString jsonString) {
fromJson(jsonString);
}
@@ -48,7 +48,7 @@ class {{prefix}}Enum {
return true;
}
private :
- QString jstr;
+ QString jstr;
};
{{#cppNamespaceDeclarations}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache
index 9aa16e1b52..ddf83be291 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-body.mustache
@@ -220,7 +220,7 @@ fromJsonValue(QString &value, const QJsonValue &jval){
} else if(jval.isDouble()){
value = QString::number(jval.toDouble());
} else {
- ok = false;
+ ok = false;
}
} else {
ok = false;
@@ -230,7 +230,7 @@ fromJsonValue(QString &value, const QJsonValue &jval){
bool
fromJsonValue(QDateTime &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(!jval.isUndefined() && !jval.isNull() && jval.isString()){
value = QDateTime::fromString(jval.toString(), Qt::ISODate);
ok = value.isValid();
@@ -254,7 +254,7 @@ fromJsonValue(QByteArray &value, const QJsonValue &jval){
bool
fromJsonValue(QDate &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(!jval.isUndefined() && !jval.isNull() && jval.isString()){
value = QDate::fromString(jval.toString(), Qt::ISODate);
ok = value.isValid();
@@ -266,7 +266,7 @@ fromJsonValue(QDate &value, const QJsonValue &jval){
bool
fromJsonValue(qint32 &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(!jval.isUndefined() && !jval.isNull() && !jval.isObject() && !jval.isArray()){
value = jval.toInt();
} else {
@@ -277,7 +277,7 @@ fromJsonValue(qint32 &value, const QJsonValue &jval){
bool
fromJsonValue(qint64 &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(!jval.isUndefined() && !jval.isNull() && !jval.isObject() && !jval.isArray()){
value = jval.toVariant().toLongLong();
} else {
@@ -288,7 +288,7 @@ fromJsonValue(qint64 &value, const QJsonValue &jval){
bool
fromJsonValue(bool &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(jval.isBool()){
value = jval.toBool();
} else {
@@ -299,7 +299,7 @@ fromJsonValue(bool &value, const QJsonValue &jval){
bool
fromJsonValue(float &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(jval.isDouble()){
value = static_cast(jval.toDouble());
} else {
@@ -310,7 +310,7 @@ fromJsonValue(float &value, const QJsonValue &jval){
bool
fromJsonValue(double &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(jval.isDouble()){
value = jval.toDouble();
} else {
@@ -321,7 +321,7 @@ fromJsonValue(double &value, const QJsonValue &jval){
bool
fromJsonValue({{prefix}}Object &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(jval.isObject()){
value.fromJsonObject(jval.toObject());
ok = value.isValid();
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-header.mustache
index 0948f4f662..6c8436c554 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-header.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/helpers-header.mustache
@@ -129,7 +129,7 @@ namespace {{this}} {
ok = false;
}
return ok;
- }
+ }
template
bool fromJsonValue(QMap &val, const QJsonValue &jval) {
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-body.mustache
index 2a75a18c76..1e25f89827 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-body.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-body.mustache
@@ -43,7 +43,7 @@ void
{{^isEnum}}QByteArray array (jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
- this->fromJsonObject(jsonObject);{{/isEnum}}{{#isEnum}}{{#allowableValues}}{{#enumVars}}
+ this->fromJsonObject(jsonObject);{{/isEnum}}{{#isEnum}}{{#allowableValues}}{{#enumVars}}
{{#-first}}if{{/-first}}{{^-first}}else if{{/-first}} ( jsonString.compare({{#isString}}"{{value}}"{{/isString}}{{^isString}}QString::number({{value}}){{/isString}}, Qt::CaseInsensitive) == 0) {
m_value = e{{classname}}::{{name}};
m_value_isValid = true;
@@ -92,7 +92,7 @@ QString
{{#enumVars}}
case e{{classname}}::{{name}}:
val = {{#isString}}"{{value}}"{{/isString}}{{^isString}}QString::number({{value}}){{/isString}};
- break;{{#-last}}
+ break;{{#-last}}
default:
break;{{/-last}}
{{/enumVars}}
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache
index 38b42f401a..556139facf 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache
@@ -53,7 +53,7 @@ public:
{{classname}}::e{{classname}} getValue() const;
void setValue(const {{classname}}::e{{classname}}& value);{{/isEnum}}
-
+
virtual bool isSet() const override;
virtual bool isValid() const override;
diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache
index 100670d1fc..e58b49adb9 100644
--- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/object.mustache
@@ -15,7 +15,7 @@ class {{prefix}}Object {
{{prefix}}Object() {
}
-
+
{{prefix}}Object(QString jsonString) {
fromJson(jsonString);
}
diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache
index f3e63b485e..93cdde77b2 100644
--- a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache
@@ -82,7 +82,7 @@ import 'package:{{pubName}}/api.dart';
{{/authMethods}}
{{/hasAuthMethods}}
-final jaguarApiGen = JaguarApiGen();
+final jaguarApiGen = {{clientName}}();
var api_instance = jaguarApiGen.get{{classname}}();
{{#allParams}}
var {{paramName}} = {{#isListContainer}}[{{/isListContainer}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isListContainer}}]{{/isListContainer}}; // {{{dataType}}} | {{{description}}}
diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache
index cb41c5243a..1fd657ea1d 100644
--- a/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache
@@ -21,7 +21,7 @@ import 'package:jaguar_mimetype/jaguar_mimetype.dart';
final _jsonJaguarRepo = JsonRepo()
{{#models}}{{#model}}..add({{classname}}Serializer())
{{/model}}{{/models}};
-final Map converters = {
+final Map defaultConverters = {
MimeTypes.json: _jsonJaguarRepo,
};
{{/jsonFormat}}
@@ -33,7 +33,7 @@ final _protoJaguarRepo = ProtoCodecRepo()
final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true)
{{#models}}{{#model}}..add((data) => {{classname}}.fromBuffer(List.from(data)))
{{/model}}{{/models}};
-final Map converters = {
+final Map defaultConverters = {
MimeTypes.json: _jsonJaguarRepo,
MimeTypes.binary: _protoJaguarRepo,
};
@@ -42,7 +42,7 @@ final Map converters = {
final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()];
-class JaguarApiGen {
+class {{clientName}} {
List interceptors;
String basePath = "{{basePath}}";
Route _baseRoute;
@@ -51,7 +51,7 @@ class JaguarApiGen {
/**
* Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added)
*/
- JaguarApiGen({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
+ {{clientName}}({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
_baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? IOClient());
if(interceptors == null) {
this.interceptors = _defaultInterceptors;
@@ -91,7 +91,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return {{classname}}(base: base, converters: converters, timeout: timeout);
}
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/README.mustache b/modules/openapi-generator/src/main/resources/go-experimental/README.mustache
index 5c9639022a..869443a26e 100644
--- a/modules/openapi-generator/src/main/resources/go-experimental/README.mustache
+++ b/modules/openapi-generator/src/main/resources/go-experimental/README.mustache
@@ -113,6 +113,22 @@ r, err := client.Service.Operation(auth, args)
{{/isOAuth}}
{{/authMethods}}
+## Documentation for Utility Methods
+
+Due to the fact that model structure members are all pointers, this package contains
+a number of utility functions to easily obtain pointers to values of basic types.
+Each of these functions takes a value of the given basic type and returns a pointer to it:
+
+* `PtrBool`
+* `PtrInt`
+* `PtrInt32`
+* `PtrInt64`
+* `PtrFloat`
+* `PtrFloat32`
+* `PtrFloat64`
+* `PtrString`
+* `PtrTime`
+
## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache
index 1a9f8d1c5a..17833f918b 100644
--- a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache
+++ b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache
@@ -35,9 +35,95 @@ type {{classname}} struct {
{{#description}}
// {{{description}}}
{{/description}}
- {{name}} {{#isNullable}}*{{/isNullable}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
+ {{name}} *{{{dataType}}} `json:"{{baseName}},omitempty"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
+{{#isNullable}} isExplicitNull{{name}} bool `json:"-"{{#withXml}} xml:"-"{{/withXml}}`{{/isNullable}}
{{/vars}}
}
{{/isEnum}}
+
+{{^isEnum}}
+{{#vars}}
+// Get{{name}} returns the {{name}} field if non-nil, zero value otherwise.
+func (o *{{classname}}) Get{{name}}() {{dataType}} {
+ if o == nil || o.{{name}} == nil {
+ var ret {{dataType}}
+ return ret
+ }
+ return *o.{{name}}
+}
+
+// Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *{{classname}}) Get{{name}}Ok() ({{dataType}}, bool) {
+ if o == nil || o.{{name}} == nil {
+ var ret {{dataType}}
+ return ret, false
+ }
+ return *o.{{name}}, true
+}
+
+// Has{{name}} returns a boolean if a field has been set.
+func (o *{{classname}}) Has{{name}}() bool {
+ if o != nil && o.{{name}} != nil {
+ return true
+ }
+
+ return false
+}
+
+// Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field.
+func (o *{{classname}}) Set{{name}}(v {{dataType}}) {
+ o.{{name}} = &v
+}
+
+{{#isNullable}}
+// Set{{name}}ExplicitNull (un)sets {{name}} to be considered as explicit "null" value
+// when serializing to JSON (pass true as argument to set this, false to unset)
+// The {{name}} value is set to nil even if false is passed
+func (o *{{classname}}) Set{{name}}ExplicitNull(b bool) {
+ o.{{name}} = nil
+ o.isExplicitNull{{name}} = b
+}
+{{/isNullable}}
+{{/vars}}
+
+func (o {{classname}}) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ {{#vars}}
+ {{#required}}
+ {{! if argument is required and not nullable, it can't be nil}}
+ {{^isNullable}}
+ if o.{{name}} == nil {
+ return nil, errors.New("{{name}} is required and not nullable, but was not set on {{classname}}")
+ }{{/isNullable}}
+ {{! if argument is required and nullable, it *must* have isExplicitNull set to true when it's nil}}
+ {{#isNullable}}
+ if o.{{name}} == nil && !o.isExplicitNull{{name}} {
+ return nil, errors.New("{{name}} is required and nullable, but it wasn't set to be explicit null")
+ }
+ {{/isNullable}}
+ {{/required}}
+ {{! if argument is nullable, only serialize it if it is nil *and* was explicitly set to nil}}
+ {{#isNullable}}
+ if o.{{name}} == nil {
+ if o.isExplicitNull{{name}} {
+ toSerialize["{{baseName}}"] = o.{{name}}
+ }
+ } else {
+ toSerialize["{{baseName}}"] = o.{{name}}
+ }
+ {{/isNullable}}
+ {{! if argument is not nullable, don't set it if it is nil}}
+ {{^isNullable}}
+ if o.{{name}} != nil {
+ toSerialize["{{baseName}}"] = o.{{name}}
+ }
+ {{/isNullable}}
+ {{/vars}}
+ return json.Marshal(toSerialize)
+}
+
+{{/isEnum}}
+
{{/model}}
{{/models}}
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache
index 546238243b..98040dcb25 100644
--- a/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache
+++ b/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache
@@ -4,9 +4,50 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-{{#vars}}**{{name}}** | {{#isNullable}}Pointer to {{/isNullable}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
+{{#vars}}**{{name}}** | Pointer to {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}
+{{^isEnum}}
+## Methods
+
+{{#vars}}
+### Get{{name}}
+
+`func (o *{{classname}}) Get{{name}}() {{dataType}}`
+
+Get{{name}} returns the {{name}} field if non-nil, zero value otherwise.
+
+### Get{{name}}Ok
+
+`func (o *{{classname}}) Get{{name}}Ok() ({{dataType}}, bool)`
+
+Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### Has{{name}}
+
+`func (o *{{classname}}) Has{{name}}() bool`
+
+Has{{name}} returns a boolean if a field has been set.
+
+### Set{{name}}
+
+`func (o *{{classname}}) Set{{name}}(v {{dataType}})`
+
+Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field.
+
+{{#isNullable}}
+### Set{{name}}ExplicitNull
+
+`func (o *{{classname}}) Set{{name}}ExplicitNull(b bool)`
+
+Set{{name}}ExplicitNull (un)sets {{name}} to be considered as explicit "null" value
+when serializing to JSON (pass true as argument to set this, false to unset)
+The {{name}} value is set to nil even if false is passed
+{{/isNullable}}
+{{/vars}}
+{{/isEnum}}
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{{/model}}{{/models}}
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache b/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache
new file mode 100644
index 0000000000..e3598373cb
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache
@@ -0,0 +1,31 @@
+{{>partial_header}}
+package {{packageName}}
+
+import "time"
+
+// PtrBool is a helper routine that returns a pointer to given integer value.
+func PtrBool(v bool) *bool { return &v }
+
+// PtrInt is a helper routine that returns a pointer to given integer value.
+func PtrInt(v int) *int { return &v }
+
+// PtrInt32 is a helper routine that returns a pointer to given integer value.
+func PtrInt32(v int32) *int32 { return &v }
+
+// PtrInt64 is a helper routine that returns a pointer to given integer value.
+func PtrInt64(v int64) *int64 { return &v }
+
+// PtrFloat is a helper routine that returns a pointer to given float value.
+func PtrFloat(v float32) *float32 { return &v }
+
+// PtrFloat32 is a helper routine that returns a pointer to given float value.
+func PtrFloat32(v float32) *float32 { return &v }
+
+// PtrFloat64 is a helper routine that returns a pointer to given float value.
+func PtrFloat64(v float64) *float64 { return &v }
+
+// PtrString is a helper routine that returns a pointer to given string value.
+func PtrString(v string) *string { return &v }
+
+// PtrTime is helper routine that returns a pointer to given Time value.
+func PtrTime(v time.Time) *time.Time { return &v }
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/enumClass.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/enumClass.mustache
index 2f36ba0b6c..0fe7d8c27b 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/enumClass.mustache
@@ -39,6 +39,6 @@
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/enumOuterClass.mustache
index 0808ffda73..9e032184be 100644
--- a/modules/openapi-generator/src/main/resources/java-msf4j-server/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/enumOuterClass.mustache
@@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/enumClass.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/enumClass.mustache
index 2f36ba0b6c..0fe7d8c27b 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/enumClass.mustache
@@ -39,6 +39,6 @@
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/enumOuterClass.mustache
index 0808ffda73..9e032184be 100644
--- a/modules/openapi-generator/src/main/resources/java-pkmst/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/java-pkmst/enumOuterClass.mustache
@@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
return b;
}
}
- {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
+ {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/enumOuterClass.mustache
index 3b43067c97..5333fff8c0 100644
--- a/modules/openapi-generator/src/main/resources/java-undertow-server/enumOuterClass.mustache
+++ b/modules/openapi-generator/src/main/resources/java-undertow-server/enumOuterClass.mustache
@@ -37,6 +37,6 @@ if (String.valueOf(b.value).equals(text)) {
return b;
}
}
-{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
+{{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/isNullable}}
}
}
diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache
index b45ae15ccd..8938a5ad3f 100644
--- a/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache
@@ -108,6 +108,12 @@
swagger-annotations
${version.swagger}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache
index bd65158500..e05425fc5c 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/pom.mustache
@@ -105,6 +105,12 @@
1.5.21
{{/swaggerAnnotations}}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.fasterxml.jackson.dataformat
jackson-dataformat-yaml
diff --git a/modules/openapi-generator/src/main/resources/r/api_doc.mustache b/modules/openapi-generator/src/main/resources/r/api_doc.mustache
index 9473cf7c13..8a3af45edd 100644
--- a/modules/openapi-generator/src/main/resources/r/api_doc.mustache
+++ b/modules/openapi-generator/src/main/resources/r/api_doc.mustache
@@ -46,20 +46,41 @@ api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
{{/isOAuth}}
{{/authMethods}}
{{/hasAuthMethods}}
+{{#returnExceptionOnFailure}}
+{{#useRlangExceptionHandling}}
+result <- tryCatch(
+ api.instance${{{operationId}}}({{#requiredParams}}var.{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}}=var.{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}),
+ ApiException = function(ex) ex
+ )
+# In case of error, print the error object
+if(!is.null(result$ApiException)) {
+ cat(result$ApiException$toString())
+ } else {
+{{#returnType}}
+# deserialized response object
+response.object <- result$content
+{{/returnType}}
+# response headers
+response.headers <- result$response$headers
+# response status code
+response.status.code <- result$response$status_code
+}
+{{/useRlangExceptionHandling}}
+{{/returnExceptionOnFailure}}
+{{^useRlangExceptionHandling}}
{{#returnType}}result <- {{/returnType}}api.instance${{{operationId}}}({{#requiredParams}}var.{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}}=var.{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}})
{{#returnType}}
dput(result)
{{/returnType}}
+{{/useRlangExceptionHandling}}
```
### Parameters
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
-{{#requiredParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
-{{/requiredParams}}
-{{#optionalParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
-{{/optionalParams}}
+{{#allParams}} **{{paramName}}** | {{#isEnum}}Enum {{#allowableValues}}{{values}}{{/allowableValues}} {{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isListContainer}}{{#items}}{{#isPrimitiveType}}list( **{{dataType}}** ){{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}list( [**{{dataType}}**]({{baseType}}.md) ){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isListContainer}}{{#isMapContainer}}{{#isPrimitiveType}}named list( **{{dataType}}** ){{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}named list( [**{{dataType}}**]({{baseType}}.md) ){{/isFile}}{{/isPrimitiveType}}{{/isMapContainer}}{{/isContainer}}{{^isContainer}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/isContainer}}{{/isEnum}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
+{{/allParams}}
### Return type
diff --git a/modules/openapi-generator/src/main/resources/rust/api_doc.mustache b/modules/openapi-generator/src/main/resources/rust/api_doc.mustache
index 772afe7a2c..df4b7d7f14 100644
--- a/modules/openapi-generator/src/main/resources/rust/api_doc.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/api_doc.mustache
@@ -14,27 +14,19 @@ Method | HTTP request | Description
## {{{operationId}}}
-> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#authMethods}}ctx, {{/authMethods}}{{#allParams}}{{#required}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}})
+> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
{{{summary}}}{{#notes}}
{{{notes}}}{{/notes}}
-### Required Parameters
+### Parameters
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------{{#authMethods}}
- **ctx** | **context.Context** | context containing the authentication | nil if no authentication{{/authMethods}}{{/-last}}{{/allParams}}{{#allParams}}{{#required}}
- **{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}}
- **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
-
-### Optional Parameters
-
-Optional parameters are passed through a map[string]interface{}.
-{{#allParams}}{{#-last}}
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}}
- **{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}}{{/allParams}}{{/hasOptionalParams}}
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
+{{#allParams}}
+**{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{#required}}Required{{/required}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}}
+{{/allParams}}
### Return type
diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache
index 426fee7fe8..872148bddd 100644
--- a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache
@@ -24,7 +24,7 @@ impl {{{classname}}}Client {
pub trait {{{classname}}} {
{{#operations}}
{{#operation}}
- fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>;
+ fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>;
{{/operation}}
{{/operations}}
}
@@ -33,7 +33,7 @@ pub trait {{{classname}}} {
impl{{{classname}}} for {{{classname}}}Client {
{{#operations}}
{{#operation}}
- fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> {
+ fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> {
__internal_request::Request::new(hyper::Method::{{{httpMethod}}}, "{{{path}}}".to_string())
{{#hasAuthMethods}}
{{#authMethods}}
diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/api_mod.mustache
index 1deca998a0..d2b4312085 100644
--- a/modules/openapi-generator/src/main/resources/rust/hyper/api_mod.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/hyper/api_mod.mustache
@@ -49,8 +49,6 @@ impl From for Error {
}
}
-use super::models::*;
-
mod request;
{{#apiInfo}}
diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache
index f93577e7cb..2aa7338b4b 100644
--- a/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache
@@ -3,14 +3,13 @@ use std::rc::Rc;
use hyper;
use super::configuration::Configuration;
-pub struct APIClient {
- configuration: Rc>,
+pub struct APIClient {
{{#apiInfo}}
{{#apis}}
{{#operations}}
{{#operation}}
{{#-last}}
- {{{classFilename}}}: Box<::apis::{{{classname}}}>,
+ {{{classFilename}}}: Box,
{{/-last}}
{{/operation}}
{{/operations}}
@@ -18,18 +17,17 @@ pub struct APIClient {
{{/apiInfo}}
}
-impl APIClient {
- pub fn new(configuration: Configuration) -> APIClient {
+impl APIClient {
+ pub fn new(configuration: Configuration) -> APIClient {
let rc = Rc::new(configuration);
APIClient {
- configuration: rc.clone(),
{{#apiInfo}}
{{#apis}}
{{#operations}}
{{#operation}}
{{#-last}}
- {{{classFilename}}}: Box::new(::apis::{{{classname}}}Client::new(rc.clone())),
+ {{{classFilename}}}: Box::new(crate::apis::{{{classname}}}Client::new(rc.clone())),
{{/-last}}
{{/operation}}
{{/operations}}
@@ -43,7 +41,7 @@ impl APIClient {
{{#operations}}
{{#operation}}
{{#-last}}
- pub fn {{{classFilename}}}(&self) -> &::apis::{{{classname}}}{
+ pub fn {{{classFilename}}}(&self) -> &crate::apis::{{{classname}}}{
self.{{{classFilename}}}.as_ref()
}
diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/configuration.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/configuration.mustache
index 449cc61c5d..adb51d6e92 100644
--- a/modules/openapi-generator/src/main/resources/rust/hyper/configuration.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/hyper/configuration.mustache
@@ -1,6 +1,5 @@
{{>partial_header}}
use hyper;
-use std::collections::HashMap;
pub struct Configuration {
pub base_path: String,
diff --git a/modules/openapi-generator/src/main/resources/rust/model.mustache b/modules/openapi-generator/src/main/resources/rust/model.mustache
index 4c6b8dff10..f371e0e703 100644
--- a/modules/openapi-generator/src/main/resources/rust/model.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/model.mustache
@@ -5,9 +5,6 @@
/// {{{classname}}} : {{{description}}}
{{/description}}
-#[allow(unused_imports)]
-use serde_json::Value;
-
{{!-- for enum schemas --}}
{{#isEnum}}
/// {{{description}}}
@@ -23,14 +20,14 @@ pub enum {{classname}} {
{{!-- for non-enum schemas --}}
{{^isEnum}}
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct {{{classname}}} {
{{#vars}}
{{#description}}
/// {{{description}}}
{{/description}}
#[serde(rename = "{{{baseName}}}"{{^required}}, skip_serializing_if = "Option::is_none"{{/required}})]
- pub {{{name}}}: {{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{^required}}Option<{{/required}}{{{dataType}}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^required}}>{{/required}},
+ pub {{{name}}}: {{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{^required}}Option<{{/required}}{{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^required}}>{{/required}},
{{/vars}}
}
@@ -38,7 +35,7 @@ impl {{{classname}}} {
{{#description}}
/// {{{description}}}
{{/description}}
- pub fn new({{#requiredVars}}{{{name}}}: {{#isNullable}}Option<{{/isNullable}}{{{dataType}}}{{#isNullable}}>{{/isNullable}}{{^-last}}, {{/-last}}{{/requiredVars}}) -> {{{classname}}} {
+ pub fn new({{#requiredVars}}{{{name}}}: {{#isNullable}}Option<{{/isNullable}}{{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}>{{/isNullable}}{{^-last}}, {{/-last}}{{/requiredVars}}) -> {{{classname}}} {
{{{classname}}} {
{{#vars}}
{{{name}}}: {{#required}}{{{name}}}{{/required}}{{^required}}{{#isListContainer}}None{{/isListContainer}}{{#isMapContainer}}None{{/isMapContainer}}{{^isContainer}}None{{/isContainer}}{{/required}},
@@ -52,7 +49,7 @@ impl {{{classname}}} {
{{#vars}}
{{#isEnum}}
/// {{{description}}}
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum {{enumName}} {
{{#allowableValues}}
{{#enumVars}}
diff --git a/modules/openapi-generator/src/main/resources/rust/request.rs b/modules/openapi-generator/src/main/resources/rust/request.rs
index 383a409542..2d5c7eb5a6 100644
--- a/modules/openapi-generator/src/main/resources/rust/request.rs
+++ b/modules/openapi-generator/src/main/resources/rust/request.rs
@@ -24,6 +24,7 @@ impl ApiKey {
}
}
+#[allow(dead_code)]
pub(crate) enum Auth {
None,
ApiKey(ApiKey),
diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache
index e6706f7afe..35d25dfde7 100644
--- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache
@@ -4,7 +4,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct {{{classname}}}Client {
configuration: Rc,
@@ -21,7 +21,7 @@ impl {{{classname}}}Client {
pub trait {{{classname}}} {
{{#operations}}
{{#operation}}
- fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error>;
+ fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error>;
{{/operation}}
{{/operations}}
}
@@ -29,11 +29,11 @@ pub trait {{{classname}}} {
impl {{{classname}}} for {{{classname}}}Client {
{{#operations}}
{{#operation}}
- fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> {
+ fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}urlencode({{/isString}}{{{paramName}}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}{{#isString}}){{/isString}}{{/pathParams}});
+ let uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{paramName}}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}{{#isString}}){{/isString}}{{/pathParams}});
let mut req_builder = client.{{{httpMethod}}}(uri_str.as_str());
{{#queryParams}}
diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache
index 318b0f7a0d..93123e31fa 100644
--- a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache
@@ -30,8 +30,6 @@ pub fn urlencode>(s: T) -> String {
::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
}
-use super::models::*;
-
{{#apiInfo}}
{{#apis}}
mod {{{classFilename}}};
diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache
index 33f2b2fd61..9eab132865 100644
--- a/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache
+++ b/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache
@@ -3,13 +3,12 @@ use std::rc::Rc;
use super::configuration::Configuration;
pub struct APIClient {
- configuration: Rc,
{{#apiInfo}}
{{#apis}}
{{#operations}}
{{#operation}}
{{#-last}}
- {{{classFilename}}}: Box<::apis::{{{classname}}}>,
+ {{{classFilename}}}: Box,
{{/-last}}
{{/operation}}
{{/operations}}
@@ -22,13 +21,12 @@ impl APIClient {
let rc = Rc::new(configuration);
APIClient {
- configuration: rc.clone(),
{{#apiInfo}}
{{#apis}}
{{#operations}}
{{#operation}}
{{#-last}}
- {{{classFilename}}}: Box::new(::apis::{{{classname}}}Client::new(rc.clone())),
+ {{{classFilename}}}: Box::new(crate::apis::{{{classname}}}Client::new(rc.clone())),
{{/-last}}
{{/operation}}
{{/operations}}
@@ -42,7 +40,7 @@ impl APIClient {
{{#operations}}
{{#operation}}
{{#-last}}
- pub fn {{{classFilename}}}(&self) -> &::apis::{{{classname}}}{
+ pub fn {{{classFilename}}}(&self) -> &crate::apis::{{{classname}}}{
self.{{{classFilename}}}.as_ref()
}
diff --git a/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache b/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache
new file mode 100644
index 0000000000..9e447e49a6
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache
@@ -0,0 +1,17 @@
+name: {{projectName}}
+targets:
+ {{projectName}}:
+ type: framework
+ platform: iOS
+ deploymentTarget: "10.0"
+ sources: [{{projectName}}]
+ info:
+ path: ./Info.plist
+ version: {{#podVersion}}{{podVersion}}{{/podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}}
+ settings:
+ APPLICATION_EXTENSION_API_ONLY: true
+ scheme: {}
+ dependencies:
+ - carthage: Alamofire{{#useRxSwift}}
+ - carthage: RxSwift{{/useRxSwift}}{{#usePromiseKit}}
+ - carthage: PromiseKit{{/usePromiseKit}}
diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache
index 0ad35d6b14..85573aa8b1 100644
--- a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache
@@ -4,16 +4,15 @@
import { Inject, Injectable, Optional } from '@angular/core';
{{#useHttpClient}}
import { HttpClient, HttpHeaders, HttpParams,
- HttpResponse, HttpEvent } from '@angular/common/http';
-import { CustomHttpUrlEncodingCodec } from '../encoder';
+ HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
+import { CustomHttpParameterCodec } from '../encoder';
{{/useHttpClient}}
{{^useHttpClient}}
-import { Http, Headers, URLSearchParams } from '@angular/http';
-import { RequestMethod, RequestOptions, RequestOptionsArgs } from '@angular/http';
-import { Response, ResponseContentType } from '@angular/http';
+import { Http, Headers, URLSearchParams,
+ RequestMethod, RequestOptions, RequestOptionsArgs,
+ Response, ResponseContentType, QueryEncoder } from '@angular/http';
import { CustomQueryEncoderHelper } from '../encoder';
{{/useHttpClient}}
-
{{^useRxJS6}}
import { Observable } from 'rxjs/Observable';
{{/useRxJS6}}
@@ -59,6 +58,12 @@ export class {{classname}} {
protected basePath = '{{{basePath}}}';
public defaultHeaders = new {{#useHttpClient}}Http{{/useHttpClient}}Headers();
public configuration = new Configuration();
+{{#useHttpClient}}
+ public encoder: HttpParameterCodec;
+{{/useHttpClient}}
+{{^useHttpClient}}
+ public encoder: QueryEncoder;
+{{/useHttpClient}}
constructor(protected {{#useHttpClient}}httpClient: HttpClient{{/useHttpClient}}{{^useHttpClient}}http: Http{{/useHttpClient}}, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
@@ -69,6 +74,12 @@ export class {{classname}} {
} else {
this.configuration.basePath = basePath || this.basePath;
}
+{{#useHttpClient}}
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
+{{/useHttpClient}}
+{{^useHttpClient}}
+ this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
+{{/useHttpClient}}
}
/**
@@ -143,10 +154,10 @@ export class {{classname}} {
{{#hasQueryParams}}
{{#useHttpClient}}
- let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
+ let queryParameters = new HttpParams({encoder: this.encoder});
{{/useHttpClient}}
{{^useHttpClient}}
- let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper());
+ let queryParameters = new URLSearchParams('', this.encoder);
{{/useHttpClient}}
{{#queryParams}}
{{#isListContainer}}
@@ -280,12 +291,12 @@ export class {{classname}} {
formParams = new FormData();
} else {
{{#useHttpClient}}
- formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
+ formParams = new HttpParams({encoder: this.encoder});
{{/useHttpClient}}
{{^useHttpClient}}
// TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed.
convertFormParamsToString = true;
- formParams = new URLSearchParams('', new CustomQueryEncoderHelper());
+ formParams = new URLSearchParams('', this.encoder);
// set the content-type explicitly to avoid having it set to 'text/plain'
headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');
{{/useHttpClient}}
diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache
index 1132f4adc1..272608be3a 100644
--- a/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache
@@ -1,3 +1,10 @@
+{{#useHttpClient}}
+import { HttpParameterCodec } from '@angular/common/http';
+{{/useHttpClient}}
+{{^useHttpClient}}
+import { QueryEncoder } from '@angular/http';
+{{/useHttpClient}}
+
export interface ConfigurationParameters {
apiKeys?: {[ key: string ]: string};
username?: string;
@@ -5,6 +12,12 @@ export interface ConfigurationParameters {
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
+{{#useHttpClient}}
+ encoder?: HttpParameterCodec;
+{{/useHttpClient}}
+{{^useHttpClient}}
+ encoder?: QueryEncoder;
+{{/useHttpClient}}
}
export class Configuration {
@@ -14,6 +27,12 @@ export class Configuration {
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
+{{#useHttpClient}}
+ encoder?: HttpParameterCodec;
+{{/useHttpClient}}
+{{^useHttpClient}}
+ encoder?: QueryEncoder;
+{{/useHttpClient}}
constructor(configurationParameters: ConfigurationParameters = {}) {
this.apiKeys = configurationParameters.apiKeys;
@@ -22,6 +41,7 @@ export class Configuration {
this.accessToken = configurationParameters.accessToken;
this.basePath = configurationParameters.basePath;
this.withCredentials = configurationParameters.withCredentials;
+ this.encoder = configurationParameters.encoder;
}
/**
diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache
index c3ac784124..b3685b0bd9 100644
--- a/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache
@@ -1,30 +1,33 @@
{{#useHttpClient}}
- import { HttpUrlEncodingCodec } from '@angular/common/http';
+import { HttpParameterCodec } from '@angular/common/http';
{{/useHttpClient}}
{{^useHttpClient}}
- import { QueryEncoder } from '@angular/http';
+import { QueryEncoder } from '@angular/http';
{{/useHttpClient}}
{{#useHttpClient}}
/**
-* CustomHttpUrlEncodingCodec
-* Fix plus sign (+) not encoding, so sent as blank space
-* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
+* Custom HttpParameterCodec
+* Workaround for https://github.com/angular/angular/issues/18261
*/
-export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
+export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
- k = super.encodeKey(k);
- return k.replace(/\+/gi, '%2B');
+ return encodeURIComponent(k);
}
encodeValue(v: string): string {
- v = super.encodeValue(v);
- return v.replace(/\+/gi, '%2B');
+ return encodeURIComponent(v);
+ }
+ decodeKey(k: string): string {
+ return decodeURIComponent(k);
+ }
+ decodeValue(v: string): string {
+ return decodeURIComponent(v);
}
}
{{/useHttpClient}}
{{^useHttpClient}}
/**
-* CustomQueryEncoderHelper
+* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache
index 0caee1c44c..867114a179 100644
--- a/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache
@@ -22,8 +22,8 @@
},
{{/useNgPackagr}}
"peerDependencies": {
- "@angular/core": "^{{ngVersion}}",
- "@angular/http": "^{{ngVersion}}",
+ "@angular/core": "^{{ngVersion}}",{{^useHttpClient}}
+ "@angular/http": "^{{ngVersion}}",{{/useHttpClient}}
"@angular/common": "^{{ngVersion}}",
"@angular/compiler": "^{{ngVersion}}",
"core-js": "^2.4.0",
@@ -34,8 +34,8 @@
"@angular/common": "^{{ngVersion}}",
"@angular/compiler": "^{{ngVersion}}",
"@angular/compiler-cli": "^{{ngVersion}}",
- "@angular/core": "^{{ngVersion}}",
- "@angular/http": "^{{ngVersion}}",
+ "@angular/core": "^{{ngVersion}}",{{^useHttpClient}}
+ "@angular/http": "^{{ngVersion}}",{{/useHttpClient}}
"@angular/platform-browser": "^{{ngVersion}}",{{#useNgPackagr}}
"ng-packagr": "^{{ngPackagrVersion}}",{{/useNgPackagr}}
"reflect-metadata": "^0.1.3",
diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
index 36f96f299a..52c5354446 100644
--- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
@@ -118,7 +118,9 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
{{/isDateTime}}
{{^isDateTime}}
{{#isDate}}
- localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any).toISOString();
+ localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ?
+ ({{paramName}} as any).toISOString().substr(0,10) :
+ {{paramName}};
{{/isDate}}
{{^isDate}}
localVarQueryParameter['{{baseName}}'] = {{paramName}};
diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache
index f91cf183d7..662ec63b5b 100644
--- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache
@@ -113,8 +113,8 @@ export class {{classname}} extends runtime.BaseAPI {
}
{{/isBasicBasic}}
{{#isBasicBearer}}
- if (this.configuration && (this.configuration.accessToken || this.configuration.apiKey)) {
- const token = this.configuration.accessToken || this.configuration.apiKey;
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]) : token;
if (tokenString) {
@@ -161,7 +161,7 @@ export class {{classname}} extends runtime.BaseAPI {
})
{{/isCollectionFormatMulti}}
{{^isCollectionFormatMulti}}
- formData.append('{{baseName}}', requestParameters.{{paramName}}.join(COLLECTION_FORMATS["{{collectionFormat}}"]));
+ formData.append('{{baseName}}', requestParameters.{{paramName}}.join(runtime.COLLECTION_FORMATS["{{collectionFormat}}"]));
{{/isCollectionFormatMulti}}
}
@@ -229,14 +229,26 @@ export class {{classname}} extends runtime.BaseAPI {
{{/returnType}}
}
- /**
- {{#notes}}
- * {{¬es}}
- {{/notes}}
- {{#summary}}
- * {{&summary}}
- {{/summary}}
- */
+ /**
+ {{#notes}}
+ * {{¬es}}
+ {{/notes}}
+ {{#summary}}
+ * {{&summary}}
+ {{/summary}}
+ */
+ {{^useSingleRequestParameter}}
+ async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#hasMore}}, {{/hasMore}}{{/allParams}}): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
+ {{#returnType}}
+ const response = await this.{{nickname}}Raw({{#allParams.0}}{ {{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}} }{{/allParams.0}});
+ return await response.value();
+ {{/returnType}}
+ {{^returnType}}
+ await this.{{nickname}}Raw({{#allParams.0}}{ {{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}} }{{/allParams.0}});
+ {{/returnType}}
+ }
+ {{/useSingleRequestParameter}}
+ {{#useSingleRequestParameter}}
async {{nickname}}({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request{{/allParams.0}}): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
{{#returnType}}
const response = await this.{{nickname}}Raw({{#allParams.0}}requestParameters{{/allParams.0}});
@@ -246,6 +258,7 @@ export class {{classname}} extends runtime.BaseAPI {
await this.{{nickname}}Raw({{#allParams.0}}requestParameters{{/allParams.0}});
{{/returnType}}
}
+ {{/useSingleRequestParameter}}
{{/operation}}
}
diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/index.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/index.mustache
index 848ecfa4d1..e548c9df6b 100644
--- a/modules/openapi-generator/src/main/resources/typescript-fetch/index.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-fetch/index.mustache
@@ -1,3 +1,9 @@
export * from './runtime';
+{{#apiInfo}}
+{{#apis.0}}
export * from './apis';
+{{/apis.0}}
+{{/apiInfo}}
+{{#models.0}}
export * from './models';
+{{/models.0}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache
index 8711fc7e59..af08282fac 100644
--- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache
@@ -31,6 +31,9 @@ export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
export function {{classname}}FromJSON(json: any): {{classname}} {
{{#hasVars}}
return {
+ {{#additionalPropertiesType}}
+ ...json,
+ {{/additionalPropertiesType}}
{{#vars}}
{{#isPrimitiveType}}
{{#isDate}}
@@ -77,6 +80,9 @@ export function {{classname}}ToJSON(value?: {{classname}}): any {
return undefined;
}
return {
+ {{#additionalPropertiesType}}
+ ...value,
+ {{/additionalPropertiesType}}
{{#vars}}
{{^isReadOnly}}
{{#isPrimitiveType}}
diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache
index cb7f747ea4..6878fd8495 100644
--- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache
@@ -47,7 +47,7 @@ export class BaseAPI {
// only add the querystring to the URL if there are query parameters.
// this is done to avoid urls ending with a "?" character which buggy webservers
// do not handle correctly sometimes.
- url += '?' + querystring(context.query);
+ url += '?' + this.configuration.queryParamsStringify(context.query);
}
const body = (context.body instanceof FormData || isBlob(context.body))
? context.body
@@ -116,6 +116,7 @@ export interface ConfigurationParameters {
basePath?: string; // override base path
fetchApi?: FetchAPI; // override for fetch implementation
middleware?: Middleware[]; // middleware to apply before/after fetch requests
+ queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
@@ -137,6 +138,10 @@ export class Configuration {
return this.configuration.middleware || [];
}
+ get queryParamsStringify(): (params: HTTPQuery) => string {
+ return this.configuration.queryParamsStringify || querystring;
+ }
+
get username(): string | undefined {
return this.configuration.username;
}
diff --git a/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache b/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache
index c4227e75de..91b263cb5d 100644
--- a/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache
@@ -197,33 +197,35 @@ export class {{classname}} {
{{/bodyParam}}
};
+ let authenticationPromise = Promise.resolve();
{{#authMethods}}
- this.authentications.{{name}}.applyToRequest(localVarRequestOptions);
+ authenticationPromise = authenticationPromise.then(() => this.authentications.{{name}}.applyToRequest(localVarRequestOptions));
{{/authMethods}}
- this.authentications.default.applyToRequest(localVarRequestOptions);
-
- if (Object.keys(localVarFormParams).length) {
- if (localVarUseFormData) {
- (localVarRequestOptions).formData = localVarFormParams;
- } else {
- localVarRequestOptions.form = localVarFormParams;
- }
- }
- return new Promise<{ response: http.{{#supportsES6}}IncomingMessage{{/supportsES6}}{{^supportsES6}}ClientResponse{{/supportsES6}}; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }>((resolve, reject) => {
- localVarRequest(localVarRequestOptions, (error, response, body) => {
- if (error) {
- reject(error);
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
+ return authenticationPromise.then(() => {
+ if (Object.keys(localVarFormParams).length) {
+ if (localVarUseFormData) {
+ (localVarRequestOptions).formData = localVarFormParams;
} else {
- {{#returnType}}
- body = ObjectSerializer.deserialize(body, "{{{returnType}}}");
- {{/returnType}}
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
- resolve({ response: response, body: body });
- } else {
- reject({ response: response, body: body });
- }
+ localVarRequestOptions.form = localVarFormParams;
}
+ }
+ return new Promise<{ response: http.{{#supportsES6}}IncomingMessage{{/supportsES6}}{{^supportsES6}}ClientResponse{{/supportsES6}}; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ {{#returnType}}
+ body = ObjectSerializer.deserialize(body, "{{{returnType}}}");
+ {{/returnType}}
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject({ response: response, body: body });
+ }
+ }
+ });
});
});
}
diff --git a/modules/openapi-generator/src/main/resources/typescript-node/model.mustache b/modules/openapi-generator/src/main/resources/typescript-node/model.mustache
index 0b3ca75891..c9ef8ebbc0 100644
--- a/modules/openapi-generator/src/main/resources/typescript-node/model.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-node/model.mustache
@@ -10,6 +10,7 @@ import { {{classname}} } from './{{filename}}';
* {{{description}}}
*/
{{/description}}
+{{^isEnum}}
export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
{{#vars}}
{{#description}}
@@ -65,5 +66,15 @@ export namespace {{classname}} {
{{/vars}}
}
{{/hasEnums}}
+{{/isEnum}}
+{{#isEnum}}
+export enum {{classname}} {
+ {{#allowableValues}}
+ {{#enumVars}}
+ {{name}} = {{{value}}}{{^-last}},{{/-last}}
+ {{/enumVars}}
+ {{/allowableValues}}
+}
+{{/isEnum}}
{{/model}}
{{/models}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/typescript-node/models.mustache b/modules/openapi-generator/src/main/resources/typescript-node/models.mustache
index f7f1d2e0a8..0bd709c2dd 100644
--- a/modules/openapi-generator/src/main/resources/typescript-node/models.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-node/models.mustache
@@ -34,6 +34,9 @@ let enumsMap: {[index: string]: any} = {
{{/isEnum}}
{{/vars}}
{{/hasEnums}}
+ {{#isEnum}}
+ "{{classname}}": {{classname}},
+ {{/isEnum}}
{{/model}}
{{/models}}
}
@@ -41,7 +44,9 @@ let enumsMap: {[index: string]: any} = {
let typeMap: {[index: string]: any} = {
{{#models}}
{{#model}}
+ {{^isEnum}}
"{{classname}}": {{classname}},
+ {{/isEnum}}
{{/model}}
{{/models}}
}
@@ -161,7 +166,7 @@ export interface Authentication {
/**
* Apply authentication settings to header and query params.
*/
- applyToRequest(requestOptions: localVarRequest.Options): void;
+ applyToRequest(requestOptions: localVarRequest.Options): Promise | void;
}
export class HttpBasicAuth implements Authentication {
diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/README.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/README.mustache
index 624571727a..017994bbe8 100644
--- a/modules/openapi-generator/src/main/resources/typescript-rxjs/README.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/README.mustache
@@ -27,7 +27,7 @@ npm run build
### Publishing
-First build the package then run ```npm publish```
+First build the package then run `npm publish`
### Consuming
@@ -43,3 +43,45 @@ _unPublished (not recommended):_
```
npm install PATH_TO_GENERATED_PACKAGE --save
+```
+
+### How to apply middleware
+
+First, add a singleton class that extends the generated `Configuration` class.
+
+```
+export class AuthInterceptor extends Configuration {
+ private static config: AuthInterceptor;
+
+ private constructor() {
+ const middleware: Middleware[] = [
+ {
+ pre(request: RequestArgs): RequestArgs {
+ const token = getAuthToken();
+
+ return {
+ ...request,
+ headers: {
+ ...request.headers,
+ Authorization: `Bearer ${token}`,
+ },
+ };
+ },
+ },
+ ];
+
+ super({ middleware });
+ }
+
+ public static get Instance() {
+ return AuthInterceptor.config || (AuthInterceptor.config = new this());
+ }
+}
+```
+
+Next, pass it to the generated api controller.
+
+```
+const api = new StoreApi(AuthInterceptor.Instance);
+
+```
diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache
index fe486821da..70614d7f79 100644
--- a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache
@@ -1,7 +1,7 @@
// tslint:disable
{{>licenseInfo}}
import { Observable } from 'rxjs';
-import { BaseAPI, throwIfRequired, HttpHeaders, HttpQuery, COLLECTION_FORMATS } from '../runtime';
+import { BaseAPI{{#hasHttpHeaders}}, HttpHeaders{{/hasHttpHeaders}}{{#hasQueryParams}}, HttpQuery{{/hasQueryParams}}{{#hasRequiredParameters}}, throwIfRequired{{/hasRequiredParameters}}{{#hasPathParams}}, encodeURI{{/hasPathParams}}{{#hasListContainers}}, COLLECTION_FORMATS{{/hasListContainers}} } from '../runtime';
{{#imports.0}}
import {
{{#imports}}
@@ -38,12 +38,15 @@ export class {{classname}} extends BaseAPI {
{{/summary}}
*/
{{nickname}} = ({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request{{/allParams.0}}): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> => {
+ {{#hasParams}}
{{#allParams}}
{{#required}}
throwIfRequired(requestParameters, '{{paramName}}', '{{nickname}}');
{{/required}}
{{/allParams}}
+ {{/hasParams}}
+ {{#hasHttpHeaders}}
const headers: HttpHeaders = {
{{#bodyParam}}
{{^consumes}}
@@ -81,6 +84,8 @@ export class {{classname}} extends BaseAPI {
{{/authMethods}}
};
+ {{/hasHttpHeaders}}
+ {{#hasQueryParams}}
const query: HttpQuery = {
{{#queryParams}}
{{#isListContainer}}
@@ -114,6 +119,7 @@ export class {{classname}} extends BaseAPI {
{{/authMethods}}
};
+ {{/hasQueryParams}}
{{#hasFormParams}}
const formData = new FormData();
{{/hasFormParams}}
@@ -139,10 +145,14 @@ export class {{classname}} extends BaseAPI {
{{/isListContainer}}
{{/formParams}}
return this.request<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>({
- path: `{{{path}}}`{{#pathParams}}.replace({{=<% %>=}}`{<%baseName%>}`<%={{ }}=%>, encodeURIComponent(String(requestParameters.{{paramName}}))){{/pathParams}},
+ path: '{{{path}}}'{{#pathParams}}.replace({{=<% %>=}}'{<%baseName%>}'<%={{ }}=%>, encodeURI(requestParameters.{{paramName}})){{/pathParams}},
method: '{{httpMethod}}',
+ {{#hasHttpHeaders}}
headers,
+ {{/hasHttpHeaders}}
+ {{#hasQueryParams}}
query,
+ {{/hasQueryParams}}
{{#hasBodyParam}}
{{#bodyParam}}
{{#isContainer}}
@@ -161,6 +171,9 @@ export class {{classname}} extends BaseAPI {
{{#hasFormParams}}
body: formData,
{{/hasFormParams}}
+{{#isResponseFile}}
+ responseType: 'blob'
+{{/isResponseFile}}
});
}
diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache
index ce0cc74bbd..543ab776e4 100644
--- a/modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache
@@ -16,8 +16,8 @@ export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
[key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}};
{{/additionalPropertiesType}}
{{#vars}}
- /**
- * {{{description}}}
+ /**{{#description}}
+ * {{{description}}}{{/description}}
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
* @memberof {{classname}}
*/
diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache
index b426f80ab0..429584b64c 100644
--- a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache
+++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache
@@ -1,7 +1,7 @@
// tslint:disable
{{>licenseInfo}}
import { Observable, of } from 'rxjs';
-import { ajax, AjaxResponse } from 'rxjs/ajax';
+import { ajax, AjaxRequest, AjaxResponse } from 'rxjs/ajax';
import { map, concatMap } from 'rxjs/operators';
export const BASE_PATH = '{{{basePath}}}'.replace(/\/+$/, '');
@@ -73,8 +73,8 @@ export class BaseAPI {
withPostMiddleware = (postMiddlewares: Array) =>
this.withMiddleware(postMiddlewares.map((post) => ({ post })));
- protected request = (context: RequestOpts): Observable =>
- this.rxjsRequest(this.createRequestArgs(context)).pipe(
+ protected request = (requestOpts: RequestOpts): Observable =>
+ this.rxjsRequest(this.createRequestArgs(requestOpts)).pipe(
map((res) => {
if (res.status >= 200 && res.status < 300) {
return res.response as T;
@@ -83,46 +83,39 @@ export class BaseAPI {
})
);
- private createRequestArgs = (context: RequestOpts): RequestArgs => {
- let url = this.configuration.basePath + context.path;
- if (context.query !== undefined && Object.keys(context.query).length !== 0) {
+ private createRequestArgs = (requestOpts: RequestOpts): RequestArgs => {
+ let url = this.configuration.basePath + requestOpts.path;
+ if (requestOpts.query !== undefined && Object.keys(requestOpts.query).length !== 0) {
// only add the queryString to the URL if there are query parameters.
// this is done to avoid urls ending with a '?' character which buggy webservers
// do not handle correctly sometimes.
- url += '?' + queryString(context.query);
+ url += '?' + queryString(requestOpts.query);
}
- const body = context.body instanceof FormData ? context.body : JSON.stringify(context.body);
- const options = {
- method: context.method,
- headers: context.headers,
- body,
+
+ return {
+ url,
+ method: requestOpts.method,
+ headers: requestOpts.headers,
+ body: requestOpts.body instanceof FormData ? requestOpts.body : JSON.stringify(requestOpts.body),
+ responseType: requestOpts.responseType || 'json'
};
- return { url, options };
}
- private rxjsRequest = (params: RequestContext): Observable => {
- const preMiddlewares = this.middleware.filter((item) => item.pre);
- const postMiddlewares = this.middleware.filter((item) => item.post);
-
- return of(params).pipe(
- map((args) => {
- if (preMiddlewares) {
- preMiddlewares.forEach((mw) => (args = mw.pre!({ ...args })));
- }
- return args;
+ private rxjsRequest = (params: RequestArgs): Observable =>
+ of(params).pipe(
+ map((request) => {
+ this.middleware.filter((item) => item.pre).forEach((mw) => (request = mw.pre!(request)));
+ return request;
}),
concatMap((args) =>
- ajax({ url: args.url, ...args.options }).pipe(
+ ajax(args).pipe(
map((response) => {
- if (postMiddlewares) {
- postMiddlewares.forEach((mw) => (response = mw.post!({ ...params, response })));
- }
+ this.middleware.filter((item) => item.post).forEach((mw) => (response = mw.post!(response)));
return response;
})
)
)
);
- }
/**
* Create a shallow clone of `this` by constructing a new instance
@@ -151,27 +144,23 @@ export type HttpQuery = { [key: string]: string | number | null | boolean | Arra
export type HttpBody = Json | FormData;
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
-export interface RequestArgs {
- url: string;
- options: RequestInit;
-}
-
export interface RequestOpts {
path: string;
method: HttpMethod;
- headers: HttpHeaders;
+ headers?: HttpHeaders;
query?: HttpQuery;
body?: HttpBody;
+ responseType?: 'json' | 'blob' | 'arraybuffer' | 'text';
}
+export const encodeURI = (value: any) => encodeURIComponent(String(value))
+
const queryString = (params: HttpQuery): string => Object.keys(params)
.map((key) => {
const value = params[key];
- if (value instanceof Array) {
- return value.map((val) => `${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`)
- .join('&');
- }
- return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`;
+ return (value instanceof Array)
+ ? value.map((val) => `${encodeURI(key)}=${encodeURI(val)}`).join('&')
+ : `${encodeURI(key)}=${encodeURI(value)}`;
})
.join('&');
@@ -184,12 +173,11 @@ export const throwIfRequired = (params: {[key: string]: any}, key: string, nickn
}
}
-export interface RequestContext extends RequestArgs {}
-export interface ResponseContext extends RequestArgs {
- response: AjaxResponse;
-}
+// alias for easier importing
+export interface RequestArgs extends AjaxRequest {}
+export interface ResponseArgs extends AjaxResponse {}
export interface Middleware {
- pre?(context: RequestContext): RequestArgs;
- post?(context: ResponseContext): AjaxResponse;
+ pre?(request: RequestArgs): RequestArgs;
+ post?(response: ResponseArgs): ResponseArgs;
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java
index a95b6f106b..871958108e 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java
@@ -578,6 +578,166 @@ public class DefaultCodegenTest {
Assert.assertTrue(property.isNullable);
}
+ @Test
+ public void integerSchemaPropertyAndModelTest() {
+ OpenAPI openAPI = TestUtils.createOpenAPI();
+ final Schema schema = new IntegerSchema().format("int32");
+ final DefaultCodegen codegen = new DefaultCodegen();
+ codegen.setOpenAPI(openAPI);
+
+ //Property:
+ final CodegenProperty cp = codegen.fromProperty("someProperty", schema);
+ Assert.assertEquals(cp.baseType, "integer");
+ Assert.assertEquals(cp.baseName, "someProperty");
+ Assert.assertFalse(cp.isString);
+ Assert.assertTrue(cp.isInteger);
+ Assert.assertFalse(cp.isLong);
+ Assert.assertFalse(cp.isNumber);
+ Assert.assertTrue(cp.isNumeric);
+ Assert.assertFalse(cp.isFloat);
+ Assert.assertFalse(cp.isDouble);
+
+ //Model:
+ final CodegenModel cm = codegen.fromModel("someModel", schema);
+ Assert.assertEquals(cm.dataType, "integer");
+ Assert.assertEquals(cm.name, "someModel");
+ Assert.assertFalse(cm.isString);
+ Assert.assertTrue(cm.isInteger);
+ Assert.assertFalse(cm.isLong);
+ Assert.assertFalse(cm.isNumber);
+ Assert.assertTrue(cm.isNumeric);
+ Assert.assertFalse(cm.isFloat);
+ Assert.assertFalse(cm.isDouble);
+ }
+
+ @Test
+ public void longSchemaPropertyAndModelTest() {
+ OpenAPI openAPI = TestUtils.createOpenAPI();
+ final Schema schema = new IntegerSchema().format("int64");
+ final DefaultCodegen codegen = new DefaultCodegen();
+ codegen.setOpenAPI(openAPI);
+
+ //Property:
+ final CodegenProperty cp = codegen.fromProperty("someProperty", schema);
+ Assert.assertEquals(cp.baseType, "long");
+ Assert.assertEquals(cp.baseName, "someProperty");
+ Assert.assertFalse(cp.isString);
+ Assert.assertFalse(cp.isInteger);
+ Assert.assertTrue(cp.isLong);
+ Assert.assertFalse(cp.isNumber);
+ Assert.assertTrue(cp.isNumeric);
+ Assert.assertFalse(cp.isFloat);
+ Assert.assertFalse(cp.isDouble);
+
+ //Model:
+ final CodegenModel cm = codegen.fromModel("someModel", schema);
+ Assert.assertEquals(cm.dataType, "long");
+ Assert.assertEquals(cm.name, "someModel");
+ Assert.assertFalse(cm.isString);
+ Assert.assertFalse(cm.isInteger);
+ Assert.assertTrue(cm.isLong);
+ Assert.assertFalse(cm.isNumber);
+ Assert.assertTrue(cm.isNumeric);
+ Assert.assertFalse(cm.isFloat);
+ Assert.assertFalse(cm.isDouble);
+ }
+
+ @Test
+ public void numberSchemaPropertyAndModelTest() {
+ OpenAPI openAPI = TestUtils.createOpenAPI();
+ final Schema schema = new NumberSchema();
+ final DefaultCodegen codegen = new DefaultCodegen();
+ codegen.setOpenAPI(openAPI);
+
+ //Property:
+ final CodegenProperty cp = codegen.fromProperty("someProperty", schema);
+ Assert.assertEquals(cp.baseType, "number");
+ Assert.assertEquals(cp.baseName, "someProperty");
+ Assert.assertFalse(cp.isString);
+ Assert.assertFalse(cp.isInteger);
+ Assert.assertFalse(cp.isLong);
+ Assert.assertTrue(cp.isNumber);
+ Assert.assertTrue(cp.isNumeric);
+ Assert.assertFalse(cp.isFloat);
+ Assert.assertFalse(cp.isDouble);
+
+ //Model:
+ final CodegenModel cm = codegen.fromModel("someModel", schema);
+ Assert.assertEquals(cm.dataType, "number");
+ Assert.assertEquals(cm.name, "someModel");
+ Assert.assertFalse(cm.isString);
+ Assert.assertFalse(cm.isInteger);
+ Assert.assertFalse(cm.isLong);
+ Assert.assertTrue(cm.isNumber);
+ Assert.assertTrue(cm.isNumeric);
+ Assert.assertFalse(cm.isFloat);
+ Assert.assertFalse(cm.isDouble);
+ }
+
+ @Test
+ public void numberFloatSchemaPropertyAndModelTest() {
+ OpenAPI openAPI = TestUtils.createOpenAPI();
+ final Schema schema = new NumberSchema().format("float");
+ final DefaultCodegen codegen = new DefaultCodegen();
+ codegen.setOpenAPI(openAPI);
+
+ //Property:
+ final CodegenProperty cp = codegen.fromProperty("someProperty", schema);
+ Assert.assertEquals(cp.baseType, "float");
+ Assert.assertEquals(cp.baseName, "someProperty");
+ Assert.assertFalse(cp.isString);
+ Assert.assertFalse(cp.isInteger);
+ Assert.assertFalse(cp.isLong);
+ Assert.assertFalse(cp.isNumber);
+ Assert.assertTrue(cp.isNumeric);
+ Assert.assertTrue(cp.isFloat);
+ Assert.assertFalse(cp.isDouble);
+
+ //Model:
+ final CodegenModel cm = codegen.fromModel("someModel", schema);
+ Assert.assertEquals(cm.dataType, "float");
+ Assert.assertEquals(cm.name, "someModel");
+ Assert.assertFalse(cm.isString);
+ Assert.assertFalse(cm.isInteger);
+ Assert.assertFalse(cm.isLong);
+ Assert.assertFalse(cm.isNumber);
+ Assert.assertTrue(cm.isNumeric);
+ Assert.assertTrue(cm.isFloat);
+ Assert.assertFalse(cm.isDouble);
+ }
+
+ @Test
+ public void numberDoubleSchemaPropertyAndModelTest() {
+ OpenAPI openAPI = TestUtils.createOpenAPI();
+ final Schema schema = new NumberSchema().format("double");
+ final DefaultCodegen codegen = new DefaultCodegen();
+ codegen.setOpenAPI(openAPI);
+
+ //Property:
+ final CodegenProperty cp = codegen.fromProperty("someProperty", schema);
+ Assert.assertEquals(cp.baseType, "double");
+ Assert.assertEquals(cp.baseName, "someProperty");
+ Assert.assertFalse(cp.isString);
+ Assert.assertFalse(cp.isInteger);
+ Assert.assertFalse(cp.isLong);
+ Assert.assertFalse(cp.isNumber);
+ Assert.assertTrue(cp.isNumeric);
+ Assert.assertFalse(cp.isFloat);
+ Assert.assertTrue(cp.isDouble);
+
+ //Model:
+ final CodegenModel cm = codegen.fromModel("someModel", schema);
+ Assert.assertEquals(cm.dataType, "double");
+ Assert.assertEquals(cm.name, "someModel");
+ Assert.assertFalse(cm.isString);
+ Assert.assertFalse(cm.isInteger);
+ Assert.assertFalse(cm.isLong);
+ Assert.assertFalse(cm.isNumber);
+ Assert.assertTrue(cm.isNumeric);
+ Assert.assertFalse(cm.isFloat);
+ Assert.assertTrue(cm.isDouble);
+ }
+
private void verifyPersonDiscriminator(CodegenDiscriminator discriminator) {
CodegenDiscriminator test = new CodegenDiscriminator();
test.setPropertyName("DollarUnderscoretype");
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java
index 65614c7e51..188d7d2b90 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java
@@ -1,5 +1,6 @@
package org.openapitools.codegen;
+import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import io.swagger.parser.OpenAPIParser;
@@ -70,4 +71,14 @@ public class TestUtils {
}
assertTrue(generatedFiles.containsKey(absoluteFilename), "File '" + absoluteFilename + "' was not fould in the list of generated files");
}
+
+ public static void ensureDoesNotContainsFile(Map generatedFiles, File root, String filename) {
+ File file = new File(root, filename);
+ String absoluteFilename = file.getAbsolutePath().replace("\\", "/");
+ if (generatedFiles.containsKey(absoluteFilename)) {
+ Assert.fail("File '" + absoluteFilename + "' exists in file in list:\n" +
+ generatedFiles.keySet().stream().sorted().collect(Collectors.joining(",\n")));
+ }
+ assertFalse(generatedFiles.containsKey(absoluteFilename), "File '" + absoluteFilename + "' was fould in the list of generated files");
+ }
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/config/CodegenConfiguratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/config/CodegenConfiguratorTest.java
new file mode 100644
index 0000000000..68271020ca
--- /dev/null
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/config/CodegenConfiguratorTest.java
@@ -0,0 +1,122 @@
+/*
+ * 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.config;
+
+import org.openapitools.codegen.ClientOptInput;
+import org.openapitools.codegen.CodegenConfig;
+import org.openapitools.codegen.CodegenConstants;
+import org.openapitools.codegen.DefaultGenerator;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.testng.Assert.*;
+
+public class CodegenConfiguratorTest {
+ private void want(Map additionalProperties, String key, Object expected) {
+ assertEquals(additionalProperties.getOrDefault(key, null), expected);
+ }
+
+ @Test
+ public void shouldSetConfiglProperties() throws IOException {
+ // This tests that properties we set on CodegenConfigurator make it down into generator properties,
+ // limiting to those managed in DefaultCodegen.
+ Map properties = new HashMap() {{
+ put("foo", "bar");
+ put("baz", "quux");
+ put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, true);
+ put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, true);
+ put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, false);
+ put(CodegenConstants.ENSURE_UNIQUE_PARAMS, true);
+ put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, true);
+ put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX, false);
+ put(CodegenConstants.DOCEXTENSION, "D");
+ put(CodegenConstants.ENABLE_POST_PROCESS_FILE, false);
+ put(CodegenConstants.GENERATE_ALIAS_AS_MODEL, true);
+ }};
+
+ File output = Files.createTempDirectory("test").toFile();
+ File template = Files.createTempDirectory("test").toFile();
+ String outDir = Paths.get(output.toURI()).toAbsolutePath().toString();
+ String templateDir = Paths.get(template.toURI()).toAbsolutePath().toString();
+
+ final CodegenConfigurator configurator = new CodegenConfigurator()
+ .setGeneratorName("java")
+ .setAdditionalProperties(properties)
+ .setInputSpec("src/test/resources/3_0/ping.yaml")
+ .addImportMapping("one", "two")
+ .addInstantiationType("three", "four")
+ .addLanguageSpecificPrimitive("five")
+ .addSystemProperty("six", "seven")
+ .addTypeMapping("eight", "nine")
+ .setApiPackage("test-api")
+ .setArtifactId("test-artifactId")
+ .setArtifactVersion("test-artifactVersion")
+ .setAuth("test-auth")
+ .setGitRepoId("git")
+ .setGitUserId("user")
+ .setGroupId("group")
+ .setHttpUserAgent("agent")
+ .setModelNamePrefix("model-prefix")
+ .setModelNameSuffix("model-suffix")
+ .setModelPackage("model-package")
+ .setPackageName("package-name")
+ .setReleaseNote("release-note")
+ .setTemplateDir(templateDir)
+ .setOutputDir(outDir);
+
+ final ClientOptInput clientOptInput = configurator.toClientOptInput();
+
+ CodegenConfig config = clientOptInput.getConfig();
+ config.processOpts();
+
+ Map props = config.additionalProperties();
+
+ // This verifies that things we expect to make it into the template will, as a result of this CodegenConfigurator.
+ want(props, CodegenConstants.MODEL_PACKAGE, "model_package"); // * mutated by codegen
+ want(props, CodegenConstants.API_PACKAGE, "test_api"); // * mutated by codegen
+ want(props, CodegenConstants.HIDE_GENERATION_TIMESTAMP, true);
+ want(props, CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, true);
+ want(props, CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, false);
+ want(props, CodegenConstants.ENSURE_UNIQUE_PARAMS, true);
+ want(props, CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, true);
+ want(props, CodegenConstants.MODEL_NAME_PREFIX, "model-prefix");
+ want(props, CodegenConstants.MODEL_NAME_SUFFIX, "model-suffix");
+ want(props, CodegenConstants.REMOVE_OPERATION_ID_PREFIX, false);
+ want(props, CodegenConstants.DOCEXTENSION, "D");
+ want(props, CodegenConstants.ENABLE_POST_PROCESS_FILE, false);
+ want(props, CodegenConstants.GENERATE_ALIAS_AS_MODEL, true);
+ want(props, CodegenConstants.TEMPLATE_DIR, templateDir);
+ want(props, CodegenConstants.GIT_REPO_ID, "git");
+ want(props, CodegenConstants.GIT_USER_ID, "user");
+ want(props, CodegenConstants.GROUP_ID, "group");
+ want(props, CodegenConstants.ARTIFACT_ID, "test-artifactId");
+ want(props, CodegenConstants.ARTIFACT_VERSION, "test-artifactVersion");
+ want(props, CodegenConstants.HTTP_USER_AGENT, "agent");
+ want(props, CodegenConstants.RELEASE_NOTE, "release-note");
+ want(props, CodegenConstants.PACKAGE_NAME, "package-name");
+
+ // test custom properties
+ want(props, "foo", "bar");
+ want(props, "baz", "quux");
+ }
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java
index 3db02060a1..cd1cdbf6f8 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java
@@ -89,15 +89,31 @@ public class AbstractJavaCodegenTest {
Assert.assertEquals(fakeJavaCodegen.toVarName("USERname"), "usERname");
Assert.assertEquals(fakeJavaCodegen.toVarName("USERNAME"), "USERNAME");
Assert.assertEquals(fakeJavaCodegen.toVarName("USER123NAME"), "USER123NAME");
- }
+ Assert.assertEquals(fakeJavaCodegen.toVarName("1"), "_1");
+ Assert.assertEquals(fakeJavaCodegen.toVarName("1a"), "_1a");
+ Assert.assertEquals(fakeJavaCodegen.toVarName("1A"), "_1A");
+ Assert.assertEquals(fakeJavaCodegen.toVarName("1AAAA"), "_1AAAA");
+ Assert.assertEquals(fakeJavaCodegen.toVarName("1AAaa"), "_1aAaa");
+ }
- @Test
- public void convertModelName() throws Exception {
+ @Test
+ public void convertModelName() throws Exception {
Assert.assertEquals(fakeJavaCodegen.toModelName("name"), "Name");
Assert.assertEquals(fakeJavaCodegen.toModelName("$name"), "Name");
Assert.assertEquals(fakeJavaCodegen.toModelName("nam#e"), "Name");
Assert.assertEquals(fakeJavaCodegen.toModelName("$another-fake?"), "AnotherFake");
- }
+ Assert.assertEquals(fakeJavaCodegen.toModelName("1a"), "Model1a");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("1A"), "Model1A");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("AAAb"), "AAAb");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("aBB"), "ABB");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("AaBBa"), "AaBBa");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("A_B"), "AB");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("A-B"), "AB");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("Aa_Bb"), "AaBb");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("Aa-Bb"), "AaBb");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("Aa_bb"), "AaBb");
+ Assert.assertEquals(fakeJavaCodegen.toModelName("Aa-bb"), "AaBb");
+ }
@Test
public void testInitialConfigValues() throws Exception {
@@ -113,7 +129,6 @@ public class AbstractJavaCodegenTest {
Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools");
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX), "get");
- Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE), Boolean.FALSE);
}
@Test
@@ -124,7 +139,6 @@ public class AbstractJavaCodegenTest {
codegen.setApiPackage("xyz.yyyyy.zzzzzzz.api");
codegen.setInvokerPackage("xyz.yyyyy.zzzzzzz.invoker");
codegen.setBooleanGetterPrefix("is");
- codegen.setUseNullForUnknownEnumValue(true);
codegen.processOpts();
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE);
@@ -136,7 +150,6 @@ public class AbstractJavaCodegenTest {
Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.zzzzzzz.invoker");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.invoker");
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX), "is");
- Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE), Boolean.TRUE);
}
@Test
@@ -147,7 +160,6 @@ public class AbstractJavaCodegenTest {
codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.api.oooooo");
codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "xyz.yyyyy.invoker.oooooo");
codegen.additionalProperties().put(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX, "getBoolean");
- codegen.additionalProperties().put(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE, "true");
codegen.processOpts();
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE);
@@ -159,11 +171,10 @@ public class AbstractJavaCodegenTest {
Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.invoker.oooooo");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.invoker.oooooo");
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX), "getBoolean");
- Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE), Boolean.TRUE);
}
@Test
- public void toEnumValue(){
+ public void toEnumValue() {
final AbstractJavaCodegen codegen = new P_AbstractJavaCodegen();
Assert.assertEquals(codegen.toEnumValue("1", "Integer"), "1");
Assert.assertEquals(codegen.toEnumValue("42", "Double"), "42");
@@ -213,7 +224,7 @@ public class AbstractJavaCodegenTest {
codegen.setOutputDir("/User/open.api.tools");
Assert.assertEquals(codegen.apiDocFileFolder(), "/User/open.api.tools/docs/".replace('/', File.separatorChar));
}
-
+
@Test(description = "tests if API version specification is used if no version is provided in additional properties")
public void openApiversionTest() {
final P_AbstractJavaCodegen codegen = new P_AbstractJavaCodegen();
@@ -310,6 +321,7 @@ public class AbstractJavaCodegenTest {
/**
* Gets artifact version.
* Only for testing purposes.
+ *
* @return version
*/
public String getArtifactVersion() {
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java
index d826048703..61081616fd 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java
@@ -133,11 +133,6 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest {
return useMultipartFeature;
}
- // AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE
- public boolean isUseNullForUnknownEnumValue() {
- return useNullForUnknownEnumValue;
- }
-
// SpringFeatures.USE_SPRING_ANNOTATION_CONFIG
public boolean isUseSpringAnnotationConfig() {
return useSpringAnnotationConfig;
@@ -253,7 +248,6 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest {
additionalProperties.put(AbstractJavaCodegen.JAVA8_MODE, "true");
additionalProperties.put(AbstractJavaCodegen.SUPPORT_ASYNC, "true");
additionalProperties.put(AbstractJavaCodegen.SUPPORT_JAVA6, "false");
- additionalProperties.put(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE, "true");
additionalProperties.put(AbstractJavaCodegen.WITH_XML, "true");
// Options processed by AbstractJavaJAXRSServerCodegen
additionalProperties.put(CodegenConstants.IMPL_FOLDER, "myimpl");
@@ -328,7 +322,6 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest {
assertEquals(testerCodegen.isFullJavaUtil(), true);
assertEquals(testerCodegen.isJava8Mode(), true);
assertEquals(testerCodegen.isSupportAsync(), true);
- assertEquals(testerCodegen.isUseNullForUnknownEnumValue(), true);
assertEquals(testerCodegen.isWithXml(), true);
// Options processed by AbstractJavaJAXRSServerCodegen
assertEquals(testerCodegen.getImplFolder(), "myimpl");
@@ -581,7 +574,6 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest {
assertNull(additionalProperties.get(AbstractJavaCodegen.JAVA8_MODE));
assertNull(additionalProperties.get(AbstractJavaCodegen.SUPPORT_ASYNC));
assertEquals(additionalProperties.get(AbstractJavaCodegen.SUPPORT_JAVA6), Boolean.FALSE);
- assertEquals(additionalProperties.get(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE), false);
assertEquals(additionalProperties.get(AbstractJavaCodegen.WITH_XML), false);
// Options processed by AbstractJavaJAXRSServerCodegen
assertNull(additionalProperties.get(CodegenConstants.IMPL_FOLDER));
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java
index 341d2456f4..e5a13ce839 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java
@@ -1,12 +1,24 @@
package org.openapitools.codegen.java.jaxrs;
+import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
+import io.swagger.v3.oas.models.servers.Server;
+
+import org.openapitools.codegen.ClientOptInput;
+import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenOperation;
+import org.openapitools.codegen.MockDefaultGenerator;
+import org.openapitools.codegen.TestUtils;
+import org.openapitools.codegen.config.CodegenConfigurator;
+import org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen;
+import org.openapitools.codegen.languages.JavaClientCodegen;
import org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+import java.io.File;
+import java.nio.file.Files;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -22,7 +34,79 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
public void before() {
codegen = new JavaJAXRSSpecServerCodegen();
}
-
+
+ @Test
+ public void testInitialConfigValues() throws Exception {
+ final JavaJAXRSSpecServerCodegen codegen = new JavaJAXRSSpecServerCodegen();
+ codegen.processOpts();
+
+ OpenAPI openAPI = new OpenAPI();
+ openAPI.addServersItem(new Server().url("https://api.abcde.xy:8082/v2"));
+ codegen.preprocessOpenAPI(openAPI);
+
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE);
+ Assert.assertEquals(codegen.isHideGenerationTimestamp(), false);
+ Assert.assertEquals(codegen.modelPackage(), "org.openapitools.model");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "org.openapitools.model");
+ Assert.assertEquals(codegen.apiPackage(), "org.openapitools.api");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "org.openapitools.api");
+ Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools.api");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools.api");
+ Assert.assertEquals(codegen.additionalProperties().get(JavaJAXRSSpecServerCodegen.SERVER_PORT), "8082");
+ Assert.assertEquals(codegen.getOpenApiSpecFileLocation(), "src/main/openapi/openapi.yaml");
+ Assert.assertEquals(codegen.additionalProperties().get(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION), "src/main/openapi/openapi.yaml");
+ }
+
+ @Test
+ public void testSettersForConfigValues() throws Exception {
+ final JavaJAXRSSpecServerCodegen codegen = new JavaJAXRSSpecServerCodegen();
+ codegen.setHideGenerationTimestamp(true);
+ codegen.setModelPackage("xx.yyyyyyyy.model");
+ codegen.setApiPackage("xx.yyyyyyyy.api");
+ codegen.setInvokerPackage("xx.yyyyyyyy.invoker");
+ codegen.setOpenApiSpecFileLocation("src/main/resources/META-INF/openapi.yaml");
+ codegen.processOpts();
+
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE);
+ Assert.assertEquals(codegen.isHideGenerationTimestamp(), true);
+ Assert.assertEquals(codegen.modelPackage(), "xx.yyyyyyyy.model");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "xx.yyyyyyyy.model");
+ Assert.assertEquals(codegen.apiPackage(), "xx.yyyyyyyy.api");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "xx.yyyyyyyy.api");
+ Assert.assertEquals(codegen.getInvokerPackage(), "xx.yyyyyyyy.invoker");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xx.yyyyyyyy.invoker");
+ Assert.assertEquals(codegen.getOpenApiSpecFileLocation(), "src/main/resources/META-INF/openapi.yaml");
+ Assert.assertEquals(codegen.additionalProperties().get(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION), "src/main/resources/META-INF/openapi.yaml");
+ }
+
+ @Test
+ public void testAdditionalPropertiesPutForConfigValues() throws Exception {
+ final JavaJAXRSSpecServerCodegen codegen = new JavaJAXRSSpecServerCodegen();
+ codegen.additionalProperties().put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true");
+ codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.mmmmm.model");
+ codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.aaaaa.api");
+ codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "xyz.yyyyy.iiii.invoker");
+ codegen.additionalProperties().put("serverPort", "8088");
+ codegen.additionalProperties().put(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION, "openapi.yml");
+ codegen.processOpts();
+
+ OpenAPI openAPI = new OpenAPI();
+ openAPI.addServersItem(new Server().url("https://api.abcde.xy:8082/v2"));
+ codegen.preprocessOpenAPI(openAPI);
+
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE);
+ Assert.assertEquals(codegen.isHideGenerationTimestamp(), true);
+ Assert.assertEquals(codegen.modelPackage(), "xyz.yyyyy.mmmmm.model");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "xyz.yyyyy.mmmmm.model");
+ Assert.assertEquals(codegen.apiPackage(), "xyz.yyyyy.aaaaa.api");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "xyz.yyyyy.aaaaa.api");
+ Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.iiii.invoker");
+ Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.iiii.invoker");
+ Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaJAXRSServerCodegen.SERVER_PORT), "8088");
+ Assert.assertEquals(codegen.getOpenApiSpecFileLocation(), "openapi.yml");
+ Assert.assertEquals(codegen.additionalProperties().get(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION), "openapi.yml");
+ }
+
/**
* Test
* {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String, Operation, CodegenOperation, Map)} for Resource with path "/" and set tag.
@@ -33,14 +117,14 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
codegenOperation.operationId = "findPrimaryresource";
Operation operation = new Operation();
Map> operationList = new HashMap<>();
-
+
codegen.addOperationToGroup("Primaryresource", "/", operation, codegenOperation, operationList);
-
+
Assert.assertEquals(operationList.size(), 1);
Assert.assertTrue(operationList.containsKey(""));
Assert.assertEquals(codegenOperation.baseName, "Primaryresource");
}
-
+
/**
* Test
* {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String, Operation, CodegenOperation, Map)} for Resource with path param.
@@ -51,14 +135,14 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
codegenOperation.operationId = "getPrimaryresource";
Operation operation = new Operation();
Map> operationList = new HashMap<>();
-
+
codegen.addOperationToGroup("Primaryresource", "/{uuid}", operation, codegenOperation, operationList);
-
+
Assert.assertEquals(operationList.size(), 1);
Assert.assertTrue(operationList.containsKey(""));
Assert.assertEquals(codegenOperation.baseName, "Primaryresource");
}
-
+
/**
* Test
* {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String,
@@ -70,14 +154,14 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
codegenOperation.path = "/subresource";
Operation operation = new Operation();
Map> operationList = new HashMap<>();
-
+
codegen.addOperationToGroup("Default", "/subresource", operation, codegenOperation, operationList);
-
+
Assert.assertEquals(codegenOperation.baseName, "subresource");
Assert.assertEquals(operationList.size(), 1);
Assert.assertTrue(operationList.containsKey("subresource"));
}
-
+
/**
* Test {@link JavaJAXRSSpecServerCodegen#toApiName(String)} with subresource.
*/
@@ -86,7 +170,7 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
final String subresource = codegen.toApiName("subresource");
Assert.assertEquals(subresource, "SubresourceApi");
}
-
+
/**
* Test {@link JavaJAXRSSpecServerCodegen#toApiName(String)} with primary resource.
*/
@@ -97,8 +181,103 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
Operation operation = new Operation();
Map> operationList = new HashMap<>();
codegen.addOperationToGroup("Primaryresource", "/", operation, codegenOperation, operationList);
-
+
final String subresource = codegen.toApiName("");
Assert.assertEquals(subresource, "PrimaryresourceApi");
}
+
+ @Test
+ public void testGeneratePingDefaultLocation() throws Exception {
+ Map properties = new HashMap<>();
+ properties.put(JavaClientCodegen.JAVA8_MODE, true);
+
+ File output = Files.createTempDirectory("test").toFile();
+
+ final CodegenConfigurator configurator = new CodegenConfigurator()
+ .setGeneratorName("jaxrs-spec")
+ .setAdditionalProperties(properties)
+ .setInputSpec("src/test/resources/3_0/ping.yaml")
+ .setOutputDir(output.getAbsolutePath().replace("\\", "/"));
+
+ final ClientOptInput clientOptInput = configurator.toClientOptInput();
+ MockDefaultGenerator generator = new MockDefaultGenerator();
+ generator.opts(clientOptInput).generate();
+
+ Map generatedFiles = generator.getFiles();
+ TestUtils.ensureContainsFile(generatedFiles, output, "src/main/openapi/openapi.yaml");
+
+ output.deleteOnExit();
+ }
+
+ @Test
+ public void testGeneratePingNoSpecFile() throws Exception {
+ Map properties = new HashMap<>();
+ properties.put(JavaClientCodegen.JAVA8_MODE, true);
+ properties.put(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION, "");
+
+ File output = Files.createTempDirectory("test").toFile();
+
+ final CodegenConfigurator configurator = new CodegenConfigurator()
+ .setGeneratorName("jaxrs-spec")
+ .setAdditionalProperties(properties)
+ .setInputSpec("src/test/resources/3_0/ping.yaml")
+ .setOutputDir(output.getAbsolutePath().replace("\\", "/"));
+
+ final ClientOptInput clientOptInput = configurator.toClientOptInput();
+ MockDefaultGenerator generator = new MockDefaultGenerator();
+ generator.opts(clientOptInput).generate();
+
+ Map generatedFiles = generator.getFiles();
+ TestUtils.ensureDoesNotContainsFile(generatedFiles, output, "src/main/openapi/openapi.yaml");
+
+ output.deleteOnExit();
+ }
+
+ @Test
+ public void testGeneratePingAlternativeLocation1() throws Exception {
+ Map properties = new HashMap<>();
+ properties.put(JavaClientCodegen.JAVA8_MODE, true);
+ properties.put(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION, "src/main/resources/META-INF/openapi.yaml");
+
+ File output = Files.createTempDirectory("test").toFile();
+
+ final CodegenConfigurator configurator = new CodegenConfigurator()
+ .setGeneratorName("jaxrs-spec")
+ .setAdditionalProperties(properties)
+ .setInputSpec("src/test/resources/3_0/ping.yaml")
+ .setOutputDir(output.getAbsolutePath().replace("\\", "/"));
+
+ final ClientOptInput clientOptInput = configurator.toClientOptInput();
+ MockDefaultGenerator generator = new MockDefaultGenerator();
+ generator.opts(clientOptInput).generate();
+
+ Map generatedFiles = generator.getFiles();
+ TestUtils.ensureContainsFile(generatedFiles, output, "src/main/resources/META-INF/openapi.yaml");
+
+ output.deleteOnExit();
+ }
+
+ @Test
+ public void testGeneratePingAlternativeLocation2() throws Exception {
+ Map properties = new HashMap<>();
+ properties.put(JavaClientCodegen.JAVA8_MODE, true);
+ properties.put(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION, "openapi.yml");
+
+ File output = Files.createTempDirectory("test").toFile();
+
+ final CodegenConfigurator configurator = new CodegenConfigurator()
+ .setGeneratorName("jaxrs-spec")
+ .setAdditionalProperties(properties)
+ .setInputSpec("src/test/resources/3_0/ping.yaml")
+ .setOutputDir(output.getAbsolutePath().replace("\\", "/"));
+
+ final ClientOptInput clientOptInput = configurator.toClientOptInput();
+ MockDefaultGenerator generator = new MockDefaultGenerator();
+ generator.opts(clientOptInput).generate();
+
+ Map generatedFiles = generator.getFiles();
+ TestUtils.ensureContainsFile(generatedFiles, output, "openapi.yml");
+
+ output.deleteOnExit();
+ }
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java
index 46d991e03c..28cb997208 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java
@@ -51,6 +51,7 @@ public class TypeScriptFetchClientOptionsProvider implements OptionsProvider {
.put(TypeScriptFetchClientCodegen.NPM_REPOSITORY, NPM_REPOSITORY)
.put(TypeScriptFetchClientCodegen.SNAPSHOT, Boolean.FALSE.toString())
.put(TypeScriptFetchClientCodegen.WITH_INTERFACES, Boolean.FALSE.toString())
+ .put(TypeScriptFetchClientCodegen.USE_SINGLE_REQUEST_PARAMETER, Boolean.FALSE.toString())
.put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE)
.put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE)
.build();
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypescriptNodeEnumIntegrationTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypescriptNodeEnumIntegrationTest.java
new file mode 100644
index 0000000000..dbba7f0427
--- /dev/null
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypescriptNodeEnumIntegrationTest.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package org.openapitools.codegen.typescript.typescriptnode;
+
+import org.openapitools.codegen.AbstractIntegrationTest;
+import org.openapitools.codegen.CodegenConfig;
+import org.openapitools.codegen.languages.TypeScriptFetchClientCodegen;
+import org.openapitools.codegen.languages.TypeScriptNodeClientCodegen;
+import org.openapitools.codegen.testutils.IntegrationTestPathsConfig;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class TypescriptNodeEnumIntegrationTest extends AbstractIntegrationTest {
+
+ @Override
+ protected CodegenConfig getCodegenConfig() {
+ return new TypeScriptNodeClientCodegen();
+ }
+
+ @Override
+ protected Map configProperties() {
+ Map properties = new HashMap<>();
+ properties.put("npmName", "node-es6-test");
+ properties.put("npmVersion", "1.0.3");
+ properties.put("snapshot", "false");
+ properties.put("supportsES6", "false");
+
+ return properties;
+ }
+
+ @Override
+ protected IntegrationTestPathsConfig getIntegrationTestPathsConfig() {
+ return new IntegrationTestPathsConfig("typescript/objectsWithEnums");
+ }
+}
diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
index a8a0687c73..42c3d46a8b 100644
--- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
@@ -1580,6 +1580,7 @@ components:
- fish
- crab
OuterEnum:
+ nullable: true
type: string
enum:
- placed
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.gitignore b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.gitignore
new file mode 100644
index 0000000000..35e2fb2b02
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.gitignore
@@ -0,0 +1,3 @@
+wwwroot/*.js
+node_modules
+typings
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.openapi-generator-ignore b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.openapi-generator-ignore
new file mode 100644
index 0000000000..7484ee590a
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.openapi-generator/VERSION b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.openapi-generator/VERSION
new file mode 100644
index 0000000000..717311e32e
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/.openapi-generator/VERSION
@@ -0,0 +1 @@
+unset
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api.ts
new file mode 100644
index 0000000000..4b76122d80
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api.ts
@@ -0,0 +1,3 @@
+// This is the entrypoint for the package
+export * from './api/apis';
+export * from './model/models';
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api/apis.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api/apis.ts
new file mode 100644
index 0000000000..8a6789d357
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api/apis.ts
@@ -0,0 +1,3 @@
+export * from './defaultApi';
+import { DefaultApi } from './defaultApi';
+export const APIS = [DefaultApi];
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api/defaultApi.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api/defaultApi.ts
new file mode 100644
index 0000000000..899c76592a
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/api/defaultApi.ts
@@ -0,0 +1,171 @@
+/**
+ * OpenAPI enums
+ * Tests generation of enums with open opi
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import localVarRequest = require('request');
+import http = require('http');
+import Promise = require('bluebird');
+
+/* tslint:disable:no-unused-locals */
+import { ObjectWithEnums } from '../model/objectWithEnums';
+
+import { ObjectSerializer, Authentication, HttpBasicAuth, ApiKeyAuth, OAuth, VoidAuth } from '../model/models';
+
+let defaultBasePath = 'http://enums.openapi3';
+
+// ===============================================
+// This file is autogenerated - Please do not edit
+// ===============================================
+
+export enum DefaultApiApiKeys {
+}
+
+export class DefaultApi {
+ protected _basePath = defaultBasePath;
+ protected defaultHeaders : any = {};
+ protected _useQuerystring : boolean = false;
+
+ protected authentications = {
+ 'default': new VoidAuth(),
+ }
+
+ constructor(basePath?: string);
+ constructor(basePathOrUsername: string, password?: string, basePath?: string) {
+ if (password) {
+ if (basePath) {
+ this.basePath = basePath;
+ }
+ } else {
+ if (basePathOrUsername) {
+ this.basePath = basePathOrUsername
+ }
+ }
+ }
+
+ set useQuerystring(value: boolean) {
+ this._useQuerystring = value;
+ }
+
+ set basePath(basePath: string) {
+ this._basePath = basePath;
+ }
+
+ get basePath() {
+ return this._basePath;
+ }
+
+ public setDefaultAuthentication(auth: Authentication) {
+ this.authentications.default = auth;
+ }
+
+ public setApiKey(key: DefaultApiApiKeys, value: string) {
+ (this.authentications as any)[DefaultApiApiKeys[key]].apiKey = value;
+ }
+
+ /**
+ *
+ */
+ public getObjectWithEnums (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> {
+ const localVarPath = this.basePath + '/getobjectwithenums';
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders);
+ let localVarFormParams: any = {};
+
+ (Object).assign(localVarHeaderParams, options.headers);
+
+ let localVarUseFormData = false;
+
+ let localVarRequestOptions: localVarRequest.Options = {
+ method: 'GET',
+ qs: localVarQueryParameters,
+ headers: localVarHeaderParams,
+ uri: localVarPath,
+ useQuerystring: this._useQuerystring,
+ json: true,
+ };
+
+ this.authentications.default.applyToRequest(localVarRequestOptions);
+
+ if (Object.keys(localVarFormParams).length) {
+ if (localVarUseFormData) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ body = ObjectSerializer.deserialize(body, "Array");
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject({ response: response, body: body });
+ }
+ }
+ });
+ });
+ }
+ /**
+ *
+ * @param objectWithEnums
+ */
+ public postObjectWithEnums (objectWithEnums: ObjectWithEnums, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> {
+ const localVarPath = this.basePath + '/postobjectwithenums';
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders);
+ let localVarFormParams: any = {};
+
+ // verify required parameter 'objectWithEnums' is not null or undefined
+ if (objectWithEnums === null || objectWithEnums === undefined) {
+ throw new Error('Required parameter objectWithEnums was null or undefined when calling postObjectWithEnums.');
+ }
+
+ (Object).assign(localVarHeaderParams, options.headers);
+
+ let localVarUseFormData = false;
+
+ let localVarRequestOptions: localVarRequest.Options = {
+ method: 'POST',
+ qs: localVarQueryParameters,
+ headers: localVarHeaderParams,
+ uri: localVarPath,
+ useQuerystring: this._useQuerystring,
+ json: true,
+ body: ObjectSerializer.serialize(objectWithEnums, "ObjectWithEnums")
+ };
+
+ this.authentications.default.applyToRequest(localVarRequestOptions);
+
+ if (Object.keys(localVarFormParams).length) {
+ if (localVarUseFormData) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ return new Promise<{ response: http.ClientResponse; body?: any; }>((resolve, reject) => {
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
+ if (error) {
+ reject(error);
+ } else {
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
+ resolve({ response: response, body: body });
+ } else {
+ reject({ response: response, body: body });
+ }
+ }
+ });
+ });
+ }
+}
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/git_push.sh b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/git_push.sh
new file mode 100644
index 0000000000..26bdd7ca69
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/git_push.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id=""
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id=""
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note=""
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=`git remote`
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/externalEnum.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/externalEnum.ts
new file mode 100644
index 0000000000..39d91b9163
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/externalEnum.ts
@@ -0,0 +1,17 @@
+/**
+ * OpenAPI enums
+ * Tests generation of enums with open opi
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+export enum ExternalEnum {
+ Green = 'green',
+ Yellow = 'yellow'
+}
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/models.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/models.ts
new file mode 100644
index 0000000000..896cb58875
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/models.ts
@@ -0,0 +1,191 @@
+export * from './externalEnum';
+export * from './objectWithEnums';
+
+import localVarRequest = require('request');
+
+import { ExternalEnum } from './externalEnum';
+import { ObjectWithEnums } from './objectWithEnums';
+
+/* tslint:disable:no-unused-variable */
+let primitives = [
+ "string",
+ "boolean",
+ "double",
+ "integer",
+ "long",
+ "float",
+ "number",
+ "any"
+ ];
+
+let enumsMap: {[index: string]: any} = {
+ "ExternalEnum": ExternalEnum,
+ "ObjectWithEnums.EnumInObjectEnum": ObjectWithEnums.EnumInObjectEnum,
+}
+
+let typeMap: {[index: string]: any} = {
+ "ObjectWithEnums": ObjectWithEnums,
+}
+
+export class ObjectSerializer {
+ public static findCorrectType(data: any, expectedType: string) {
+ if (data == undefined) {
+ return expectedType;
+ } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
+ return expectedType;
+ } else if (expectedType === "Date") {
+ return expectedType;
+ } else {
+ if (enumsMap[expectedType]) {
+ return expectedType;
+ }
+
+ if (!typeMap[expectedType]) {
+ return expectedType; // w/e we don't know the type
+ }
+
+ // Check the discriminator
+ let discriminatorProperty = typeMap[expectedType].discriminator;
+ if (discriminatorProperty == null) {
+ return expectedType; // the type does not have a discriminator. use it.
+ } else {
+ if (data[discriminatorProperty]) {
+ var discriminatorType = data[discriminatorProperty];
+ if(typeMap[discriminatorType]){
+ return discriminatorType; // use the type given in the discriminator
+ } else {
+ return expectedType; // discriminator did not map to a type
+ }
+ } else {
+ return expectedType; // discriminator was not present (or an empty string)
+ }
+ }
+ }
+ }
+
+ public static serialize(data: any, type: string) {
+ if (data == undefined) {
+ return data;
+ } else if (primitives.indexOf(type.toLowerCase()) !== -1) {
+ return data;
+ } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
+ let subType: string = type.replace("Array<", ""); // Array => Type>
+ subType = subType.substring(0, subType.length - 1); // Type> => Type
+ let transformedData: any[] = [];
+ for (let index in data) {
+ let date = data[index];
+ transformedData.push(ObjectSerializer.serialize(date, subType));
+ }
+ return transformedData;
+ } else if (type === "Date") {
+ return data.toISOString();
+ } else {
+ if (enumsMap[type]) {
+ return data;
+ }
+ if (!typeMap[type]) { // in case we dont know the type
+ return data;
+ }
+
+ // Get the actual type of this object
+ type = this.findCorrectType(data, type);
+
+ // get the map for the correct type.
+ let attributeTypes = typeMap[type].getAttributeTypeMap();
+ let instance: {[index: string]: any} = {};
+ for (let index in attributeTypes) {
+ let attributeType = attributeTypes[index];
+ instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
+ }
+ return instance;
+ }
+ }
+
+ public static deserialize(data: any, type: string) {
+ // polymorphism may change the actual type.
+ type = ObjectSerializer.findCorrectType(data, type);
+ if (data == undefined) {
+ return data;
+ } else if (primitives.indexOf(type.toLowerCase()) !== -1) {
+ return data;
+ } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
+ let subType: string = type.replace("Array<", ""); // Array => Type>
+ subType = subType.substring(0, subType.length - 1); // Type> => Type
+ let transformedData: any[] = [];
+ for (let index in data) {
+ let date = data[index];
+ transformedData.push(ObjectSerializer.deserialize(date, subType));
+ }
+ return transformedData;
+ } else if (type === "Date") {
+ return new Date(data);
+ } else {
+ if (enumsMap[type]) {// is Enum
+ return data;
+ }
+
+ if (!typeMap[type]) { // dont know the type
+ return data;
+ }
+ let instance = new typeMap[type]();
+ let attributeTypes = typeMap[type].getAttributeTypeMap();
+ for (let index in attributeTypes) {
+ let attributeType = attributeTypes[index];
+ instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
+ }
+ return instance;
+ }
+ }
+}
+
+export interface Authentication {
+ /**
+ * Apply authentication settings to header and query params.
+ */
+ applyToRequest(requestOptions: localVarRequest.Options): void;
+}
+
+export class HttpBasicAuth implements Authentication {
+ public username: string = '';
+ public password: string = '';
+
+ applyToRequest(requestOptions: localVarRequest.Options): void {
+ requestOptions.auth = {
+ username: this.username, password: this.password
+ }
+ }
+}
+
+export class ApiKeyAuth implements Authentication {
+ public apiKey: string = '';
+
+ constructor(private location: string, private paramName: string) {
+ }
+
+ applyToRequest(requestOptions: localVarRequest.Options): void {
+ if (this.location == "query") {
+ (requestOptions.qs)[this.paramName] = this.apiKey;
+ } else if (this.location == "header" && requestOptions && requestOptions.headers) {
+ requestOptions.headers[this.paramName] = this.apiKey;
+ }
+ }
+}
+
+export class OAuth implements Authentication {
+ public accessToken: string = '';
+
+ applyToRequest(requestOptions: localVarRequest.Options): void {
+ if (requestOptions && requestOptions.headers) {
+ requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
+ }
+ }
+}
+
+export class VoidAuth implements Authentication {
+ public username: string = '';
+ public password: string = '';
+
+ applyToRequest(_: localVarRequest.Options): void {
+ // Do nothing
+ }
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/objectWithEnums.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/objectWithEnums.ts
new file mode 100644
index 0000000000..c6675fdafd
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/model/objectWithEnums.ts
@@ -0,0 +1,43 @@
+/**
+ * OpenAPI enums
+ * Tests generation of enums with open opi
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+import { ExternalEnum } from './externalEnum';
+
+export class ObjectWithEnums {
+ 'enumInObject'?: ObjectWithEnums.EnumInObjectEnum;
+ 'externalEnum'?: ExternalEnum;
+
+ static discriminator: string | undefined = undefined;
+
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
+ {
+ "name": "enumInObject",
+ "baseName": "enumInObject",
+ "type": "ObjectWithEnums.EnumInObjectEnum"
+ },
+ {
+ "name": "externalEnum",
+ "baseName": "externalEnum",
+ "type": "ExternalEnum"
+ } ];
+
+ static getAttributeTypeMap() {
+ return ObjectWithEnums.attributeTypeMap;
+ }
+}
+
+export namespace ObjectWithEnums {
+ export enum EnumInObjectEnum {
+ Red = 'red',
+ Blue = 'blue'
+ }
+}
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/package.json
new file mode 100644
index 0000000000..18383fe4b8
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "node-es6-test",
+ "version": "1.0.3",
+ "description": "NodeJS client for node-es6-test",
+ "repository": "/",
+ "main": "dist/api.js",
+ "types": "dist/api.d.ts",
+ "scripts": {
+ "clean": "rm -Rf node_modules/ *.js",
+ "build": "tsc",
+ "test": "npm run build && node dist/client.js"
+ },
+ "author": "OpenAPI-Generator Contributors",
+ "license": "Unlicense",
+ "dependencies": {
+ "bluebird": "^3.5.0",
+ "request": "^2.81.0",
+ "@types/bluebird": "*",
+ "@types/request": "*",
+ "rewire": "^3.0.2"
+ },
+ "devDependencies": {
+ "typescript": "^2.4.2",
+ "@types/node": "8.10.34"
+ }
+}
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/tsconfig.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/tsconfig.json
new file mode 100644
index 0000000000..ba2570a4be
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-expected/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "noImplicitAny": false,
+ "suppressImplicitAnyIndexErrors": true,
+ "target": "ES5",
+ "strict": true,
+ "moduleResolution": "node",
+ "removeComments": true,
+ "sourceMap": true,
+ "noLib": false,
+ "declaration": true,
+ "lib": ["dom", "es6", "es5", "dom.iterable", "scripthost"],
+ "outDir": "dist"
+ },
+ "exclude": [
+ "dist",
+ "node_modules"
+ ]
+}
diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-spec.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-spec.json
new file mode 100644
index 0000000000..cf5b2ddd75
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/objectsWithEnums-spec.json
@@ -0,0 +1,91 @@
+{
+ "openapi" : "3.0.0",
+ "info" : {
+ "title" : "OpenAPI enums",
+ "description" : "Tests generation of enums with open opi",
+ "version" : "1.0.0"
+ },
+ "servers" : [ {
+ "url" : "http://enums.openapi3"
+ } ],
+ "paths" : {
+ "/postobjectwithenums" : {
+ "post" : {
+ "operationId" : "postObjectWithEnums",
+ "requestBody" : {
+ "$ref" : "#/components/requestBodies/ObjectWithEnums"
+ },
+ "responses" : {
+ "405" : {
+ "description" : "Invalid input"
+ }
+ }
+ }
+ },
+ "/getobjectwithenums" : {
+ "get" : {
+ "operationId" : "getObjectWithEnums",
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "content" : {
+ "application/xml" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/ObjectWithEnums"
+ }
+ }
+ },
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/ObjectWithEnums"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components" : {
+ "schemas" : {
+ "ObjectWithEnums" : {
+ "type" : "object",
+ "properties" : {
+ "enumInObject" : {
+ "type" : "string",
+ "enum" : [ "red", "blue" ]
+ },
+ "externalEnum" : {
+ "$ref" : "#/components/schemas/ExternalEnum"
+ }
+ }
+ },
+ "ExternalEnum" : {
+ "type" : "string",
+ "enum" : [ "green", "yellow" ]
+ }
+ },
+ "requestBodies" : {
+ "ObjectWithEnums" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ObjectWithEnums"
+ }
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ObjectWithEnums"
+ }
+ }
+ },
+ "required" : true
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d906fab397..7cb07df2f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1064,8 +1064,8 @@
samples/server/petstore/rust-server
samples/server/petstore/python-aiohttp
-
+ samples/server/petstore/python-flask
+ samples/server/petstore/python-flask-python2
@@ -1244,6 +1244,20 @@
samples/server/petstore/spring-mvc-j8-localdatetime
+
+
+ samples.droneio
+
+
+ env
+ samples.droneio
+
+
+
+
+ samples/client/petstore/java/native
+
+
samples.misc
diff --git a/samples/client/petstore/R/docs/PetApi.md b/samples/client/petstore/R/docs/PetApi.md
index fe69ffb556..1e782619f4 100644
--- a/samples/client/petstore/R/docs/PetApi.md
+++ b/samples/client/petstore/R/docs/PetApi.md
@@ -119,7 +119,7 @@ dput(result)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **status** | [**array[character]**](character.md)| Status values that need to be considered for filter |
+ **status** | Enum [available, pending, sold] | Status values that need to be considered for filter |
### Return type
@@ -161,7 +161,7 @@ dput(result)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tags** | [**array[character]**](character.md)| Tags to filter by |
+ **tags** | list( **character** )| Tags to filter by |
### Return type
diff --git a/samples/client/petstore/R/docs/UserApi.md b/samples/client/petstore/R/docs/UserApi.md
index c69c5987ed..a0fe81e5fe 100644
--- a/samples/client/petstore/R/docs/UserApi.md
+++ b/samples/client/petstore/R/docs/UserApi.md
@@ -73,7 +73,7 @@ api.instance$CreateUsersWithArrayInput(var.body)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**array[User]**](User.md)| List of user object |
+ **body** | list( [**User**](User.md) )| List of user object |
### Return type
@@ -110,7 +110,7 @@ api.instance$CreateUsersWithListInput(var.body)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**array[User]**](User.md)| List of user object |
+ **body** | list( [**User**](User.md) )| List of user object |
### Return type
diff --git a/samples/client/petstore/android/httpclient/pom.xml b/samples/client/petstore/android/httpclient/pom.xml
index 981fbebda6..455f6be5ff 100644
--- a/samples/client/petstore/android/httpclient/pom.xml
+++ b/samples/client/petstore/android/httpclient/pom.xml
@@ -131,6 +131,12 @@
swagger-annotations
${swagger-core-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.google.code.gson
gson
diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
index d96260ba33..83a328a922 100644
--- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
+++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.2-SNAPSHOT
\ No newline at end of file
+4.1.0-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 2fe8209ac1..aa71d9cdfb 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIApiResponse.h
@@ -53,7 +53,7 @@ public:
void setMessage(const QString &message);
-
+
virtual bool isSet() const override;
virtual bool isValid() const override;
diff --git a/samples/client/petstore/cpp-qt5/client/OAICategory.h b/samples/client/petstore/cpp-qt5/client/OAICategory.h
index 129d974857..966f5e295f 100644
--- a/samples/client/petstore/cpp-qt5/client/OAICategory.h
+++ b/samples/client/petstore/cpp-qt5/client/OAICategory.h
@@ -49,7 +49,7 @@ public:
void setName(const QString &name);
-
+
virtual bool isSet() const override;
virtual bool isValid() const override;
diff --git a/samples/client/petstore/cpp-qt5/client/OAIEnum.h b/samples/client/petstore/cpp-qt5/client/OAIEnum.h
index a5e619960f..66625c43b6 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIEnum.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIEnum.h
@@ -24,7 +24,7 @@ class OAIEnum {
OAIEnum() {
}
-
+
OAIEnum(QString jsonString) {
fromJson(jsonString);
}
@@ -57,7 +57,7 @@ class OAIEnum {
return true;
}
private :
- QString jstr;
+ QString jstr;
};
}
diff --git a/samples/client/petstore/cpp-qt5/client/OAIHelpers.cpp b/samples/client/petstore/cpp-qt5/client/OAIHelpers.cpp
index bbe372ea85..fa0ba7d9f2 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIHelpers.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIHelpers.cpp
@@ -229,7 +229,7 @@ fromJsonValue(QString &value, const QJsonValue &jval){
} else if(jval.isDouble()){
value = QString::number(jval.toDouble());
} else {
- ok = false;
+ ok = false;
}
} else {
ok = false;
@@ -239,7 +239,7 @@ fromJsonValue(QString &value, const QJsonValue &jval){
bool
fromJsonValue(QDateTime &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(!jval.isUndefined() && !jval.isNull() && jval.isString()){
value = QDateTime::fromString(jval.toString(), Qt::ISODate);
ok = value.isValid();
@@ -263,7 +263,7 @@ fromJsonValue(QByteArray &value, const QJsonValue &jval){
bool
fromJsonValue(QDate &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(!jval.isUndefined() && !jval.isNull() && jval.isString()){
value = QDate::fromString(jval.toString(), Qt::ISODate);
ok = value.isValid();
@@ -275,7 +275,7 @@ fromJsonValue(QDate &value, const QJsonValue &jval){
bool
fromJsonValue(qint32 &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(!jval.isUndefined() && !jval.isNull() && !jval.isObject() && !jval.isArray()){
value = jval.toInt();
} else {
@@ -286,7 +286,7 @@ fromJsonValue(qint32 &value, const QJsonValue &jval){
bool
fromJsonValue(qint64 &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(!jval.isUndefined() && !jval.isNull() && !jval.isObject() && !jval.isArray()){
value = jval.toVariant().toLongLong();
} else {
@@ -297,7 +297,7 @@ fromJsonValue(qint64 &value, const QJsonValue &jval){
bool
fromJsonValue(bool &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(jval.isBool()){
value = jval.toBool();
} else {
@@ -308,7 +308,7 @@ fromJsonValue(bool &value, const QJsonValue &jval){
bool
fromJsonValue(float &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(jval.isDouble()){
value = static_cast(jval.toDouble());
} else {
@@ -319,7 +319,7 @@ fromJsonValue(float &value, const QJsonValue &jval){
bool
fromJsonValue(double &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(jval.isDouble()){
value = jval.toDouble();
} else {
@@ -330,7 +330,7 @@ fromJsonValue(double &value, const QJsonValue &jval){
bool
fromJsonValue(OAIObject &value, const QJsonValue &jval){
- bool ok = true;
+ bool ok = true;
if(jval.isObject()){
value.fromJsonObject(jval.toObject());
ok = value.isValid();
diff --git a/samples/client/petstore/cpp-qt5/client/OAIHelpers.h b/samples/client/petstore/cpp-qt5/client/OAIHelpers.h
index ce7cec3fc7..0555e5dc24 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIHelpers.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIHelpers.h
@@ -138,7 +138,7 @@ namespace OpenAPI {
ok = false;
}
return ok;
- }
+ }
template
bool fromJsonValue(QMap &val, const QJsonValue &jval) {
diff --git a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp
index 8fdd4ea5e9..a2ec8558ce 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.cpp
@@ -54,7 +54,7 @@ OAIHttpRequestWorker::OAIHttpRequestWorker(QObject *parent)
: QObject(parent), manager(nullptr)
{
qsrand(QDateTime::currentDateTime().toTime_t());
- timeout = 0;
+ timeout = 0;
timer = new QTimer();
manager = new QNetworkAccessManager(this);
connect(manager, &QNetworkAccessManager::finished, this, &OAIHttpRequestWorker::on_manager_finished);
@@ -66,7 +66,7 @@ OAIHttpRequestWorker::~OAIHttpRequestWorker() {
timer->stop();
}
timer->deleteLater();
- }
+ }
}
QMap OAIHttpRequestWorker::getResponseHeaders() const {
diff --git a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h
index b7380595c0..ad3c31f694 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIHttpRequest.h
@@ -85,10 +85,10 @@ signals:
private:
QNetworkAccessManager *manager;
QMap headers;
- int timeout;
- void on_manager_timeout(QNetworkReply *reply);
+ 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 babc1e64fb..83757b5671 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIObject.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIObject.h
@@ -24,7 +24,7 @@ class OAIObject {
OAIObject() {
}
-
+
OAIObject(QString jsonString) {
fromJson(jsonString);
}
diff --git a/samples/client/petstore/cpp-qt5/client/OAIOrder.h b/samples/client/petstore/cpp-qt5/client/OAIOrder.h
index c9b006d363..79b3fe7413 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIOrder.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIOrder.h
@@ -66,7 +66,7 @@ public:
void setComplete(const bool &complete);
-
+
virtual bool isSet() const override;
virtual bool isValid() const override;
diff --git a/samples/client/petstore/cpp-qt5/client/OAIPet.h b/samples/client/petstore/cpp-qt5/client/OAIPet.h
index 6bec604d21..f4e357e693 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIPet.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIPet.h
@@ -68,7 +68,7 @@ public:
void setStatus(const QString &status);
-
+
virtual bool isSet() const override;
virtual bool isValid() const override;
diff --git a/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp
index 3e83ea0066..1341a73c3b 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp
@@ -57,7 +57,7 @@ OAIPetApi::addPet(const OAIPet& body) {
fullPath.append(this->host).append(this->basePath).append("/pet");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
@@ -104,12 +104,12 @@ void
OAIPetApi::deletePet(const qint64& pet_id, const QString& api_key) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
- QString pet_idPathParam("{");
+ QString pet_idPathParam("{");
pet_idPathParam.append("petId").append("}");
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");
if (api_key != nullptr) {
@@ -197,7 +197,7 @@ OAIPetApi::findPetsByStatus(const QList& status) {
}
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -292,7 +292,7 @@ OAIPetApi::findPetsByTags(const QList& tags) {
}
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -345,12 +345,12 @@ void
OAIPetApi::getPetById(const qint64& pet_id) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
- QString pet_idPathParam("{");
+ QString pet_idPathParam("{");
pet_idPathParam.append("petId").append("}");
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -396,7 +396,7 @@ OAIPetApi::updatePet(const OAIPet& body) {
fullPath.append(this->host).append(this->basePath).append("/pet");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "PUT");
@@ -443,12 +443,12 @@ void
OAIPetApi::updatePetWithForm(const qint64& pet_id, const QString& name, const QString& status) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
- QString pet_idPathParam("{");
+ QString pet_idPathParam("{");
pet_idPathParam.append("petId").append("}");
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
if (name != nullptr) {
input.add_var("name", name);
@@ -497,12 +497,12 @@ void
OAIPetApi::uploadFile(const qint64& pet_id, const QString& additional_metadata, const OAIHttpRequestInputFileElement*& file) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}/uploadImage");
- QString pet_idPathParam("{");
+ QString pet_idPathParam("{");
pet_idPathParam.append("petId").append("}");
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ 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 bd64db93db..449de95853 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h
@@ -36,7 +36,7 @@ public:
void setHost(const QString& host);
void setApiTimeOutMs(const int tout);
void addHeaders(const QString& key, const QString& value);
-
+
void addPet(const OAIPet& body);
void deletePet(const qint64& pet_id, const QString& api_key);
void findPetsByStatus(const QList& status);
diff --git a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp
index 90ac22d129..7b2e37f635 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp
@@ -55,12 +55,12 @@ void
OAIStoreApi::deleteOrder(const QString& order_id) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order/{orderId}");
- QString order_idPathParam("{");
+ QString order_idPathParam("{");
order_idPathParam.append("orderId").append("}");
fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(order_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");
@@ -105,7 +105,7 @@ OAIStoreApi::getInventory() {
fullPath.append(this->host).append(this->basePath).append("/store/inventory");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -158,12 +158,12 @@ void
OAIStoreApi::getOrderById(const qint64& order_id) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order/{orderId}");
- QString order_idPathParam("{");
+ QString order_idPathParam("{");
order_idPathParam.append("orderId").append("}");
fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(order_id)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -209,7 +209,7 @@ OAIStoreApi::placeOrder(const OAIOrder& body) {
fullPath.append(this->host).append(this->basePath).append("/store/order");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ 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 e532321dcd..2f9d41b998 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h
@@ -35,7 +35,7 @@ public:
void setHost(const QString& host);
void setApiTimeOutMs(const int tout);
void addHeaders(const QString& key, const QString& value);
-
+
void deleteOrder(const QString& order_id);
void getInventory();
void getOrderById(const qint64& order_id);
diff --git a/samples/client/petstore/cpp-qt5/client/OAITag.h b/samples/client/petstore/cpp-qt5/client/OAITag.h
index 497a021f08..1ea18b3867 100644
--- a/samples/client/petstore/cpp-qt5/client/OAITag.h
+++ b/samples/client/petstore/cpp-qt5/client/OAITag.h
@@ -49,7 +49,7 @@ public:
void setName(const QString &name);
-
+
virtual bool isSet() const override;
virtual bool isValid() const override;
diff --git a/samples/client/petstore/cpp-qt5/client/OAIUser.h b/samples/client/petstore/cpp-qt5/client/OAIUser.h
index 556de32258..f7dd6591ec 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIUser.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIUser.h
@@ -73,7 +73,7 @@ public:
void setUserStatus(const qint32 &user_status);
-
+
virtual bool isSet() const override;
virtual bool isValid() const override;
diff --git a/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp b/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp
index 36a418994f..57556eab78 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp
+++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp
@@ -57,7 +57,7 @@ OAIUserApi::createUser(const OAIUser& body) {
fullPath.append(this->host).append(this->basePath).append("/user");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
@@ -106,7 +106,7 @@ OAIUserApi::createUsersWithArrayInput(const QList& body) {
fullPath.append(this->host).append(this->basePath).append("/user/createWithArray");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
@@ -156,7 +156,7 @@ OAIUserApi::createUsersWithListInput(const QList& body) {
fullPath.append(this->host).append(this->basePath).append("/user/createWithList");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
@@ -204,12 +204,12 @@ void
OAIUserApi::deleteUser(const QString& username) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
- QString usernamePathParam("{");
+ QString usernamePathParam("{");
usernamePathParam.append("username").append("}");
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");
@@ -252,12 +252,12 @@ void
OAIUserApi::getUserByName(const QString& username) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
- QString usernamePathParam("{");
+ QString usernamePathParam("{");
usernamePathParam.append("username").append("}");
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -319,7 +319,7 @@ OAIUserApi::loginUser(const QString& username, const QString& password) {
.append(QUrl::toPercentEncoding(::OpenAPI::toStringValue(password)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -347,7 +347,7 @@ OAIUserApi::loginUserCallback(OAIHttpRequestWorker * worker) {
else {
msg = "Error: " + worker->error_str;
}
- QString output;
+ QString output;
::OpenAPI::fromStringValue(QString(worker->response), output);
worker->deleteLater();
@@ -366,7 +366,7 @@ OAIUserApi::logoutUser() {
fullPath.append(this->host).append(this->basePath).append("/user/logout");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");
@@ -409,12 +409,12 @@ void
OAIUserApi::updateUser(const QString& username, const OAIUser& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
- QString usernamePathParam("{");
+ QString usernamePathParam("{");
usernamePathParam.append("username").append("}");
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
- worker->setTimeOut(timeout);
+ 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 d95814e071..454210caa6 100644
--- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h
+++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h
@@ -35,7 +35,7 @@ public:
void setHost(const QString& host);
void setApiTimeOutMs(const int tout);
void addHeaders(const QString& key, const QString& value);
-
+
void createUser(const OAIUser& body);
void createUsersWithArrayInput(const QList& body);
void createUsersWithListInput(const QList& body);
diff --git a/samples/client/petstore/cpp-qt5/client/client.pri b/samples/client/petstore/cpp-qt5/client/client.pri
index c2b0a272a1..ca6c9b5524 100644
--- a/samples/client/petstore/cpp-qt5/client/client.pri
+++ b/samples/client/petstore/cpp-qt5/client/client.pri
@@ -16,7 +16,7 @@ HEADERS += \
$${PWD}/OAIHelpers.h \
$${PWD}/OAIHttpRequest.h \
$${PWD}/OAIObject.h
- $${PWD}/OAIEnum.h
+ $${PWD}/OAIEnum.h
SOURCES += \
# Models
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION
index 479c313e87..83a328a922 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.3-SNAPSHOT
\ No newline at end of file
+4.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/README.md b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/README.md
index 0d0008ed4f..693df464eb 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/README.md
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/README.md
@@ -4,7 +4,6 @@ This is a sample server Petstore server. For this sample, you can use the api ke
This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project:
- API version: 1.0.0
-- Build date: 2019-06-29T11:26:01.157+12:00[Pacific/Auckland]
- Build package: org.openapitools.codegen.languages.DartJaguarClientCodegen
## Requirements
@@ -55,7 +54,7 @@ import 'package:openapi/api.dart';
// TODO Configure OAuth2 access token for authorization: petstore_auth
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-final jaguarApiGen = JaguarApiGen();
+final jaguarApiGen = Openapi();
var api_instance = jaguarApiGen.getPetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/api.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/api.dart
index 23e4217515..d077b86fe9 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/api.dart
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/lib/api.dart
@@ -29,7 +29,7 @@ final _jsonJaguarRepo = JsonRepo()
..add(TagSerializer())
..add(UserSerializer())
;
-final Map converters = {
+final Map defaultConverters = {
MimeTypes.json: _jsonJaguarRepo,
};
@@ -37,7 +37,7 @@ final Map converters = {
final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()];
-class JaguarApiGen {
+class Openapi {
List interceptors;
String basePath = "http://petstore.swagger.io/v2";
Route _baseRoute;
@@ -46,7 +46,7 @@ class JaguarApiGen {
/**
* Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added)
*/
- JaguarApiGen({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
+ Openapi({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
_baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? IOClient());
if(interceptors == null) {
this.interceptors = _defaultInterceptors;
@@ -86,7 +86,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return PetApi(base: base, converters: converters, timeout: timeout);
}
@@ -101,7 +101,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return StoreApi(base: base, converters: converters, timeout: timeout);
}
@@ -116,7 +116,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return UserApi(base: base, converters: converters, timeout: timeout);
}
diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION
index 479c313e87..83a328a922 100644
--- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.3-SNAPSHOT
\ No newline at end of file
+4.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/README.md b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/README.md
index e50b342433..693df464eb 100644
--- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/README.md
+++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/README.md
@@ -4,7 +4,6 @@ This is a sample server Petstore server. For this sample, you can use the api ke
This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project:
- API version: 1.0.0
-- Build date: 2019-06-29T11:26:04.013+12:00[Pacific/Auckland]
- Build package: org.openapitools.codegen.languages.DartJaguarClientCodegen
## Requirements
@@ -55,7 +54,7 @@ import 'package:openapi/api.dart';
// TODO Configure OAuth2 access token for authorization: petstore_auth
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-final jaguarApiGen = JaguarApiGen();
+final jaguarApiGen = Openapi();
var api_instance = jaguarApiGen.getPetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/lib/api.dart b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/lib/api.dart
index bed06dd13d..60148b8f58 100644
--- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/lib/api.dart
+++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/lib/api.dart
@@ -39,7 +39,7 @@ final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true)
..add((data) => Tag.fromBuffer(List.from(data)))
..add((data) => User.fromBuffer(List.from(data)))
;
-final Map converters = {
+final Map defaultConverters = {
MimeTypes.json: _jsonJaguarRepo,
MimeTypes.binary: _protoJaguarRepo,
};
@@ -47,7 +47,7 @@ final Map converters = {
final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()];
-class JaguarApiGen {
+class Openapi {
List interceptors;
String basePath = "http://petstore.swagger.io/v2";
Route _baseRoute;
@@ -56,7 +56,7 @@ class JaguarApiGen {
/**
* Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added)
*/
- JaguarApiGen({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
+ Openapi({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
_baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? IOClient());
if(interceptors == null) {
this.interceptors = _defaultInterceptors;
@@ -96,7 +96,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return PetApi(base: base, converters: converters, timeout: timeout);
}
@@ -111,7 +111,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return StoreApi(base: base, converters: converters, timeout: timeout);
}
@@ -126,7 +126,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return UserApi(base: base, converters: converters, timeout: timeout);
}
diff --git a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION
index 479c313e87..83a328a922 100644
--- a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.3-SNAPSHOT
\ No newline at end of file
+4.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/dart-jaguar/openapi/README.md b/samples/client/petstore/dart-jaguar/openapi/README.md
index 2b99d076a7..693df464eb 100644
--- a/samples/client/petstore/dart-jaguar/openapi/README.md
+++ b/samples/client/petstore/dart-jaguar/openapi/README.md
@@ -4,7 +4,6 @@ This is a sample server Petstore server. For this sample, you can use the api ke
This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project:
- API version: 1.0.0
-- Build date: 2019-06-29T11:25:59.502+12:00[Pacific/Auckland]
- Build package: org.openapitools.codegen.languages.DartJaguarClientCodegen
## Requirements
@@ -55,7 +54,7 @@ import 'package:openapi/api.dart';
// TODO Configure OAuth2 access token for authorization: petstore_auth
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-final jaguarApiGen = JaguarApiGen();
+final jaguarApiGen = Openapi();
var api_instance = jaguarApiGen.getPetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
diff --git a/samples/client/petstore/dart-jaguar/openapi/lib/api.dart b/samples/client/petstore/dart-jaguar/openapi/lib/api.dart
index 23e4217515..d077b86fe9 100644
--- a/samples/client/petstore/dart-jaguar/openapi/lib/api.dart
+++ b/samples/client/petstore/dart-jaguar/openapi/lib/api.dart
@@ -29,7 +29,7 @@ final _jsonJaguarRepo = JsonRepo()
..add(TagSerializer())
..add(UserSerializer())
;
-final Map converters = {
+final Map defaultConverters = {
MimeTypes.json: _jsonJaguarRepo,
};
@@ -37,7 +37,7 @@ final Map converters = {
final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()];
-class JaguarApiGen {
+class Openapi {
List interceptors;
String basePath = "http://petstore.swagger.io/v2";
Route _baseRoute;
@@ -46,7 +46,7 @@ class JaguarApiGen {
/**
* Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added)
*/
- JaguarApiGen({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
+ Openapi({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
_baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? IOClient());
if(interceptors == null) {
this.interceptors = _defaultInterceptors;
@@ -86,7 +86,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return PetApi(base: base, converters: converters, timeout: timeout);
}
@@ -101,7 +101,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return StoreApi(base: base, converters: converters, timeout: timeout);
}
@@ -116,7 +116,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return UserApi(base: base, converters: converters, timeout: timeout);
}
diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION
index 479c313e87..83a328a922 100644
--- a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION
+++ b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.3-SNAPSHOT
\ No newline at end of file
+4.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/README.md b/samples/client/petstore/dart-jaguar/openapi_proto/README.md
index 761fc689ef..693df464eb 100644
--- a/samples/client/petstore/dart-jaguar/openapi_proto/README.md
+++ b/samples/client/petstore/dart-jaguar/openapi_proto/README.md
@@ -4,7 +4,6 @@ This is a sample server Petstore server. For this sample, you can use the api ke
This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project:
- API version: 1.0.0
-- Build date: 2019-06-29T11:26:07.058+12:00[Pacific/Auckland]
- Build package: org.openapitools.codegen.languages.DartJaguarClientCodegen
## Requirements
@@ -55,7 +54,7 @@ import 'package:openapi/api.dart';
// TODO Configure OAuth2 access token for authorization: petstore_auth
//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-final jaguarApiGen = JaguarApiGen();
+final jaguarApiGen = Openapi();
var api_instance = jaguarApiGen.getPetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/lib/api.dart b/samples/client/petstore/dart-jaguar/openapi_proto/lib/api.dart
index bed06dd13d..60148b8f58 100644
--- a/samples/client/petstore/dart-jaguar/openapi_proto/lib/api.dart
+++ b/samples/client/petstore/dart-jaguar/openapi_proto/lib/api.dart
@@ -39,7 +39,7 @@ final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true)
..add((data) => Tag.fromBuffer(List.from(data)))
..add((data) => User.fromBuffer(List.from(data)))
;
-final Map converters = {
+final Map defaultConverters = {
MimeTypes.json: _jsonJaguarRepo,
MimeTypes.binary: _protoJaguarRepo,
};
@@ -47,7 +47,7 @@ final Map converters = {
final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()];
-class JaguarApiGen {
+class Openapi {
List interceptors;
String basePath = "http://petstore.swagger.io/v2";
Route _baseRoute;
@@ -56,7 +56,7 @@ class JaguarApiGen {
/**
* Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added)
*/
- JaguarApiGen({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
+ Openapi({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) {
_baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? IOClient());
if(interceptors == null) {
this.interceptors = _defaultInterceptors;
@@ -96,7 +96,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return PetApi(base: base, converters: converters, timeout: timeout);
}
@@ -111,7 +111,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return StoreApi(base: base, converters: converters, timeout: timeout);
}
@@ -126,7 +126,7 @@ class JaguarApiGen {
base = _baseRoute;
}
if(converters == null) {
- converters = this.converters;
+ converters = defaultConverters;
}
return UserApi(base: base, converters: converters, timeout: timeout);
}
diff --git a/samples/client/petstore/go-experimental/auth_test.go b/samples/client/petstore/go-experimental/auth_test.go
index 5f817703a8..7da448adce 100644
--- a/samples/client/petstore/go-experimental/auth_test.go
+++ b/samples/client/petstore/go-experimental/auth_test.go
@@ -37,8 +37,9 @@ func TestOAuth2(t *testing.T) {
tokenSource := cfg.TokenSource(createContext(nil), &tok)
auth := context.WithValue(context.Background(), sw.ContextOAuth2, tokenSource)
- newPet := (sw.Pet{Id: 12992, Name: "gopher",
- PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}})
+ newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"),
+ PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
+ Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background(), newPet)
@@ -71,8 +72,9 @@ func TestBasicAuth(t *testing.T) {
Password: "f4k3p455",
})
- newPet := (sw.Pet{Id: 12992, Name: "gopher",
- PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}})
+ newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"),
+ PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
+ Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(auth, newPet)
@@ -100,8 +102,9 @@ func TestBasicAuth(t *testing.T) {
func TestAccessToken(t *testing.T) {
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "TESTFAKEACCESSTOKENISFAKE")
- newPet := (sw.Pet{Id: 12992, Name: "gopher",
- PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}})
+ newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"),
+ PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
+ Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(nil, newPet)
@@ -129,8 +132,9 @@ func TestAccessToken(t *testing.T) {
func TestAPIKeyNoPrefix(t *testing.T) {
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{Key: "TEST123"})
- newPet := (sw.Pet{Id: 12992, Name: "gopher",
- PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}})
+ newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"),
+ PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
+ Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background(), newPet)
@@ -163,8 +167,9 @@ func TestAPIKeyNoPrefix(t *testing.T) {
func TestAPIKeyWithPrefix(t *testing.T) {
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{Key: "TEST123", Prefix: "Bearer"})
- newPet := (sw.Pet{Id: 12992, Name: "gopher",
- PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}})
+ newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"),
+ PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
+ Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(nil, newPet)
@@ -196,8 +201,9 @@ func TestAPIKeyWithPrefix(t *testing.T) {
func TestDefaultHeader(t *testing.T) {
- newPet := (sw.Pet{Id: 12992, Name: "gopher",
- PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}})
+ newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: sw.PtrString("gopher"),
+ PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
+ Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background(), newPet)
diff --git a/samples/client/petstore/go-experimental/fake_api_test.go b/samples/client/petstore/go-experimental/fake_api_test.go
index f4242b5048..e97bcb4846 100644
--- a/samples/client/petstore/go-experimental/fake_api_test.go
+++ b/samples/client/petstore/go-experimental/fake_api_test.go
@@ -14,8 +14,8 @@ func TestPutBodyWithFileSchema(t *testing.T) {
return // early return to test compilation
schema := sw.FileSchemaTestClass{
- File: sw.File{SourceURI: "https://example.com/image.png"},
- Files: []sw.File{{SourceURI: "https://example.com/image.png"}}}
+ File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")},
+ Files: &[]sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}}
r, err := client.FakeApi.TestBodyWithFileSchema(context.Background(), schema)
diff --git a/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION
index 479c313e87..83a328a922 100644
--- a/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION
+++ b/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.3-SNAPSHOT
\ No newline at end of file
+4.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/go-experimental/go-petstore/README.md b/samples/client/petstore/go-experimental/go-petstore/README.md
index 025ee80f2e..f9cf57d259 100644
--- a/samples/client/petstore/go-experimental/go-petstore/README.md
+++ b/samples/client/petstore/go-experimental/go-petstore/README.md
@@ -199,6 +199,22 @@ r, err := client.Service.Operation(auth, args)
```
+## Documentation for Utility Methods
+
+Due to the fact that model structure members are all pointers, this package contains
+a number of utility functions to easily obtain pointers to values of basic types.
+Each of these functions takes a value of the given basic type and returns a pointer to it:
+
+* `PtrBool`
+* `PtrInt`
+* `PtrInt32`
+* `PtrInt64`
+* `PtrFloat`
+* `PtrFloat32`
+* `PtrFloat64`
+* `PtrString`
+* `PtrTime`
+
## Author
diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md
index eadec3142c..47b71f2a71 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **string** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *AdditionalPropertiesAnyType) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *AdditionalPropertiesAnyType) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *AdditionalPropertiesAnyType) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/AdditionalPropertiesArray.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md
index 0c37598aeb..b8d3d2e343 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **string** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *AdditionalPropertiesArray) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *AdditionalPropertiesArray) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *AdditionalPropertiesArray) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *AdditionalPropertiesArray) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md
index 7190fe8429..2c27fcebb9 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **string** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *AdditionalPropertiesBoolean) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *AdditionalPropertiesBoolean) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *AdditionalPropertiesBoolean) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md
index 877a5d45a3..a676667ed7 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md
@@ -4,17 +4,295 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**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]
+**MapString** | Pointer to **map[string]string** | | [optional]
+**MapNumber** | Pointer to **map[string]float32** | | [optional]
+**MapInteger** | Pointer to **map[string]int32** | | [optional]
+**MapBoolean** | Pointer to **map[string]bool** | | [optional]
+**MapArrayInteger** | Pointer to [**map[string][]int32**](array.md) | | [optional]
+**MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional]
+**MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
+**MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional]
+**Anytype1** | Pointer to [**map[string]interface{}**](.md) | | [optional]
+**Anytype2** | Pointer to [**map[string]interface{}**](.md) | | [optional]
+**Anytype3** | Pointer to [**map[string]interface{}**](.md) | | [optional]
+
+## Methods
+
+### GetMapString
+
+`func (o *AdditionalPropertiesClass) GetMapString() map[string]string`
+
+GetMapString returns the MapString field if non-nil, zero value otherwise.
+
+### GetMapStringOk
+
+`func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool)`
+
+GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapString
+
+`func (o *AdditionalPropertiesClass) HasMapString() bool`
+
+HasMapString returns a boolean if a field has been set.
+
+### SetMapString
+
+`func (o *AdditionalPropertiesClass) SetMapString(v map[string]string)`
+
+SetMapString gets a reference to the given map[string]string and assigns it to the MapString field.
+
+### GetMapNumber
+
+`func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32`
+
+GetMapNumber returns the MapNumber field if non-nil, zero value otherwise.
+
+### GetMapNumberOk
+
+`func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool)`
+
+GetMapNumberOk returns a tuple with the MapNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapNumber
+
+`func (o *AdditionalPropertiesClass) HasMapNumber() bool`
+
+HasMapNumber returns a boolean if a field has been set.
+
+### SetMapNumber
+
+`func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32)`
+
+SetMapNumber gets a reference to the given map[string]float32 and assigns it to the MapNumber field.
+
+### GetMapInteger
+
+`func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32`
+
+GetMapInteger returns the MapInteger field if non-nil, zero value otherwise.
+
+### GetMapIntegerOk
+
+`func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool)`
+
+GetMapIntegerOk returns a tuple with the MapInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapInteger
+
+`func (o *AdditionalPropertiesClass) HasMapInteger() bool`
+
+HasMapInteger returns a boolean if a field has been set.
+
+### SetMapInteger
+
+`func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32)`
+
+SetMapInteger gets a reference to the given map[string]int32 and assigns it to the MapInteger field.
+
+### GetMapBoolean
+
+`func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool`
+
+GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise.
+
+### GetMapBooleanOk
+
+`func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool)`
+
+GetMapBooleanOk returns a tuple with the MapBoolean field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapBoolean
+
+`func (o *AdditionalPropertiesClass) HasMapBoolean() bool`
+
+HasMapBoolean returns a boolean if a field has been set.
+
+### SetMapBoolean
+
+`func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool)`
+
+SetMapBoolean gets a reference to the given map[string]bool and assigns it to the MapBoolean field.
+
+### GetMapArrayInteger
+
+`func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32`
+
+GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value otherwise.
+
+### GetMapArrayIntegerOk
+
+`func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool)`
+
+GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapArrayInteger
+
+`func (o *AdditionalPropertiesClass) HasMapArrayInteger() bool`
+
+HasMapArrayInteger returns a boolean if a field has been set.
+
+### SetMapArrayInteger
+
+`func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32)`
+
+SetMapArrayInteger gets a reference to the given map[string][]int32 and assigns it to the MapArrayInteger field.
+
+### GetMapArrayAnytype
+
+`func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{}`
+
+GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise.
+
+### GetMapArrayAnytypeOk
+
+`func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool)`
+
+GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapArrayAnytype
+
+`func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool`
+
+HasMapArrayAnytype returns a boolean if a field has been set.
+
+### SetMapArrayAnytype
+
+`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{})`
+
+SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field.
+
+### GetMapMapString
+
+`func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]string`
+
+GetMapMapString returns the MapMapString field if non-nil, zero value otherwise.
+
+### GetMapMapStringOk
+
+`func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool)`
+
+GetMapMapStringOk returns a tuple with the MapMapString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapMapString
+
+`func (o *AdditionalPropertiesClass) HasMapMapString() bool`
+
+HasMapMapString returns a boolean if a field has been set.
+
+### SetMapMapString
+
+`func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]string)`
+
+SetMapMapString gets a reference to the given map[string]map[string]string and assigns it to the MapMapString field.
+
+### GetMapMapAnytype
+
+`func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{}`
+
+GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise.
+
+### GetMapMapAnytypeOk
+
+`func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool)`
+
+GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapMapAnytype
+
+`func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool`
+
+HasMapMapAnytype returns a boolean if a field has been set.
+
+### SetMapMapAnytype
+
+`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{})`
+
+SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field.
+
+### GetAnytype1
+
+`func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{}`
+
+GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise.
+
+### GetAnytype1Ok
+
+`func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool)`
+
+GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAnytype1
+
+`func (o *AdditionalPropertiesClass) HasAnytype1() bool`
+
+HasAnytype1 returns a boolean if a field has been set.
+
+### SetAnytype1
+
+`func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{})`
+
+SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field.
+
+### GetAnytype2
+
+`func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{}`
+
+GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise.
+
+### GetAnytype2Ok
+
+`func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool)`
+
+GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAnytype2
+
+`func (o *AdditionalPropertiesClass) HasAnytype2() bool`
+
+HasAnytype2 returns a boolean if a field has been set.
+
+### SetAnytype2
+
+`func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{})`
+
+SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field.
+
+### GetAnytype3
+
+`func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{}`
+
+GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise.
+
+### GetAnytype3Ok
+
+`func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool)`
+
+GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAnytype3
+
+`func (o *AdditionalPropertiesClass) HasAnytype3() bool`
+
+HasAnytype3 returns a boolean if a field has been set.
+
+### SetAnytype3
+
+`func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{})`
+
+SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field.
+
[[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-experimental/go-petstore/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md
index 34e6fca8fb..5db6d8671d 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **string** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *AdditionalPropertiesInteger) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *AdditionalPropertiesInteger) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *AdditionalPropertiesInteger) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md
index 6d41fd2315..585ee57005 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **string** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *AdditionalPropertiesNumber) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *AdditionalPropertiesNumber) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *AdditionalPropertiesNumber) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/AdditionalPropertiesObject.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md
index b856de693b..d71afb4943 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **string** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *AdditionalPropertiesObject) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *AdditionalPropertiesObject) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *AdditionalPropertiesObject) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *AdditionalPropertiesObject) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/AdditionalPropertiesString.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md
index 69ad206568..72bbc5d7fd 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **string** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *AdditionalPropertiesString) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *AdditionalPropertiesString) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *AdditionalPropertiesString) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *AdditionalPropertiesString) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/Animal.md b/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md
index 02d23377da..55133b2974 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md
@@ -4,8 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ClassName** | **string** | |
-**Color** | **string** | | [optional] [default to red]
+**ClassName** | Pointer to **string** | |
+**Color** | Pointer to **string** | | [optional] [default to red]
+
+## Methods
+
+### GetClassName
+
+`func (o *Animal) GetClassName() string`
+
+GetClassName returns the ClassName field if non-nil, zero value otherwise.
+
+### GetClassNameOk
+
+`func (o *Animal) GetClassNameOk() (string, bool)`
+
+GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasClassName
+
+`func (o *Animal) HasClassName() bool`
+
+HasClassName returns a boolean if a field has been set.
+
+### SetClassName
+
+`func (o *Animal) SetClassName(v string)`
+
+SetClassName gets a reference to the given string and assigns it to the ClassName field.
+
+### GetColor
+
+`func (o *Animal) GetColor() string`
+
+GetColor returns the Color field if non-nil, zero value otherwise.
+
+### GetColorOk
+
+`func (o *Animal) GetColorOk() (string, bool)`
+
+GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasColor
+
+`func (o *Animal) HasColor() bool`
+
+HasColor returns a boolean if a field has been set.
+
+### SetColor
+
+`func (o *Animal) SetColor(v string)`
+
+SetColor gets a reference to the given string and assigns it to the Color field.
+
[[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-experimental/go-petstore/docs/ApiResponse.md b/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md
index 41d28fb578..3dd402a331 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md
@@ -4,9 +4,87 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Code** | **int32** | | [optional]
-**Type** | **string** | | [optional]
-**Message** | **string** | | [optional]
+**Code** | Pointer to **int32** | | [optional]
+**Type** | Pointer to **string** | | [optional]
+**Message** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetCode
+
+`func (o *ApiResponse) GetCode() int32`
+
+GetCode returns the Code field if non-nil, zero value otherwise.
+
+### GetCodeOk
+
+`func (o *ApiResponse) GetCodeOk() (int32, bool)`
+
+GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCode
+
+`func (o *ApiResponse) HasCode() bool`
+
+HasCode returns a boolean if a field has been set.
+
+### SetCode
+
+`func (o *ApiResponse) SetCode(v int32)`
+
+SetCode gets a reference to the given int32 and assigns it to the Code field.
+
+### GetType
+
+`func (o *ApiResponse) GetType() string`
+
+GetType returns the Type field if non-nil, zero value otherwise.
+
+### GetTypeOk
+
+`func (o *ApiResponse) GetTypeOk() (string, bool)`
+
+GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasType
+
+`func (o *ApiResponse) HasType() bool`
+
+HasType returns a boolean if a field has been set.
+
+### SetType
+
+`func (o *ApiResponse) SetType(v string)`
+
+SetType gets a reference to the given string and assigns it to the Type field.
+
+### GetMessage
+
+`func (o *ApiResponse) GetMessage() string`
+
+GetMessage returns the Message field if non-nil, zero value otherwise.
+
+### GetMessageOk
+
+`func (o *ApiResponse) GetMessageOk() (string, bool)`
+
+GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMessage
+
+`func (o *ApiResponse) HasMessage() bool`
+
+HasMessage returns a boolean if a field has been set.
+
+### SetMessage
+
+`func (o *ApiResponse) SetMessage(v string)`
+
+SetMessage gets a reference to the given string and assigns it to the Message field.
+
[[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-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md
index 555213013b..6e776c78ba 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional]
+**ArrayArrayNumber** | Pointer to [**[][]float32**](array.md) | | [optional]
+
+## Methods
+
+### GetArrayArrayNumber
+
+`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32`
+
+GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise.
+
+### GetArrayArrayNumberOk
+
+`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool)`
+
+GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasArrayArrayNumber
+
+`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool`
+
+HasArrayArrayNumber returns a boolean if a field has been set.
+
+### SetArrayArrayNumber
+
+`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)`
+
+SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field.
+
[[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-experimental/go-petstore/docs/ArrayOfNumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md
index 56618756dd..af74787e38 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ArrayNumber** | **[]float32** | | [optional]
+**ArrayNumber** | Pointer to **[]float32** | | [optional]
+
+## Methods
+
+### GetArrayNumber
+
+`func (o *ArrayOfNumberOnly) GetArrayNumber() []float32`
+
+GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise.
+
+### GetArrayNumberOk
+
+`func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool)`
+
+GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasArrayNumber
+
+`func (o *ArrayOfNumberOnly) HasArrayNumber() bool`
+
+HasArrayNumber returns a boolean if a field has been set.
+
+### SetArrayNumber
+
+`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)`
+
+SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field.
+
[[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-experimental/go-petstore/docs/ArrayTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md
index 0da0bc52d2..7c25df85ff 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md
@@ -4,9 +4,87 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ArrayOfString** | **[]string** | | [optional]
-**ArrayArrayOfInteger** | [**[][]int64**](array.md) | | [optional]
-**ArrayArrayOfModel** | [**[][]ReadOnlyFirst**](array.md) | | [optional]
+**ArrayOfString** | Pointer to **[]string** | | [optional]
+**ArrayArrayOfInteger** | Pointer to [**[][]int64**](array.md) | | [optional]
+**ArrayArrayOfModel** | Pointer to [**[][]ReadOnlyFirst**](array.md) | | [optional]
+
+## Methods
+
+### GetArrayOfString
+
+`func (o *ArrayTest) GetArrayOfString() []string`
+
+GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise.
+
+### GetArrayOfStringOk
+
+`func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool)`
+
+GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasArrayOfString
+
+`func (o *ArrayTest) HasArrayOfString() bool`
+
+HasArrayOfString returns a boolean if a field has been set.
+
+### SetArrayOfString
+
+`func (o *ArrayTest) SetArrayOfString(v []string)`
+
+SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field.
+
+### GetArrayArrayOfInteger
+
+`func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64`
+
+GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise.
+
+### GetArrayArrayOfIntegerOk
+
+`func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool)`
+
+GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasArrayArrayOfInteger
+
+`func (o *ArrayTest) HasArrayArrayOfInteger() bool`
+
+HasArrayArrayOfInteger returns a boolean if a field has been set.
+
+### SetArrayArrayOfInteger
+
+`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)`
+
+SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field.
+
+### GetArrayArrayOfModel
+
+`func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst`
+
+GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise.
+
+### GetArrayArrayOfModelOk
+
+`func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool)`
+
+GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasArrayArrayOfModel
+
+`func (o *ArrayTest) HasArrayArrayOfModel() bool`
+
+HasArrayArrayOfModel returns a boolean if a field has been set.
+
+### SetArrayArrayOfModel
+
+`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)`
+
+SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field.
+
[[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-experimental/go-petstore/docs/Capitalization.md b/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md
index 426b8eabd9..fd856f743e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md
@@ -4,12 +4,165 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**SmallCamel** | **string** | | [optional]
-**CapitalCamel** | **string** | | [optional]
-**SmallSnake** | **string** | | [optional]
-**CapitalSnake** | **string** | | [optional]
-**SCAETHFlowPoints** | **string** | | [optional]
-**ATT_NAME** | **string** | Name of the pet | [optional]
+**SmallCamel** | Pointer to **string** | | [optional]
+**CapitalCamel** | Pointer to **string** | | [optional]
+**SmallSnake** | Pointer to **string** | | [optional]
+**CapitalSnake** | Pointer to **string** | | [optional]
+**SCAETHFlowPoints** | Pointer to **string** | | [optional]
+**ATT_NAME** | Pointer to **string** | Name of the pet | [optional]
+
+## Methods
+
+### GetSmallCamel
+
+`func (o *Capitalization) GetSmallCamel() string`
+
+GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise.
+
+### GetSmallCamelOk
+
+`func (o *Capitalization) GetSmallCamelOk() (string, bool)`
+
+GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSmallCamel
+
+`func (o *Capitalization) HasSmallCamel() bool`
+
+HasSmallCamel returns a boolean if a field has been set.
+
+### SetSmallCamel
+
+`func (o *Capitalization) SetSmallCamel(v string)`
+
+SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field.
+
+### GetCapitalCamel
+
+`func (o *Capitalization) GetCapitalCamel() string`
+
+GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise.
+
+### GetCapitalCamelOk
+
+`func (o *Capitalization) GetCapitalCamelOk() (string, bool)`
+
+GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCapitalCamel
+
+`func (o *Capitalization) HasCapitalCamel() bool`
+
+HasCapitalCamel returns a boolean if a field has been set.
+
+### SetCapitalCamel
+
+`func (o *Capitalization) SetCapitalCamel(v string)`
+
+SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field.
+
+### GetSmallSnake
+
+`func (o *Capitalization) GetSmallSnake() string`
+
+GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise.
+
+### GetSmallSnakeOk
+
+`func (o *Capitalization) GetSmallSnakeOk() (string, bool)`
+
+GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSmallSnake
+
+`func (o *Capitalization) HasSmallSnake() bool`
+
+HasSmallSnake returns a boolean if a field has been set.
+
+### SetSmallSnake
+
+`func (o *Capitalization) SetSmallSnake(v string)`
+
+SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field.
+
+### GetCapitalSnake
+
+`func (o *Capitalization) GetCapitalSnake() string`
+
+GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise.
+
+### GetCapitalSnakeOk
+
+`func (o *Capitalization) GetCapitalSnakeOk() (string, bool)`
+
+GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCapitalSnake
+
+`func (o *Capitalization) HasCapitalSnake() bool`
+
+HasCapitalSnake returns a boolean if a field has been set.
+
+### SetCapitalSnake
+
+`func (o *Capitalization) SetCapitalSnake(v string)`
+
+SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field.
+
+### GetSCAETHFlowPoints
+
+`func (o *Capitalization) GetSCAETHFlowPoints() string`
+
+GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise.
+
+### GetSCAETHFlowPointsOk
+
+`func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool)`
+
+GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSCAETHFlowPoints
+
+`func (o *Capitalization) HasSCAETHFlowPoints() bool`
+
+HasSCAETHFlowPoints returns a boolean if a field has been set.
+
+### SetSCAETHFlowPoints
+
+`func (o *Capitalization) SetSCAETHFlowPoints(v string)`
+
+SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field.
+
+### GetATT_NAME
+
+`func (o *Capitalization) GetATT_NAME() string`
+
+GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise.
+
+### GetATT_NAMEOk
+
+`func (o *Capitalization) GetATT_NAMEOk() (string, bool)`
+
+GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasATT_NAME
+
+`func (o *Capitalization) HasATT_NAME() bool`
+
+HasATT_NAME returns a boolean if a field has been set.
+
+### SetATT_NAME
+
+`func (o *Capitalization) SetATT_NAME(v string)`
+
+SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field.
+
[[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-experimental/go-petstore/docs/Cat.md b/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md
index 1ef1f095e9..262e3d04f6 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md
@@ -4,9 +4,87 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ClassName** | **string** | |
-**Color** | **string** | | [optional] [default to red]
-**Declawed** | **bool** | | [optional]
+**ClassName** | Pointer to **string** | |
+**Color** | Pointer to **string** | | [optional] [default to red]
+**Declawed** | Pointer to **bool** | | [optional]
+
+## Methods
+
+### GetClassName
+
+`func (o *Cat) GetClassName() string`
+
+GetClassName returns the ClassName field if non-nil, zero value otherwise.
+
+### GetClassNameOk
+
+`func (o *Cat) GetClassNameOk() (string, bool)`
+
+GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasClassName
+
+`func (o *Cat) HasClassName() bool`
+
+HasClassName returns a boolean if a field has been set.
+
+### SetClassName
+
+`func (o *Cat) SetClassName(v string)`
+
+SetClassName gets a reference to the given string and assigns it to the ClassName field.
+
+### GetColor
+
+`func (o *Cat) GetColor() string`
+
+GetColor returns the Color field if non-nil, zero value otherwise.
+
+### GetColorOk
+
+`func (o *Cat) GetColorOk() (string, bool)`
+
+GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasColor
+
+`func (o *Cat) HasColor() bool`
+
+HasColor returns a boolean if a field has been set.
+
+### SetColor
+
+`func (o *Cat) SetColor(v string)`
+
+SetColor gets a reference to the given string and assigns it to the Color field.
+
+### GetDeclawed
+
+`func (o *Cat) GetDeclawed() bool`
+
+GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
+
+### GetDeclawedOk
+
+`func (o *Cat) GetDeclawedOk() (bool, bool)`
+
+GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasDeclawed
+
+`func (o *Cat) HasDeclawed() bool`
+
+HasDeclawed returns a boolean if a field has been set.
+
+### SetDeclawed
+
+`func (o *Cat) SetDeclawed(v bool)`
+
+SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
+
[[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-experimental/go-petstore/docs/CatAllOf.md b/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md
index c978cee041..a89f0b29fa 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Declawed** | **bool** | | [optional]
+**Declawed** | Pointer to **bool** | | [optional]
+
+## Methods
+
+### GetDeclawed
+
+`func (o *CatAllOf) GetDeclawed() bool`
+
+GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
+
+### GetDeclawedOk
+
+`func (o *CatAllOf) GetDeclawedOk() (bool, bool)`
+
+GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasDeclawed
+
+`func (o *CatAllOf) HasDeclawed() bool`
+
+HasDeclawed returns a boolean if a field has been set.
+
+### SetDeclawed
+
+`func (o *CatAllOf) SetDeclawed(v bool)`
+
+SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
+
[[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-experimental/go-petstore/docs/Category.md b/samples/client/petstore/go-experimental/go-petstore/docs/Category.md
index 01e8344bd0..b8ef18163b 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Category.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Category.md
@@ -4,8 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional]
-**Name** | **string** | | [default to default-name]
+**Id** | Pointer to **int64** | | [optional]
+**Name** | Pointer to **string** | | [default to default-name]
+
+## Methods
+
+### GetId
+
+`func (o *Category) GetId() int64`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *Category) GetIdOk() (int64, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *Category) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *Category) SetId(v int64)`
+
+SetId gets a reference to the given int64 and assigns it to the Id field.
+
+### GetName
+
+`func (o *Category) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *Category) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *Category) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *Category) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/ClassModel.md b/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md
index 0b925cebb1..9ceae1f3d0 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Class** | **string** | | [optional]
+**Class** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetClass
+
+`func (o *ClassModel) GetClass() string`
+
+GetClass returns the Class field if non-nil, zero value otherwise.
+
+### GetClassOk
+
+`func (o *ClassModel) GetClassOk() (string, bool)`
+
+GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasClass
+
+`func (o *ClassModel) HasClass() bool`
+
+HasClass returns a boolean if a field has been set.
+
+### SetClass
+
+`func (o *ClassModel) SetClass(v string)`
+
+SetClass gets a reference to the given string and assigns it to the Class field.
+
[[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-experimental/go-petstore/docs/Client.md b/samples/client/petstore/go-experimental/go-petstore/docs/Client.md
index 551da852ee..9787127b16 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Client.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Client.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Client** | **string** | | [optional]
+**Client** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetClient
+
+`func (o *Client) GetClient() string`
+
+GetClient returns the Client field if non-nil, zero value otherwise.
+
+### GetClientOk
+
+`func (o *Client) GetClientOk() (string, bool)`
+
+GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasClient
+
+`func (o *Client) HasClient() bool`
+
+HasClient returns a boolean if a field has been set.
+
+### SetClient
+
+`func (o *Client) SetClient(v string)`
+
+SetClient gets a reference to the given string and assigns it to the Client field.
+
[[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-experimental/go-petstore/docs/Dog.md b/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md
index ff35dd5cdc..591ab03c6a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md
@@ -4,9 +4,87 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ClassName** | **string** | |
-**Color** | **string** | | [optional] [default to red]
-**Breed** | **string** | | [optional]
+**ClassName** | Pointer to **string** | |
+**Color** | Pointer to **string** | | [optional] [default to red]
+**Breed** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetClassName
+
+`func (o *Dog) GetClassName() string`
+
+GetClassName returns the ClassName field if non-nil, zero value otherwise.
+
+### GetClassNameOk
+
+`func (o *Dog) GetClassNameOk() (string, bool)`
+
+GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasClassName
+
+`func (o *Dog) HasClassName() bool`
+
+HasClassName returns a boolean if a field has been set.
+
+### SetClassName
+
+`func (o *Dog) SetClassName(v string)`
+
+SetClassName gets a reference to the given string and assigns it to the ClassName field.
+
+### GetColor
+
+`func (o *Dog) GetColor() string`
+
+GetColor returns the Color field if non-nil, zero value otherwise.
+
+### GetColorOk
+
+`func (o *Dog) GetColorOk() (string, bool)`
+
+GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasColor
+
+`func (o *Dog) HasColor() bool`
+
+HasColor returns a boolean if a field has been set.
+
+### SetColor
+
+`func (o *Dog) SetColor(v string)`
+
+SetColor gets a reference to the given string and assigns it to the Color field.
+
+### GetBreed
+
+`func (o *Dog) GetBreed() string`
+
+GetBreed returns the Breed field if non-nil, zero value otherwise.
+
+### GetBreedOk
+
+`func (o *Dog) GetBreedOk() (string, bool)`
+
+GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasBreed
+
+`func (o *Dog) HasBreed() bool`
+
+HasBreed returns a boolean if a field has been set.
+
+### SetBreed
+
+`func (o *Dog) SetBreed(v string)`
+
+SetBreed gets a reference to the given string and assigns it to the Breed field.
+
[[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-experimental/go-petstore/docs/DogAllOf.md b/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md
index b87153e926..e5103c4975 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Breed** | **string** | | [optional]
+**Breed** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetBreed
+
+`func (o *DogAllOf) GetBreed() string`
+
+GetBreed returns the Breed field if non-nil, zero value otherwise.
+
+### GetBreedOk
+
+`func (o *DogAllOf) GetBreedOk() (string, bool)`
+
+GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasBreed
+
+`func (o *DogAllOf) HasBreed() bool`
+
+HasBreed returns a boolean if a field has been set.
+
+### SetBreed
+
+`func (o *DogAllOf) SetBreed(v string)`
+
+SetBreed gets a reference to the given string and assigns it to the Breed field.
+
[[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-experimental/go-petstore/docs/EnumArrays.md b/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md
index 3021f88183..6d6028e966 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md
@@ -4,8 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**JustSymbol** | **string** | | [optional]
-**ArrayEnum** | **[]string** | | [optional]
+**JustSymbol** | Pointer to **string** | | [optional]
+**ArrayEnum** | Pointer to **[]string** | | [optional]
+
+## Methods
+
+### GetJustSymbol
+
+`func (o *EnumArrays) GetJustSymbol() string`
+
+GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise.
+
+### GetJustSymbolOk
+
+`func (o *EnumArrays) GetJustSymbolOk() (string, bool)`
+
+GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasJustSymbol
+
+`func (o *EnumArrays) HasJustSymbol() bool`
+
+HasJustSymbol returns a boolean if a field has been set.
+
+### SetJustSymbol
+
+`func (o *EnumArrays) SetJustSymbol(v string)`
+
+SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field.
+
+### GetArrayEnum
+
+`func (o *EnumArrays) GetArrayEnum() []string`
+
+GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise.
+
+### GetArrayEnumOk
+
+`func (o *EnumArrays) GetArrayEnumOk() ([]string, bool)`
+
+GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasArrayEnum
+
+`func (o *EnumArrays) HasArrayEnum() bool`
+
+HasArrayEnum returns a boolean if a field has been set.
+
+### SetArrayEnum
+
+`func (o *EnumArrays) SetArrayEnum(v []string)`
+
+SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field.
+
[[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-experimental/go-petstore/docs/EnumClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/EnumClass.md
index c6932388c0..e231f94bd7 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/EnumClass.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/EnumClass.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md
index eeec09b66b..f396e0e32a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md
@@ -4,11 +4,139 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**EnumString** | **string** | | [optional]
-**EnumStringRequired** | **string** | |
-**EnumInteger** | **int32** | | [optional]
-**EnumNumber** | **float64** | | [optional]
-**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
+**EnumString** | Pointer to **string** | | [optional]
+**EnumStringRequired** | Pointer to **string** | |
+**EnumInteger** | Pointer to **int32** | | [optional]
+**EnumNumber** | Pointer to **float64** | | [optional]
+**OuterEnum** | Pointer to [**OuterEnum**](OuterEnum.md) | | [optional]
+
+## Methods
+
+### GetEnumString
+
+`func (o *EnumTest) GetEnumString() string`
+
+GetEnumString returns the EnumString field if non-nil, zero value otherwise.
+
+### GetEnumStringOk
+
+`func (o *EnumTest) GetEnumStringOk() (string, bool)`
+
+GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEnumString
+
+`func (o *EnumTest) HasEnumString() bool`
+
+HasEnumString returns a boolean if a field has been set.
+
+### SetEnumString
+
+`func (o *EnumTest) SetEnumString(v string)`
+
+SetEnumString gets a reference to the given string and assigns it to the EnumString field.
+
+### GetEnumStringRequired
+
+`func (o *EnumTest) GetEnumStringRequired() string`
+
+GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise.
+
+### GetEnumStringRequiredOk
+
+`func (o *EnumTest) GetEnumStringRequiredOk() (string, bool)`
+
+GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEnumStringRequired
+
+`func (o *EnumTest) HasEnumStringRequired() bool`
+
+HasEnumStringRequired returns a boolean if a field has been set.
+
+### SetEnumStringRequired
+
+`func (o *EnumTest) SetEnumStringRequired(v string)`
+
+SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field.
+
+### GetEnumInteger
+
+`func (o *EnumTest) GetEnumInteger() int32`
+
+GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise.
+
+### GetEnumIntegerOk
+
+`func (o *EnumTest) GetEnumIntegerOk() (int32, bool)`
+
+GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEnumInteger
+
+`func (o *EnumTest) HasEnumInteger() bool`
+
+HasEnumInteger returns a boolean if a field has been set.
+
+### SetEnumInteger
+
+`func (o *EnumTest) SetEnumInteger(v int32)`
+
+SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field.
+
+### GetEnumNumber
+
+`func (o *EnumTest) GetEnumNumber() float64`
+
+GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise.
+
+### GetEnumNumberOk
+
+`func (o *EnumTest) GetEnumNumberOk() (float64, bool)`
+
+GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEnumNumber
+
+`func (o *EnumTest) HasEnumNumber() bool`
+
+HasEnumNumber returns a boolean if a field has been set.
+
+### SetEnumNumber
+
+`func (o *EnumTest) SetEnumNumber(v float64)`
+
+SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field.
+
+### GetOuterEnum
+
+`func (o *EnumTest) GetOuterEnum() OuterEnum`
+
+GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise.
+
+### GetOuterEnumOk
+
+`func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool)`
+
+GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasOuterEnum
+
+`func (o *EnumTest) HasOuterEnum() bool`
+
+HasOuterEnum returns a boolean if a field has been set.
+
+### SetOuterEnum
+
+`func (o *EnumTest) SetOuterEnum(v OuterEnum)`
+
+SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field.
+
[[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-experimental/go-petstore/docs/File.md b/samples/client/petstore/go-experimental/go-petstore/docs/File.md
index a113b0312c..07d269cd88 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/File.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/File.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**SourceURI** | **string** | Test capitalization | [optional]
+**SourceURI** | Pointer to **string** | Test capitalization | [optional]
+
+## Methods
+
+### GetSourceURI
+
+`func (o *File) GetSourceURI() string`
+
+GetSourceURI returns the SourceURI field if non-nil, zero value otherwise.
+
+### GetSourceURIOk
+
+`func (o *File) GetSourceURIOk() (string, bool)`
+
+GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSourceURI
+
+`func (o *File) HasSourceURI() bool`
+
+HasSourceURI returns a boolean if a field has been set.
+
+### SetSourceURI
+
+`func (o *File) SetSourceURI(v string)`
+
+SetSourceURI gets a reference to the given string and assigns it to the SourceURI field.
+
[[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-experimental/go-petstore/docs/FileSchemaTestClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md
index ae51414dd6..4a12b7f6d5 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md
@@ -4,8 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**File** | [**File**](File.md) | | [optional]
-**Files** | [**[]File**](File.md) | | [optional]
+**File** | Pointer to [**File**](File.md) | | [optional]
+**Files** | Pointer to [**[]File**](File.md) | | [optional]
+
+## Methods
+
+### GetFile
+
+`func (o *FileSchemaTestClass) GetFile() File`
+
+GetFile returns the File field if non-nil, zero value otherwise.
+
+### GetFileOk
+
+`func (o *FileSchemaTestClass) GetFileOk() (File, bool)`
+
+GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasFile
+
+`func (o *FileSchemaTestClass) HasFile() bool`
+
+HasFile returns a boolean if a field has been set.
+
+### SetFile
+
+`func (o *FileSchemaTestClass) SetFile(v File)`
+
+SetFile gets a reference to the given File and assigns it to the File field.
+
+### GetFiles
+
+`func (o *FileSchemaTestClass) GetFiles() []File`
+
+GetFiles returns the Files field if non-nil, zero value otherwise.
+
+### GetFilesOk
+
+`func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool)`
+
+GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasFiles
+
+`func (o *FileSchemaTestClass) HasFiles() bool`
+
+HasFiles returns a boolean if a field has been set.
+
+### SetFiles
+
+`func (o *FileSchemaTestClass) SetFiles(v []File)`
+
+SetFiles gets a reference to the given []File and assigns it to the Files field.
+
[[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-experimental/go-petstore/docs/FormatTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md
index ee089a03cd..7b0c3d451c 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md
@@ -4,19 +4,347 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Integer** | **int32** | | [optional]
-**Int32** | **int32** | | [optional]
-**Int64** | **int64** | | [optional]
-**Number** | **float32** | |
-**Float** | **float32** | | [optional]
-**Double** | **float64** | | [optional]
-**String** | **string** | | [optional]
-**Byte** | **string** | |
-**Binary** | [***os.File**](*os.File.md) | | [optional]
-**Date** | **string** | |
-**DateTime** | [**time.Time**](time.Time.md) | | [optional]
-**Uuid** | **string** | | [optional]
-**Password** | **string** | |
+**Integer** | Pointer to **int32** | | [optional]
+**Int32** | Pointer to **int32** | | [optional]
+**Int64** | Pointer to **int64** | | [optional]
+**Number** | Pointer to **float32** | |
+**Float** | Pointer to **float32** | | [optional]
+**Double** | Pointer to **float64** | | [optional]
+**String** | Pointer to **string** | | [optional]
+**Byte** | Pointer to **string** | |
+**Binary** | Pointer to [***os.File**](*os.File.md) | | [optional]
+**Date** | Pointer to **string** | |
+**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional]
+**Uuid** | Pointer to **string** | | [optional]
+**Password** | Pointer to **string** | |
+
+## Methods
+
+### GetInteger
+
+`func (o *FormatTest) GetInteger() int32`
+
+GetInteger returns the Integer field if non-nil, zero value otherwise.
+
+### GetIntegerOk
+
+`func (o *FormatTest) GetIntegerOk() (int32, bool)`
+
+GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasInteger
+
+`func (o *FormatTest) HasInteger() bool`
+
+HasInteger returns a boolean if a field has been set.
+
+### SetInteger
+
+`func (o *FormatTest) SetInteger(v int32)`
+
+SetInteger gets a reference to the given int32 and assigns it to the Integer field.
+
+### GetInt32
+
+`func (o *FormatTest) GetInt32() int32`
+
+GetInt32 returns the Int32 field if non-nil, zero value otherwise.
+
+### GetInt32Ok
+
+`func (o *FormatTest) GetInt32Ok() (int32, bool)`
+
+GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasInt32
+
+`func (o *FormatTest) HasInt32() bool`
+
+HasInt32 returns a boolean if a field has been set.
+
+### SetInt32
+
+`func (o *FormatTest) SetInt32(v int32)`
+
+SetInt32 gets a reference to the given int32 and assigns it to the Int32 field.
+
+### GetInt64
+
+`func (o *FormatTest) GetInt64() int64`
+
+GetInt64 returns the Int64 field if non-nil, zero value otherwise.
+
+### GetInt64Ok
+
+`func (o *FormatTest) GetInt64Ok() (int64, bool)`
+
+GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasInt64
+
+`func (o *FormatTest) HasInt64() bool`
+
+HasInt64 returns a boolean if a field has been set.
+
+### SetInt64
+
+`func (o *FormatTest) SetInt64(v int64)`
+
+SetInt64 gets a reference to the given int64 and assigns it to the Int64 field.
+
+### GetNumber
+
+`func (o *FormatTest) GetNumber() float32`
+
+GetNumber returns the Number field if non-nil, zero value otherwise.
+
+### GetNumberOk
+
+`func (o *FormatTest) GetNumberOk() (float32, bool)`
+
+GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNumber
+
+`func (o *FormatTest) HasNumber() bool`
+
+HasNumber returns a boolean if a field has been set.
+
+### SetNumber
+
+`func (o *FormatTest) SetNumber(v float32)`
+
+SetNumber gets a reference to the given float32 and assigns it to the Number field.
+
+### GetFloat
+
+`func (o *FormatTest) GetFloat() float32`
+
+GetFloat returns the Float field if non-nil, zero value otherwise.
+
+### GetFloatOk
+
+`func (o *FormatTest) GetFloatOk() (float32, bool)`
+
+GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasFloat
+
+`func (o *FormatTest) HasFloat() bool`
+
+HasFloat returns a boolean if a field has been set.
+
+### SetFloat
+
+`func (o *FormatTest) SetFloat(v float32)`
+
+SetFloat gets a reference to the given float32 and assigns it to the Float field.
+
+### GetDouble
+
+`func (o *FormatTest) GetDouble() float64`
+
+GetDouble returns the Double field if non-nil, zero value otherwise.
+
+### GetDoubleOk
+
+`func (o *FormatTest) GetDoubleOk() (float64, bool)`
+
+GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasDouble
+
+`func (o *FormatTest) HasDouble() bool`
+
+HasDouble returns a boolean if a field has been set.
+
+### SetDouble
+
+`func (o *FormatTest) SetDouble(v float64)`
+
+SetDouble gets a reference to the given float64 and assigns it to the Double field.
+
+### GetString
+
+`func (o *FormatTest) GetString() string`
+
+GetString returns the String field if non-nil, zero value otherwise.
+
+### GetStringOk
+
+`func (o *FormatTest) GetStringOk() (string, bool)`
+
+GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasString
+
+`func (o *FormatTest) HasString() bool`
+
+HasString returns a boolean if a field has been set.
+
+### SetString
+
+`func (o *FormatTest) SetString(v string)`
+
+SetString gets a reference to the given string and assigns it to the String field.
+
+### GetByte
+
+`func (o *FormatTest) GetByte() string`
+
+GetByte returns the Byte field if non-nil, zero value otherwise.
+
+### GetByteOk
+
+`func (o *FormatTest) GetByteOk() (string, bool)`
+
+GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasByte
+
+`func (o *FormatTest) HasByte() bool`
+
+HasByte returns a boolean if a field has been set.
+
+### SetByte
+
+`func (o *FormatTest) SetByte(v string)`
+
+SetByte gets a reference to the given string and assigns it to the Byte field.
+
+### GetBinary
+
+`func (o *FormatTest) GetBinary() *os.File`
+
+GetBinary returns the Binary field if non-nil, zero value otherwise.
+
+### GetBinaryOk
+
+`func (o *FormatTest) GetBinaryOk() (*os.File, bool)`
+
+GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasBinary
+
+`func (o *FormatTest) HasBinary() bool`
+
+HasBinary returns a boolean if a field has been set.
+
+### SetBinary
+
+`func (o *FormatTest) SetBinary(v *os.File)`
+
+SetBinary gets a reference to the given *os.File and assigns it to the Binary field.
+
+### GetDate
+
+`func (o *FormatTest) GetDate() string`
+
+GetDate returns the Date field if non-nil, zero value otherwise.
+
+### GetDateOk
+
+`func (o *FormatTest) GetDateOk() (string, bool)`
+
+GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasDate
+
+`func (o *FormatTest) HasDate() bool`
+
+HasDate returns a boolean if a field has been set.
+
+### SetDate
+
+`func (o *FormatTest) SetDate(v string)`
+
+SetDate gets a reference to the given string and assigns it to the Date field.
+
+### GetDateTime
+
+`func (o *FormatTest) GetDateTime() time.Time`
+
+GetDateTime returns the DateTime field if non-nil, zero value otherwise.
+
+### GetDateTimeOk
+
+`func (o *FormatTest) GetDateTimeOk() (time.Time, bool)`
+
+GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasDateTime
+
+`func (o *FormatTest) HasDateTime() bool`
+
+HasDateTime returns a boolean if a field has been set.
+
+### SetDateTime
+
+`func (o *FormatTest) SetDateTime(v time.Time)`
+
+SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field.
+
+### GetUuid
+
+`func (o *FormatTest) GetUuid() string`
+
+GetUuid returns the Uuid field if non-nil, zero value otherwise.
+
+### GetUuidOk
+
+`func (o *FormatTest) GetUuidOk() (string, bool)`
+
+GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasUuid
+
+`func (o *FormatTest) HasUuid() bool`
+
+HasUuid returns a boolean if a field has been set.
+
+### SetUuid
+
+`func (o *FormatTest) SetUuid(v string)`
+
+SetUuid gets a reference to the given string and assigns it to the Uuid field.
+
+### GetPassword
+
+`func (o *FormatTest) GetPassword() string`
+
+GetPassword returns the Password field if non-nil, zero value otherwise.
+
+### GetPasswordOk
+
+`func (o *FormatTest) GetPasswordOk() (string, bool)`
+
+GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPassword
+
+`func (o *FormatTest) HasPassword() bool`
+
+HasPassword returns a boolean if a field has been set.
+
+### SetPassword
+
+`func (o *FormatTest) SetPassword(v string)`
+
+SetPassword gets a reference to the given string and assigns it to the Password field.
+
[[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-experimental/go-petstore/docs/HasOnlyReadOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md
index 9e2f495735..33cc010f3a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md
@@ -4,8 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Bar** | **string** | | [optional]
-**Foo** | **string** | | [optional]
+**Bar** | Pointer to **string** | | [optional]
+**Foo** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetBar
+
+`func (o *HasOnlyReadOnly) GetBar() string`
+
+GetBar returns the Bar field if non-nil, zero value otherwise.
+
+### GetBarOk
+
+`func (o *HasOnlyReadOnly) GetBarOk() (string, bool)`
+
+GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasBar
+
+`func (o *HasOnlyReadOnly) HasBar() bool`
+
+HasBar returns a boolean if a field has been set.
+
+### SetBar
+
+`func (o *HasOnlyReadOnly) SetBar(v string)`
+
+SetBar gets a reference to the given string and assigns it to the Bar field.
+
+### GetFoo
+
+`func (o *HasOnlyReadOnly) GetFoo() string`
+
+GetFoo returns the Foo field if non-nil, zero value otherwise.
+
+### GetFooOk
+
+`func (o *HasOnlyReadOnly) GetFooOk() (string, bool)`
+
+GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasFoo
+
+`func (o *HasOnlyReadOnly) HasFoo() bool`
+
+HasFoo returns a boolean if a field has been set.
+
+### SetFoo
+
+`func (o *HasOnlyReadOnly) SetFoo(v string)`
+
+SetFoo gets a reference to the given string and assigns it to the Foo field.
+
[[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-experimental/go-petstore/docs/List.md b/samples/client/petstore/go-experimental/go-petstore/docs/List.md
index bba2e52990..53784dd47a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/List.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/List.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Var123List** | **string** | | [optional]
+**Var123List** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetVar123List
+
+`func (o *List) GetVar123List() string`
+
+GetVar123List returns the Var123List field if non-nil, zero value otherwise.
+
+### GetVar123ListOk
+
+`func (o *List) GetVar123ListOk() (string, bool)`
+
+GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasVar123List
+
+`func (o *List) HasVar123List() bool`
+
+HasVar123List returns a boolean if a field has been set.
+
+### SetVar123List
+
+`func (o *List) SetVar123List(v string)`
+
+SetVar123List gets a reference to the given string and assigns it to the Var123List field.
+
[[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-experimental/go-petstore/docs/MapTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md
index 6645e04465..6994b17ec5 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md
@@ -4,10 +4,113 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional]
-**MapOfEnumString** | **map[string]string** | | [optional]
-**DirectMap** | **map[string]bool** | | [optional]
-**IndirectMap** | **map[string]bool** | | [optional]
+**MapMapOfString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
+**MapOfEnumString** | Pointer to **map[string]string** | | [optional]
+**DirectMap** | Pointer to **map[string]bool** | | [optional]
+**IndirectMap** | Pointer to **map[string]bool** | | [optional]
+
+## Methods
+
+### GetMapMapOfString
+
+`func (o *MapTest) GetMapMapOfString() map[string]map[string]string`
+
+GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise.
+
+### GetMapMapOfStringOk
+
+`func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool)`
+
+GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapMapOfString
+
+`func (o *MapTest) HasMapMapOfString() bool`
+
+HasMapMapOfString returns a boolean if a field has been set.
+
+### SetMapMapOfString
+
+`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)`
+
+SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field.
+
+### GetMapOfEnumString
+
+`func (o *MapTest) GetMapOfEnumString() map[string]string`
+
+GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise.
+
+### GetMapOfEnumStringOk
+
+`func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool)`
+
+GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMapOfEnumString
+
+`func (o *MapTest) HasMapOfEnumString() bool`
+
+HasMapOfEnumString returns a boolean if a field has been set.
+
+### SetMapOfEnumString
+
+`func (o *MapTest) SetMapOfEnumString(v map[string]string)`
+
+SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field.
+
+### GetDirectMap
+
+`func (o *MapTest) GetDirectMap() map[string]bool`
+
+GetDirectMap returns the DirectMap field if non-nil, zero value otherwise.
+
+### GetDirectMapOk
+
+`func (o *MapTest) GetDirectMapOk() (map[string]bool, bool)`
+
+GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasDirectMap
+
+`func (o *MapTest) HasDirectMap() bool`
+
+HasDirectMap returns a boolean if a field has been set.
+
+### SetDirectMap
+
+`func (o *MapTest) SetDirectMap(v map[string]bool)`
+
+SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field.
+
+### GetIndirectMap
+
+`func (o *MapTest) GetIndirectMap() map[string]bool`
+
+GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise.
+
+### GetIndirectMapOk
+
+`func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool)`
+
+GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasIndirectMap
+
+`func (o *MapTest) HasIndirectMap() bool`
+
+HasIndirectMap returns a boolean if a field has been set.
+
+### SetIndirectMap
+
+`func (o *MapTest) SetIndirectMap(v map[string]bool)`
+
+SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field.
+
[[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-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index a2ce1068b2..f12ed969af 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -4,9 +4,87 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Uuid** | **string** | | [optional]
-**DateTime** | [**time.Time**](time.Time.md) | | [optional]
-**Map** | [**map[string]Animal**](Animal.md) | | [optional]
+**Uuid** | Pointer to **string** | | [optional]
+**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional]
+**Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional]
+
+## Methods
+
+### GetUuid
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string`
+
+GetUuid returns the Uuid field if non-nil, zero value otherwise.
+
+### GetUuidOk
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)`
+
+GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasUuid
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool`
+
+HasUuid returns a boolean if a field has been set.
+
+### SetUuid
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)`
+
+SetUuid gets a reference to the given string and assigns it to the Uuid field.
+
+### GetDateTime
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time`
+
+GetDateTime returns the DateTime field if non-nil, zero value otherwise.
+
+### GetDateTimeOk
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool)`
+
+GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasDateTime
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool`
+
+HasDateTime returns a boolean if a field has been set.
+
+### SetDateTime
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)`
+
+SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field.
+
+### GetMap
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal`
+
+GetMap returns the Map field if non-nil, zero value otherwise.
+
+### GetMapOk
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool)`
+
+GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMap
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool`
+
+HasMap returns a boolean if a field has been set.
+
+### SetMap
+
+`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)`
+
+SetMap gets a reference to the given map[string]Animal and assigns it to the Map field.
+
[[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-experimental/go-petstore/docs/Model200Response.md b/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md
index 27b93bd154..b0fbf5369e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md
@@ -4,8 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **int32** | | [optional]
-**Class** | **string** | | [optional]
+**Name** | Pointer to **int32** | | [optional]
+**Class** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *Model200Response) GetName() int32`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *Model200Response) GetNameOk() (int32, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *Model200Response) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *Model200Response) SetName(v int32)`
+
+SetName gets a reference to the given int32 and assigns it to the Name field.
+
+### GetClass
+
+`func (o *Model200Response) GetClass() string`
+
+GetClass returns the Class field if non-nil, zero value otherwise.
+
+### GetClassOk
+
+`func (o *Model200Response) GetClassOk() (string, bool)`
+
+GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasClass
+
+`func (o *Model200Response) HasClass() bool`
+
+HasClass returns a boolean if a field has been set.
+
+### SetClass
+
+`func (o *Model200Response) SetClass(v string)`
+
+SetClass gets a reference to the given string and assigns it to the Class field.
+
[[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-experimental/go-petstore/docs/Name.md b/samples/client/petstore/go-experimental/go-petstore/docs/Name.md
index 453e54d985..3b1d29f518 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Name.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Name.md
@@ -4,10 +4,113 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **int32** | |
-**SnakeCase** | **int32** | | [optional]
-**Property** | **string** | | [optional]
-**Var123Number** | **int32** | | [optional]
+**Name** | Pointer to **int32** | |
+**SnakeCase** | Pointer to **int32** | | [optional]
+**Property** | Pointer to **string** | | [optional]
+**Var123Number** | Pointer to **int32** | | [optional]
+
+## Methods
+
+### GetName
+
+`func (o *Name) GetName() int32`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *Name) GetNameOk() (int32, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *Name) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *Name) SetName(v int32)`
+
+SetName gets a reference to the given int32 and assigns it to the Name field.
+
+### GetSnakeCase
+
+`func (o *Name) GetSnakeCase() int32`
+
+GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise.
+
+### GetSnakeCaseOk
+
+`func (o *Name) GetSnakeCaseOk() (int32, bool)`
+
+GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSnakeCase
+
+`func (o *Name) HasSnakeCase() bool`
+
+HasSnakeCase returns a boolean if a field has been set.
+
+### SetSnakeCase
+
+`func (o *Name) SetSnakeCase(v int32)`
+
+SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field.
+
+### GetProperty
+
+`func (o *Name) GetProperty() string`
+
+GetProperty returns the Property field if non-nil, zero value otherwise.
+
+### GetPropertyOk
+
+`func (o *Name) GetPropertyOk() (string, bool)`
+
+GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasProperty
+
+`func (o *Name) HasProperty() bool`
+
+HasProperty returns a boolean if a field has been set.
+
+### SetProperty
+
+`func (o *Name) SetProperty(v string)`
+
+SetProperty gets a reference to the given string and assigns it to the Property field.
+
+### GetVar123Number
+
+`func (o *Name) GetVar123Number() int32`
+
+GetVar123Number returns the Var123Number field if non-nil, zero value otherwise.
+
+### GetVar123NumberOk
+
+`func (o *Name) GetVar123NumberOk() (int32, bool)`
+
+GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasVar123Number
+
+`func (o *Name) HasVar123Number() bool`
+
+HasVar123Number returns a boolean if a field has been set.
+
+### SetVar123Number
+
+`func (o *Name) SetVar123Number(v int32)`
+
+SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field.
+
[[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-experimental/go-petstore/docs/NumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md
index 604cf37eed..3521b8b2d0 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**JustNumber** | **float32** | | [optional]
+**JustNumber** | Pointer to **float32** | | [optional]
+
+## Methods
+
+### GetJustNumber
+
+`func (o *NumberOnly) GetJustNumber() float32`
+
+GetJustNumber returns the JustNumber field if non-nil, zero value otherwise.
+
+### GetJustNumberOk
+
+`func (o *NumberOnly) GetJustNumberOk() (float32, bool)`
+
+GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasJustNumber
+
+`func (o *NumberOnly) HasJustNumber() bool`
+
+HasJustNumber returns a boolean if a field has been set.
+
+### SetJustNumber
+
+`func (o *NumberOnly) SetJustNumber(v float32)`
+
+SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field.
+
[[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-experimental/go-petstore/docs/Order.md b/samples/client/petstore/go-experimental/go-petstore/docs/Order.md
index eeef097100..982f9f591c 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Order.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Order.md
@@ -4,12 +4,165 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional]
-**PetId** | **int64** | | [optional]
-**Quantity** | **int32** | | [optional]
-**ShipDate** | [**time.Time**](time.Time.md) | | [optional]
-**Status** | **string** | Order Status | [optional]
-**Complete** | **bool** | | [optional] [default to false]
+**Id** | Pointer to **int64** | | [optional]
+**PetId** | Pointer to **int64** | | [optional]
+**Quantity** | Pointer to **int32** | | [optional]
+**ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional]
+**Status** | Pointer to **string** | Order Status | [optional]
+**Complete** | Pointer to **bool** | | [optional] [default to false]
+
+## Methods
+
+### GetId
+
+`func (o *Order) GetId() int64`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *Order) GetIdOk() (int64, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *Order) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *Order) SetId(v int64)`
+
+SetId gets a reference to the given int64 and assigns it to the Id field.
+
+### GetPetId
+
+`func (o *Order) GetPetId() int64`
+
+GetPetId returns the PetId field if non-nil, zero value otherwise.
+
+### GetPetIdOk
+
+`func (o *Order) GetPetIdOk() (int64, bool)`
+
+GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPetId
+
+`func (o *Order) HasPetId() bool`
+
+HasPetId returns a boolean if a field has been set.
+
+### SetPetId
+
+`func (o *Order) SetPetId(v int64)`
+
+SetPetId gets a reference to the given int64 and assigns it to the PetId field.
+
+### GetQuantity
+
+`func (o *Order) GetQuantity() int32`
+
+GetQuantity returns the Quantity field if non-nil, zero value otherwise.
+
+### GetQuantityOk
+
+`func (o *Order) GetQuantityOk() (int32, bool)`
+
+GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasQuantity
+
+`func (o *Order) HasQuantity() bool`
+
+HasQuantity returns a boolean if a field has been set.
+
+### SetQuantity
+
+`func (o *Order) SetQuantity(v int32)`
+
+SetQuantity gets a reference to the given int32 and assigns it to the Quantity field.
+
+### GetShipDate
+
+`func (o *Order) GetShipDate() time.Time`
+
+GetShipDate returns the ShipDate field if non-nil, zero value otherwise.
+
+### GetShipDateOk
+
+`func (o *Order) GetShipDateOk() (time.Time, bool)`
+
+GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasShipDate
+
+`func (o *Order) HasShipDate() bool`
+
+HasShipDate returns a boolean if a field has been set.
+
+### SetShipDate
+
+`func (o *Order) SetShipDate(v time.Time)`
+
+SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field.
+
+### GetStatus
+
+`func (o *Order) GetStatus() string`
+
+GetStatus returns the Status field if non-nil, zero value otherwise.
+
+### GetStatusOk
+
+`func (o *Order) GetStatusOk() (string, bool)`
+
+GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStatus
+
+`func (o *Order) HasStatus() bool`
+
+HasStatus returns a boolean if a field has been set.
+
+### SetStatus
+
+`func (o *Order) SetStatus(v string)`
+
+SetStatus gets a reference to the given string and assigns it to the Status field.
+
+### GetComplete
+
+`func (o *Order) GetComplete() bool`
+
+GetComplete returns the Complete field if non-nil, zero value otherwise.
+
+### GetCompleteOk
+
+`func (o *Order) GetCompleteOk() (bool, bool)`
+
+GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasComplete
+
+`func (o *Order) HasComplete() bool`
+
+HasComplete returns a boolean if a field has been set.
+
+### SetComplete
+
+`func (o *Order) SetComplete(v bool)`
+
+SetComplete gets a reference to the given bool and assigns it to the Complete field.
+
[[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-experimental/go-petstore/docs/OuterComposite.md b/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md
index df9bce1bd9..30a345dc8d 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md
@@ -4,9 +4,87 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**MyNumber** | **float32** | | [optional]
-**MyString** | **string** | | [optional]
-**MyBoolean** | **bool** | | [optional]
+**MyNumber** | Pointer to **float32** | | [optional]
+**MyString** | Pointer to **string** | | [optional]
+**MyBoolean** | Pointer to **bool** | | [optional]
+
+## Methods
+
+### GetMyNumber
+
+`func (o *OuterComposite) GetMyNumber() float32`
+
+GetMyNumber returns the MyNumber field if non-nil, zero value otherwise.
+
+### GetMyNumberOk
+
+`func (o *OuterComposite) GetMyNumberOk() (float32, bool)`
+
+GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMyNumber
+
+`func (o *OuterComposite) HasMyNumber() bool`
+
+HasMyNumber returns a boolean if a field has been set.
+
+### SetMyNumber
+
+`func (o *OuterComposite) SetMyNumber(v float32)`
+
+SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field.
+
+### GetMyString
+
+`func (o *OuterComposite) GetMyString() string`
+
+GetMyString returns the MyString field if non-nil, zero value otherwise.
+
+### GetMyStringOk
+
+`func (o *OuterComposite) GetMyStringOk() (string, bool)`
+
+GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMyString
+
+`func (o *OuterComposite) HasMyString() bool`
+
+HasMyString returns a boolean if a field has been set.
+
+### SetMyString
+
+`func (o *OuterComposite) SetMyString(v string)`
+
+SetMyString gets a reference to the given string and assigns it to the MyString field.
+
+### GetMyBoolean
+
+`func (o *OuterComposite) GetMyBoolean() bool`
+
+GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise.
+
+### GetMyBooleanOk
+
+`func (o *OuterComposite) GetMyBooleanOk() (bool, bool)`
+
+GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasMyBoolean
+
+`func (o *OuterComposite) HasMyBoolean() bool`
+
+HasMyBoolean returns a boolean if a field has been set.
+
+### SetMyBoolean
+
+`func (o *OuterComposite) SetMyBoolean(v bool)`
+
+SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field.
+
[[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-experimental/go-petstore/docs/OuterEnum.md b/samples/client/petstore/go-experimental/go-petstore/docs/OuterEnum.md
index c97466159c..13bed2d17f 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/OuterEnum.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/OuterEnum.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md b/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md
index c48104c639..81a4ec294e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md
@@ -4,12 +4,165 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional]
-**Category** | [**Category**](Category.md) | | [optional]
-**Name** | **string** | |
-**PhotoUrls** | **[]string** | |
-**Tags** | [**[]Tag**](Tag.md) | | [optional]
-**Status** | **string** | pet status in the store | [optional]
+**Id** | Pointer to **int64** | | [optional]
+**Category** | Pointer to [**Category**](Category.md) | | [optional]
+**Name** | Pointer to **string** | |
+**PhotoUrls** | Pointer to **[]string** | |
+**Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional]
+**Status** | Pointer to **string** | pet status in the store | [optional]
+
+## Methods
+
+### GetId
+
+`func (o *Pet) GetId() int64`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *Pet) GetIdOk() (int64, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *Pet) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *Pet) SetId(v int64)`
+
+SetId gets a reference to the given int64 and assigns it to the Id field.
+
+### GetCategory
+
+`func (o *Pet) GetCategory() Category`
+
+GetCategory returns the Category field if non-nil, zero value otherwise.
+
+### GetCategoryOk
+
+`func (o *Pet) GetCategoryOk() (Category, bool)`
+
+GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasCategory
+
+`func (o *Pet) HasCategory() bool`
+
+HasCategory returns a boolean if a field has been set.
+
+### SetCategory
+
+`func (o *Pet) SetCategory(v Category)`
+
+SetCategory gets a reference to the given Category and assigns it to the Category field.
+
+### GetName
+
+`func (o *Pet) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *Pet) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *Pet) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *Pet) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
+### GetPhotoUrls
+
+`func (o *Pet) GetPhotoUrls() []string`
+
+GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise.
+
+### GetPhotoUrlsOk
+
+`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)`
+
+GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPhotoUrls
+
+`func (o *Pet) HasPhotoUrls() bool`
+
+HasPhotoUrls returns a boolean if a field has been set.
+
+### SetPhotoUrls
+
+`func (o *Pet) SetPhotoUrls(v []string)`
+
+SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field.
+
+### GetTags
+
+`func (o *Pet) GetTags() []Tag`
+
+GetTags returns the Tags field if non-nil, zero value otherwise.
+
+### GetTagsOk
+
+`func (o *Pet) GetTagsOk() ([]Tag, bool)`
+
+GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasTags
+
+`func (o *Pet) HasTags() bool`
+
+HasTags returns a boolean if a field has been set.
+
+### SetTags
+
+`func (o *Pet) SetTags(v []Tag)`
+
+SetTags gets a reference to the given []Tag and assigns it to the Tags field.
+
+### GetStatus
+
+`func (o *Pet) GetStatus() string`
+
+GetStatus returns the Status field if non-nil, zero value otherwise.
+
+### GetStatusOk
+
+`func (o *Pet) GetStatusOk() (string, bool)`
+
+GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStatus
+
+`func (o *Pet) HasStatus() bool`
+
+HasStatus returns a boolean if a field has been set.
+
+### SetStatus
+
+`func (o *Pet) SetStatus(v string)`
+
+SetStatus gets a reference to the given string and assigns it to the Status field.
+
[[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-experimental/go-petstore/docs/ReadOnlyFirst.md b/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md
index 3fee799f29..e490a0fc96 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md
@@ -4,8 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Bar** | **string** | | [optional]
-**Baz** | **string** | | [optional]
+**Bar** | Pointer to **string** | | [optional]
+**Baz** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetBar
+
+`func (o *ReadOnlyFirst) GetBar() string`
+
+GetBar returns the Bar field if non-nil, zero value otherwise.
+
+### GetBarOk
+
+`func (o *ReadOnlyFirst) GetBarOk() (string, bool)`
+
+GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasBar
+
+`func (o *ReadOnlyFirst) HasBar() bool`
+
+HasBar returns a boolean if a field has been set.
+
+### SetBar
+
+`func (o *ReadOnlyFirst) SetBar(v string)`
+
+SetBar gets a reference to the given string and assigns it to the Bar field.
+
+### GetBaz
+
+`func (o *ReadOnlyFirst) GetBaz() string`
+
+GetBaz returns the Baz field if non-nil, zero value otherwise.
+
+### GetBazOk
+
+`func (o *ReadOnlyFirst) GetBazOk() (string, bool)`
+
+GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasBaz
+
+`func (o *ReadOnlyFirst) HasBaz() bool`
+
+HasBaz returns a boolean if a field has been set.
+
+### SetBaz
+
+`func (o *ReadOnlyFirst) SetBaz(v string)`
+
+SetBaz gets a reference to the given string and assigns it to the Baz field.
+
[[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-experimental/go-petstore/docs/Return.md b/samples/client/petstore/go-experimental/go-petstore/docs/Return.md
index 11be0b27c5..5c586fcbc6 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Return.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Return.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Return** | **int32** | | [optional]
+**Return** | Pointer to **int32** | | [optional]
+
+## Methods
+
+### GetReturn
+
+`func (o *Return) GetReturn() int32`
+
+GetReturn returns the Return field if non-nil, zero value otherwise.
+
+### GetReturnOk
+
+`func (o *Return) GetReturnOk() (int32, bool)`
+
+GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasReturn
+
+`func (o *Return) HasReturn() bool`
+
+HasReturn returns a boolean if a field has been set.
+
+### SetReturn
+
+`func (o *Return) SetReturn(v int32)`
+
+SetReturn gets a reference to the given int32 and assigns it to the Return field.
+
[[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-experimental/go-petstore/docs/SpecialModelName.md b/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md
index 96d7a28a40..9e7d3f377d 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md
@@ -4,7 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**SpecialPropertyName** | **int64** | | [optional]
+**SpecialPropertyName** | Pointer to **int64** | | [optional]
+
+## Methods
+
+### GetSpecialPropertyName
+
+`func (o *SpecialModelName) GetSpecialPropertyName() int64`
+
+GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise.
+
+### GetSpecialPropertyNameOk
+
+`func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool)`
+
+GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasSpecialPropertyName
+
+`func (o *SpecialModelName) HasSpecialPropertyName() bool`
+
+HasSpecialPropertyName returns a boolean if a field has been set.
+
+### SetSpecialPropertyName
+
+`func (o *SpecialModelName) SetSpecialPropertyName(v int64)`
+
+SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field.
+
[[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-experimental/go-petstore/docs/Tag.md b/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md
index d6b3cc117b..570126bd5f 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md
@@ -4,8 +4,61 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional]
-**Name** | **string** | | [optional]
+**Id** | Pointer to **int64** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+
+## Methods
+
+### GetId
+
+`func (o *Tag) GetId() int64`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *Tag) GetIdOk() (int64, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *Tag) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *Tag) SetId(v int64)`
+
+SetId gets a reference to the given int64 and assigns it to the Id field.
+
+### GetName
+
+`func (o *Tag) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *Tag) GetNameOk() (string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasName
+
+`func (o *Tag) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### SetName
+
+`func (o *Tag) SetName(v string)`
+
+SetName gets a reference to the given string and assigns it to the Name field.
+
[[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-experimental/go-petstore/docs/TypeHolderDefault.md b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md
index 1b9f077c30..09347e6175 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md
@@ -4,11 +4,139 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**StringItem** | **string** | | [default to what]
-**NumberItem** | **float32** | |
-**IntegerItem** | **int32** | |
-**BoolItem** | **bool** | | [default to true]
-**ArrayItem** | **[]int32** | |
+**StringItem** | Pointer to **string** | | [default to what]
+**NumberItem** | Pointer to **float32** | |
+**IntegerItem** | Pointer to **int32** | |
+**BoolItem** | Pointer to **bool** | | [default to true]
+**ArrayItem** | Pointer to **[]int32** | |
+
+## Methods
+
+### GetStringItem
+
+`func (o *TypeHolderDefault) GetStringItem() string`
+
+GetStringItem returns the StringItem field if non-nil, zero value otherwise.
+
+### GetStringItemOk
+
+`func (o *TypeHolderDefault) GetStringItemOk() (string, bool)`
+
+GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStringItem
+
+`func (o *TypeHolderDefault) HasStringItem() bool`
+
+HasStringItem returns a boolean if a field has been set.
+
+### SetStringItem
+
+`func (o *TypeHolderDefault) SetStringItem(v string)`
+
+SetStringItem gets a reference to the given string and assigns it to the StringItem field.
+
+### GetNumberItem
+
+`func (o *TypeHolderDefault) GetNumberItem() float32`
+
+GetNumberItem returns the NumberItem field if non-nil, zero value otherwise.
+
+### GetNumberItemOk
+
+`func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool)`
+
+GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNumberItem
+
+`func (o *TypeHolderDefault) HasNumberItem() bool`
+
+HasNumberItem returns a boolean if a field has been set.
+
+### SetNumberItem
+
+`func (o *TypeHolderDefault) SetNumberItem(v float32)`
+
+SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field.
+
+### GetIntegerItem
+
+`func (o *TypeHolderDefault) GetIntegerItem() int32`
+
+GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise.
+
+### GetIntegerItemOk
+
+`func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool)`
+
+GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasIntegerItem
+
+`func (o *TypeHolderDefault) HasIntegerItem() bool`
+
+HasIntegerItem returns a boolean if a field has been set.
+
+### SetIntegerItem
+
+`func (o *TypeHolderDefault) SetIntegerItem(v int32)`
+
+SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field.
+
+### GetBoolItem
+
+`func (o *TypeHolderDefault) GetBoolItem() bool`
+
+GetBoolItem returns the BoolItem field if non-nil, zero value otherwise.
+
+### GetBoolItemOk
+
+`func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool)`
+
+GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasBoolItem
+
+`func (o *TypeHolderDefault) HasBoolItem() bool`
+
+HasBoolItem returns a boolean if a field has been set.
+
+### SetBoolItem
+
+`func (o *TypeHolderDefault) SetBoolItem(v bool)`
+
+SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field.
+
+### GetArrayItem
+
+`func (o *TypeHolderDefault) GetArrayItem() []int32`
+
+GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise.
+
+### GetArrayItemOk
+
+`func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool)`
+
+GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasArrayItem
+
+`func (o *TypeHolderDefault) HasArrayItem() bool`
+
+HasArrayItem returns a boolean if a field has been set.
+
+### SetArrayItem
+
+`func (o *TypeHolderDefault) SetArrayItem(v []int32)`
+
+SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field.
+
[[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-experimental/go-petstore/docs/TypeHolderExample.md b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md
index abe85f9799..f9a276c529 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md
@@ -4,11 +4,139 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**StringItem** | **string** | |
-**NumberItem** | **float32** | |
-**IntegerItem** | **int32** | |
-**BoolItem** | **bool** | |
-**ArrayItem** | **[]int32** | |
+**StringItem** | Pointer to **string** | |
+**NumberItem** | Pointer to **float32** | |
+**IntegerItem** | Pointer to **int32** | |
+**BoolItem** | Pointer to **bool** | |
+**ArrayItem** | Pointer to **[]int32** | |
+
+## Methods
+
+### GetStringItem
+
+`func (o *TypeHolderExample) GetStringItem() string`
+
+GetStringItem returns the StringItem field if non-nil, zero value otherwise.
+
+### GetStringItemOk
+
+`func (o *TypeHolderExample) GetStringItemOk() (string, bool)`
+
+GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasStringItem
+
+`func (o *TypeHolderExample) HasStringItem() bool`
+
+HasStringItem returns a boolean if a field has been set.
+
+### SetStringItem
+
+`func (o *TypeHolderExample) SetStringItem(v string)`
+
+SetStringItem gets a reference to the given string and assigns it to the StringItem field.
+
+### GetNumberItem
+
+`func (o *TypeHolderExample) GetNumberItem() float32`
+
+GetNumberItem returns the NumberItem field if non-nil, zero value otherwise.
+
+### GetNumberItemOk
+
+`func (o *TypeHolderExample) GetNumberItemOk() (float32, bool)`
+
+GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNumberItem
+
+`func (o *TypeHolderExample) HasNumberItem() bool`
+
+HasNumberItem returns a boolean if a field has been set.
+
+### SetNumberItem
+
+`func (o *TypeHolderExample) SetNumberItem(v float32)`
+
+SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field.
+
+### GetIntegerItem
+
+`func (o *TypeHolderExample) GetIntegerItem() int32`
+
+GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise.
+
+### GetIntegerItemOk
+
+`func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool)`
+
+GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasIntegerItem
+
+`func (o *TypeHolderExample) HasIntegerItem() bool`
+
+HasIntegerItem returns a boolean if a field has been set.
+
+### SetIntegerItem
+
+`func (o *TypeHolderExample) SetIntegerItem(v int32)`
+
+SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field.
+
+### GetBoolItem
+
+`func (o *TypeHolderExample) GetBoolItem() bool`
+
+GetBoolItem returns the BoolItem field if non-nil, zero value otherwise.
+
+### GetBoolItemOk
+
+`func (o *TypeHolderExample) GetBoolItemOk() (bool, bool)`
+
+GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasBoolItem
+
+`func (o *TypeHolderExample) HasBoolItem() bool`
+
+HasBoolItem returns a boolean if a field has been set.
+
+### SetBoolItem
+
+`func (o *TypeHolderExample) SetBoolItem(v bool)`
+
+SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field.
+
+### GetArrayItem
+
+`func (o *TypeHolderExample) GetArrayItem() []int32`
+
+GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise.
+
+### GetArrayItemOk
+
+`func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool)`
+
+GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasArrayItem
+
+`func (o *TypeHolderExample) HasArrayItem() bool`
+
+HasArrayItem returns a boolean if a field has been set.
+
+### SetArrayItem
+
+`func (o *TypeHolderExample) SetArrayItem(v []int32)`
+
+SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field.
+
[[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-experimental/go-petstore/docs/User.md b/samples/client/petstore/go-experimental/go-petstore/docs/User.md
index 7675d7ff70..4f05d3b473 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/User.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/User.md
@@ -4,14 +4,217 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional]
-**Username** | **string** | | [optional]
-**FirstName** | **string** | | [optional]
-**LastName** | **string** | | [optional]
-**Email** | **string** | | [optional]
-**Password** | **string** | | [optional]
-**Phone** | **string** | | [optional]
-**UserStatus** | **int32** | User Status | [optional]
+**Id** | Pointer to **int64** | | [optional]
+**Username** | Pointer to **string** | | [optional]
+**FirstName** | Pointer to **string** | | [optional]
+**LastName** | Pointer to **string** | | [optional]
+**Email** | Pointer to **string** | | [optional]
+**Password** | Pointer to **string** | | [optional]
+**Phone** | Pointer to **string** | | [optional]
+**UserStatus** | Pointer to **int32** | User Status | [optional]
+
+## Methods
+
+### GetId
+
+`func (o *User) GetId() int64`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *User) GetIdOk() (int64, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasId
+
+`func (o *User) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### SetId
+
+`func (o *User) SetId(v int64)`
+
+SetId gets a reference to the given int64 and assigns it to the Id field.
+
+### GetUsername
+
+`func (o *User) GetUsername() string`
+
+GetUsername returns the Username field if non-nil, zero value otherwise.
+
+### GetUsernameOk
+
+`func (o *User) GetUsernameOk() (string, bool)`
+
+GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasUsername
+
+`func (o *User) HasUsername() bool`
+
+HasUsername returns a boolean if a field has been set.
+
+### SetUsername
+
+`func (o *User) SetUsername(v string)`
+
+SetUsername gets a reference to the given string and assigns it to the Username field.
+
+### GetFirstName
+
+`func (o *User) GetFirstName() string`
+
+GetFirstName returns the FirstName field if non-nil, zero value otherwise.
+
+### GetFirstNameOk
+
+`func (o *User) GetFirstNameOk() (string, bool)`
+
+GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasFirstName
+
+`func (o *User) HasFirstName() bool`
+
+HasFirstName returns a boolean if a field has been set.
+
+### SetFirstName
+
+`func (o *User) SetFirstName(v string)`
+
+SetFirstName gets a reference to the given string and assigns it to the FirstName field.
+
+### GetLastName
+
+`func (o *User) GetLastName() string`
+
+GetLastName returns the LastName field if non-nil, zero value otherwise.
+
+### GetLastNameOk
+
+`func (o *User) GetLastNameOk() (string, bool)`
+
+GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasLastName
+
+`func (o *User) HasLastName() bool`
+
+HasLastName returns a boolean if a field has been set.
+
+### SetLastName
+
+`func (o *User) SetLastName(v string)`
+
+SetLastName gets a reference to the given string and assigns it to the LastName field.
+
+### GetEmail
+
+`func (o *User) GetEmail() string`
+
+GetEmail returns the Email field if non-nil, zero value otherwise.
+
+### GetEmailOk
+
+`func (o *User) GetEmailOk() (string, bool)`
+
+GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasEmail
+
+`func (o *User) HasEmail() bool`
+
+HasEmail returns a boolean if a field has been set.
+
+### SetEmail
+
+`func (o *User) SetEmail(v string)`
+
+SetEmail gets a reference to the given string and assigns it to the Email field.
+
+### GetPassword
+
+`func (o *User) GetPassword() string`
+
+GetPassword returns the Password field if non-nil, zero value otherwise.
+
+### GetPasswordOk
+
+`func (o *User) GetPasswordOk() (string, bool)`
+
+GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPassword
+
+`func (o *User) HasPassword() bool`
+
+HasPassword returns a boolean if a field has been set.
+
+### SetPassword
+
+`func (o *User) SetPassword(v string)`
+
+SetPassword gets a reference to the given string and assigns it to the Password field.
+
+### GetPhone
+
+`func (o *User) GetPhone() string`
+
+GetPhone returns the Phone field if non-nil, zero value otherwise.
+
+### GetPhoneOk
+
+`func (o *User) GetPhoneOk() (string, bool)`
+
+GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPhone
+
+`func (o *User) HasPhone() bool`
+
+HasPhone returns a boolean if a field has been set.
+
+### SetPhone
+
+`func (o *User) SetPhone(v string)`
+
+SetPhone gets a reference to the given string and assigns it to the Phone field.
+
+### GetUserStatus
+
+`func (o *User) GetUserStatus() int32`
+
+GetUserStatus returns the UserStatus field if non-nil, zero value otherwise.
+
+### GetUserStatusOk
+
+`func (o *User) GetUserStatusOk() (int32, bool)`
+
+GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasUserStatus
+
+`func (o *User) HasUserStatus() bool`
+
+HasUserStatus returns a boolean if a field has been set.
+
+### SetUserStatus
+
+`func (o *User) SetUserStatus(v int32)`
+
+SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field.
+
[[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-experimental/go-petstore/docs/XmlItem.md b/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md
index 8a9c2dc0b5..cdee2ad0dd 100644
--- a/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md
+++ b/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md
@@ -4,35 +4,763 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**AttributeString** | **string** | | [optional]
-**AttributeNumber** | **float32** | | [optional]
-**AttributeInteger** | **int32** | | [optional]
-**AttributeBoolean** | **bool** | | [optional]
-**WrappedArray** | **[]int32** | | [optional]
-**NameString** | **string** | | [optional]
-**NameNumber** | **float32** | | [optional]
-**NameInteger** | **int32** | | [optional]
-**NameBoolean** | **bool** | | [optional]
-**NameArray** | **[]int32** | | [optional]
-**NameWrappedArray** | **[]int32** | | [optional]
-**PrefixString** | **string** | | [optional]
-**PrefixNumber** | **float32** | | [optional]
-**PrefixInteger** | **int32** | | [optional]
-**PrefixBoolean** | **bool** | | [optional]
-**PrefixArray** | **[]int32** | | [optional]
-**PrefixWrappedArray** | **[]int32** | | [optional]
-**NamespaceString** | **string** | | [optional]
-**NamespaceNumber** | **float32** | | [optional]
-**NamespaceInteger** | **int32** | | [optional]
-**NamespaceBoolean** | **bool** | | [optional]
-**NamespaceArray** | **[]int32** | | [optional]
-**NamespaceWrappedArray** | **[]int32** | | [optional]
-**PrefixNsString** | **string** | | [optional]
-**PrefixNsNumber** | **float32** | | [optional]
-**PrefixNsInteger** | **int32** | | [optional]
-**PrefixNsBoolean** | **bool** | | [optional]
-**PrefixNsArray** | **[]int32** | | [optional]
-**PrefixNsWrappedArray** | **[]int32** | | [optional]
+**AttributeString** | Pointer to **string** | | [optional]
+**AttributeNumber** | Pointer to **float32** | | [optional]
+**AttributeInteger** | Pointer to **int32** | | [optional]
+**AttributeBoolean** | Pointer to **bool** | | [optional]
+**WrappedArray** | Pointer to **[]int32** | | [optional]
+**NameString** | Pointer to **string** | | [optional]
+**NameNumber** | Pointer to **float32** | | [optional]
+**NameInteger** | Pointer to **int32** | | [optional]
+**NameBoolean** | Pointer to **bool** | | [optional]
+**NameArray** | Pointer to **[]int32** | | [optional]
+**NameWrappedArray** | Pointer to **[]int32** | | [optional]
+**PrefixString** | Pointer to **string** | | [optional]
+**PrefixNumber** | Pointer to **float32** | | [optional]
+**PrefixInteger** | Pointer to **int32** | | [optional]
+**PrefixBoolean** | Pointer to **bool** | | [optional]
+**PrefixArray** | Pointer to **[]int32** | | [optional]
+**PrefixWrappedArray** | Pointer to **[]int32** | | [optional]
+**NamespaceString** | Pointer to **string** | | [optional]
+**NamespaceNumber** | Pointer to **float32** | | [optional]
+**NamespaceInteger** | Pointer to **int32** | | [optional]
+**NamespaceBoolean** | Pointer to **bool** | | [optional]
+**NamespaceArray** | Pointer to **[]int32** | | [optional]
+**NamespaceWrappedArray** | Pointer to **[]int32** | | [optional]
+**PrefixNsString** | Pointer to **string** | | [optional]
+**PrefixNsNumber** | Pointer to **float32** | | [optional]
+**PrefixNsInteger** | Pointer to **int32** | | [optional]
+**PrefixNsBoolean** | Pointer to **bool** | | [optional]
+**PrefixNsArray** | Pointer to **[]int32** | | [optional]
+**PrefixNsWrappedArray** | Pointer to **[]int32** | | [optional]
+
+## Methods
+
+### GetAttributeString
+
+`func (o *XmlItem) GetAttributeString() string`
+
+GetAttributeString returns the AttributeString field if non-nil, zero value otherwise.
+
+### GetAttributeStringOk
+
+`func (o *XmlItem) GetAttributeStringOk() (string, bool)`
+
+GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAttributeString
+
+`func (o *XmlItem) HasAttributeString() bool`
+
+HasAttributeString returns a boolean if a field has been set.
+
+### SetAttributeString
+
+`func (o *XmlItem) SetAttributeString(v string)`
+
+SetAttributeString gets a reference to the given string and assigns it to the AttributeString field.
+
+### GetAttributeNumber
+
+`func (o *XmlItem) GetAttributeNumber() float32`
+
+GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise.
+
+### GetAttributeNumberOk
+
+`func (o *XmlItem) GetAttributeNumberOk() (float32, bool)`
+
+GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAttributeNumber
+
+`func (o *XmlItem) HasAttributeNumber() bool`
+
+HasAttributeNumber returns a boolean if a field has been set.
+
+### SetAttributeNumber
+
+`func (o *XmlItem) SetAttributeNumber(v float32)`
+
+SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field.
+
+### GetAttributeInteger
+
+`func (o *XmlItem) GetAttributeInteger() int32`
+
+GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise.
+
+### GetAttributeIntegerOk
+
+`func (o *XmlItem) GetAttributeIntegerOk() (int32, bool)`
+
+GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAttributeInteger
+
+`func (o *XmlItem) HasAttributeInteger() bool`
+
+HasAttributeInteger returns a boolean if a field has been set.
+
+### SetAttributeInteger
+
+`func (o *XmlItem) SetAttributeInteger(v int32)`
+
+SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field.
+
+### GetAttributeBoolean
+
+`func (o *XmlItem) GetAttributeBoolean() bool`
+
+GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise.
+
+### GetAttributeBooleanOk
+
+`func (o *XmlItem) GetAttributeBooleanOk() (bool, bool)`
+
+GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasAttributeBoolean
+
+`func (o *XmlItem) HasAttributeBoolean() bool`
+
+HasAttributeBoolean returns a boolean if a field has been set.
+
+### SetAttributeBoolean
+
+`func (o *XmlItem) SetAttributeBoolean(v bool)`
+
+SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field.
+
+### GetWrappedArray
+
+`func (o *XmlItem) GetWrappedArray() []int32`
+
+GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise.
+
+### GetWrappedArrayOk
+
+`func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool)`
+
+GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasWrappedArray
+
+`func (o *XmlItem) HasWrappedArray() bool`
+
+HasWrappedArray returns a boolean if a field has been set.
+
+### SetWrappedArray
+
+`func (o *XmlItem) SetWrappedArray(v []int32)`
+
+SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field.
+
+### GetNameString
+
+`func (o *XmlItem) GetNameString() string`
+
+GetNameString returns the NameString field if non-nil, zero value otherwise.
+
+### GetNameStringOk
+
+`func (o *XmlItem) GetNameStringOk() (string, bool)`
+
+GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNameString
+
+`func (o *XmlItem) HasNameString() bool`
+
+HasNameString returns a boolean if a field has been set.
+
+### SetNameString
+
+`func (o *XmlItem) SetNameString(v string)`
+
+SetNameString gets a reference to the given string and assigns it to the NameString field.
+
+### GetNameNumber
+
+`func (o *XmlItem) GetNameNumber() float32`
+
+GetNameNumber returns the NameNumber field if non-nil, zero value otherwise.
+
+### GetNameNumberOk
+
+`func (o *XmlItem) GetNameNumberOk() (float32, bool)`
+
+GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNameNumber
+
+`func (o *XmlItem) HasNameNumber() bool`
+
+HasNameNumber returns a boolean if a field has been set.
+
+### SetNameNumber
+
+`func (o *XmlItem) SetNameNumber(v float32)`
+
+SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field.
+
+### GetNameInteger
+
+`func (o *XmlItem) GetNameInteger() int32`
+
+GetNameInteger returns the NameInteger field if non-nil, zero value otherwise.
+
+### GetNameIntegerOk
+
+`func (o *XmlItem) GetNameIntegerOk() (int32, bool)`
+
+GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNameInteger
+
+`func (o *XmlItem) HasNameInteger() bool`
+
+HasNameInteger returns a boolean if a field has been set.
+
+### SetNameInteger
+
+`func (o *XmlItem) SetNameInteger(v int32)`
+
+SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field.
+
+### GetNameBoolean
+
+`func (o *XmlItem) GetNameBoolean() bool`
+
+GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise.
+
+### GetNameBooleanOk
+
+`func (o *XmlItem) GetNameBooleanOk() (bool, bool)`
+
+GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNameBoolean
+
+`func (o *XmlItem) HasNameBoolean() bool`
+
+HasNameBoolean returns a boolean if a field has been set.
+
+### SetNameBoolean
+
+`func (o *XmlItem) SetNameBoolean(v bool)`
+
+SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field.
+
+### GetNameArray
+
+`func (o *XmlItem) GetNameArray() []int32`
+
+GetNameArray returns the NameArray field if non-nil, zero value otherwise.
+
+### GetNameArrayOk
+
+`func (o *XmlItem) GetNameArrayOk() ([]int32, bool)`
+
+GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNameArray
+
+`func (o *XmlItem) HasNameArray() bool`
+
+HasNameArray returns a boolean if a field has been set.
+
+### SetNameArray
+
+`func (o *XmlItem) SetNameArray(v []int32)`
+
+SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field.
+
+### GetNameWrappedArray
+
+`func (o *XmlItem) GetNameWrappedArray() []int32`
+
+GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise.
+
+### GetNameWrappedArrayOk
+
+`func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool)`
+
+GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNameWrappedArray
+
+`func (o *XmlItem) HasNameWrappedArray() bool`
+
+HasNameWrappedArray returns a boolean if a field has been set.
+
+### SetNameWrappedArray
+
+`func (o *XmlItem) SetNameWrappedArray(v []int32)`
+
+SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field.
+
+### GetPrefixString
+
+`func (o *XmlItem) GetPrefixString() string`
+
+GetPrefixString returns the PrefixString field if non-nil, zero value otherwise.
+
+### GetPrefixStringOk
+
+`func (o *XmlItem) GetPrefixStringOk() (string, bool)`
+
+GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixString
+
+`func (o *XmlItem) HasPrefixString() bool`
+
+HasPrefixString returns a boolean if a field has been set.
+
+### SetPrefixString
+
+`func (o *XmlItem) SetPrefixString(v string)`
+
+SetPrefixString gets a reference to the given string and assigns it to the PrefixString field.
+
+### GetPrefixNumber
+
+`func (o *XmlItem) GetPrefixNumber() float32`
+
+GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise.
+
+### GetPrefixNumberOk
+
+`func (o *XmlItem) GetPrefixNumberOk() (float32, bool)`
+
+GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixNumber
+
+`func (o *XmlItem) HasPrefixNumber() bool`
+
+HasPrefixNumber returns a boolean if a field has been set.
+
+### SetPrefixNumber
+
+`func (o *XmlItem) SetPrefixNumber(v float32)`
+
+SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field.
+
+### GetPrefixInteger
+
+`func (o *XmlItem) GetPrefixInteger() int32`
+
+GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise.
+
+### GetPrefixIntegerOk
+
+`func (o *XmlItem) GetPrefixIntegerOk() (int32, bool)`
+
+GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixInteger
+
+`func (o *XmlItem) HasPrefixInteger() bool`
+
+HasPrefixInteger returns a boolean if a field has been set.
+
+### SetPrefixInteger
+
+`func (o *XmlItem) SetPrefixInteger(v int32)`
+
+SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field.
+
+### GetPrefixBoolean
+
+`func (o *XmlItem) GetPrefixBoolean() bool`
+
+GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise.
+
+### GetPrefixBooleanOk
+
+`func (o *XmlItem) GetPrefixBooleanOk() (bool, bool)`
+
+GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixBoolean
+
+`func (o *XmlItem) HasPrefixBoolean() bool`
+
+HasPrefixBoolean returns a boolean if a field has been set.
+
+### SetPrefixBoolean
+
+`func (o *XmlItem) SetPrefixBoolean(v bool)`
+
+SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field.
+
+### GetPrefixArray
+
+`func (o *XmlItem) GetPrefixArray() []int32`
+
+GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise.
+
+### GetPrefixArrayOk
+
+`func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool)`
+
+GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixArray
+
+`func (o *XmlItem) HasPrefixArray() bool`
+
+HasPrefixArray returns a boolean if a field has been set.
+
+### SetPrefixArray
+
+`func (o *XmlItem) SetPrefixArray(v []int32)`
+
+SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field.
+
+### GetPrefixWrappedArray
+
+`func (o *XmlItem) GetPrefixWrappedArray() []int32`
+
+GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise.
+
+### GetPrefixWrappedArrayOk
+
+`func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool)`
+
+GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixWrappedArray
+
+`func (o *XmlItem) HasPrefixWrappedArray() bool`
+
+HasPrefixWrappedArray returns a boolean if a field has been set.
+
+### SetPrefixWrappedArray
+
+`func (o *XmlItem) SetPrefixWrappedArray(v []int32)`
+
+SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field.
+
+### GetNamespaceString
+
+`func (o *XmlItem) GetNamespaceString() string`
+
+GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise.
+
+### GetNamespaceStringOk
+
+`func (o *XmlItem) GetNamespaceStringOk() (string, bool)`
+
+GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNamespaceString
+
+`func (o *XmlItem) HasNamespaceString() bool`
+
+HasNamespaceString returns a boolean if a field has been set.
+
+### SetNamespaceString
+
+`func (o *XmlItem) SetNamespaceString(v string)`
+
+SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field.
+
+### GetNamespaceNumber
+
+`func (o *XmlItem) GetNamespaceNumber() float32`
+
+GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise.
+
+### GetNamespaceNumberOk
+
+`func (o *XmlItem) GetNamespaceNumberOk() (float32, bool)`
+
+GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNamespaceNumber
+
+`func (o *XmlItem) HasNamespaceNumber() bool`
+
+HasNamespaceNumber returns a boolean if a field has been set.
+
+### SetNamespaceNumber
+
+`func (o *XmlItem) SetNamespaceNumber(v float32)`
+
+SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field.
+
+### GetNamespaceInteger
+
+`func (o *XmlItem) GetNamespaceInteger() int32`
+
+GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise.
+
+### GetNamespaceIntegerOk
+
+`func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool)`
+
+GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNamespaceInteger
+
+`func (o *XmlItem) HasNamespaceInteger() bool`
+
+HasNamespaceInteger returns a boolean if a field has been set.
+
+### SetNamespaceInteger
+
+`func (o *XmlItem) SetNamespaceInteger(v int32)`
+
+SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field.
+
+### GetNamespaceBoolean
+
+`func (o *XmlItem) GetNamespaceBoolean() bool`
+
+GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise.
+
+### GetNamespaceBooleanOk
+
+`func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool)`
+
+GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNamespaceBoolean
+
+`func (o *XmlItem) HasNamespaceBoolean() bool`
+
+HasNamespaceBoolean returns a boolean if a field has been set.
+
+### SetNamespaceBoolean
+
+`func (o *XmlItem) SetNamespaceBoolean(v bool)`
+
+SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field.
+
+### GetNamespaceArray
+
+`func (o *XmlItem) GetNamespaceArray() []int32`
+
+GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise.
+
+### GetNamespaceArrayOk
+
+`func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool)`
+
+GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNamespaceArray
+
+`func (o *XmlItem) HasNamespaceArray() bool`
+
+HasNamespaceArray returns a boolean if a field has been set.
+
+### SetNamespaceArray
+
+`func (o *XmlItem) SetNamespaceArray(v []int32)`
+
+SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field.
+
+### GetNamespaceWrappedArray
+
+`func (o *XmlItem) GetNamespaceWrappedArray() []int32`
+
+GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise.
+
+### GetNamespaceWrappedArrayOk
+
+`func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool)`
+
+GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasNamespaceWrappedArray
+
+`func (o *XmlItem) HasNamespaceWrappedArray() bool`
+
+HasNamespaceWrappedArray returns a boolean if a field has been set.
+
+### SetNamespaceWrappedArray
+
+`func (o *XmlItem) SetNamespaceWrappedArray(v []int32)`
+
+SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field.
+
+### GetPrefixNsString
+
+`func (o *XmlItem) GetPrefixNsString() string`
+
+GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise.
+
+### GetPrefixNsStringOk
+
+`func (o *XmlItem) GetPrefixNsStringOk() (string, bool)`
+
+GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixNsString
+
+`func (o *XmlItem) HasPrefixNsString() bool`
+
+HasPrefixNsString returns a boolean if a field has been set.
+
+### SetPrefixNsString
+
+`func (o *XmlItem) SetPrefixNsString(v string)`
+
+SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field.
+
+### GetPrefixNsNumber
+
+`func (o *XmlItem) GetPrefixNsNumber() float32`
+
+GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise.
+
+### GetPrefixNsNumberOk
+
+`func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool)`
+
+GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixNsNumber
+
+`func (o *XmlItem) HasPrefixNsNumber() bool`
+
+HasPrefixNsNumber returns a boolean if a field has been set.
+
+### SetPrefixNsNumber
+
+`func (o *XmlItem) SetPrefixNsNumber(v float32)`
+
+SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field.
+
+### GetPrefixNsInteger
+
+`func (o *XmlItem) GetPrefixNsInteger() int32`
+
+GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise.
+
+### GetPrefixNsIntegerOk
+
+`func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool)`
+
+GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixNsInteger
+
+`func (o *XmlItem) HasPrefixNsInteger() bool`
+
+HasPrefixNsInteger returns a boolean if a field has been set.
+
+### SetPrefixNsInteger
+
+`func (o *XmlItem) SetPrefixNsInteger(v int32)`
+
+SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field.
+
+### GetPrefixNsBoolean
+
+`func (o *XmlItem) GetPrefixNsBoolean() bool`
+
+GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise.
+
+### GetPrefixNsBooleanOk
+
+`func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool)`
+
+GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixNsBoolean
+
+`func (o *XmlItem) HasPrefixNsBoolean() bool`
+
+HasPrefixNsBoolean returns a boolean if a field has been set.
+
+### SetPrefixNsBoolean
+
+`func (o *XmlItem) SetPrefixNsBoolean(v bool)`
+
+SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field.
+
+### GetPrefixNsArray
+
+`func (o *XmlItem) GetPrefixNsArray() []int32`
+
+GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise.
+
+### GetPrefixNsArrayOk
+
+`func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool)`
+
+GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixNsArray
+
+`func (o *XmlItem) HasPrefixNsArray() bool`
+
+HasPrefixNsArray returns a boolean if a field has been set.
+
+### SetPrefixNsArray
+
+`func (o *XmlItem) SetPrefixNsArray(v []int32)`
+
+SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field.
+
+### GetPrefixNsWrappedArray
+
+`func (o *XmlItem) GetPrefixNsWrappedArray() []int32`
+
+GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise.
+
+### GetPrefixNsWrappedArrayOk
+
+`func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool)`
+
+GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### HasPrefixNsWrappedArray
+
+`func (o *XmlItem) HasPrefixNsWrappedArray() bool`
+
+HasPrefixNsWrappedArray returns a boolean if a field has been set.
+
+### SetPrefixNsWrappedArray
+
+`func (o *XmlItem) SetPrefixNsWrappedArray(v []int32)`
+
+SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field.
+
[[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-experimental/go-petstore/model_200_response.go b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go
index f918cabaaa..97ced8c6d1 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go
@@ -8,9 +8,94 @@
*/
package petstore
+import (
+ "encoding/json"
+)
// Model for testing model name starting with number
type Model200Response struct {
- Name int32 `json:"name,omitempty"`
- Class string `json:"class,omitempty"`
+ Name *int32 `json:"name,omitempty"`
+
+ Class *string `json:"class,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *Model200Response) GetName() int32 {
+ if o == nil || o.Name == nil {
+ var ret int32
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Model200Response) GetNameOk() (int32, bool) {
+ if o == nil || o.Name == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *Model200Response) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given int32 and assigns it to the Name field.
+func (o *Model200Response) SetName(v int32) {
+ o.Name = &v
+}
+
+// GetClass returns the Class field if non-nil, zero value otherwise.
+func (o *Model200Response) GetClass() string {
+ if o == nil || o.Class == nil {
+ var ret string
+ return ret
+ }
+ return *o.Class
+}
+
+// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Model200Response) GetClassOk() (string, bool) {
+ if o == nil || o.Class == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Class, true
+}
+
+// HasClass returns a boolean if a field has been set.
+func (o *Model200Response) HasClass() bool {
+ if o != nil && o.Class != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClass gets a reference to the given string and assigns it to the Class field.
+func (o *Model200Response) SetClass(v string) {
+ o.Class = &v
+}
+
+
+func (o Model200Response) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ if o.Class != nil {
+ toSerialize["class"] = o.Class
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go
index ca06584a72..baa81b92e5 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type AdditionalPropertiesAnyType struct {
- Name string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesAnyType) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *AdditionalPropertiesAnyType) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *AdditionalPropertiesAnyType) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o AdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go
index 2e71585506..0ccbf37442 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type AdditionalPropertiesArray struct {
- Name string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesArray) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesArray) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *AdditionalPropertiesArray) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *AdditionalPropertiesArray) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o AdditionalPropertiesArray) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go
index 09f1ac3b32..efa95a8767 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type AdditionalPropertiesBoolean struct {
- Name string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesBoolean) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *AdditionalPropertiesBoolean) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *AdditionalPropertiesBoolean) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o AdditionalPropertiesBoolean) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go
index 2e1845e194..534148d11d 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go
@@ -8,17 +8,435 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type AdditionalPropertiesClass struct {
- MapString map[string]string `json:"map_string,omitempty"`
- MapNumber map[string]float32 `json:"map_number,omitempty"`
- MapInteger map[string]int32 `json:"map_integer,omitempty"`
- MapBoolean map[string]bool `json:"map_boolean,omitempty"`
- MapArrayInteger map[string][]int32 `json:"map_array_integer,omitempty"`
- MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"`
- MapMapString map[string]map[string]string `json:"map_map_string,omitempty"`
- MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"`
- Anytype1 map[string]interface{} `json:"anytype_1,omitempty"`
- Anytype2 map[string]interface{} `json:"anytype_2,omitempty"`
- Anytype3 map[string]interface{} `json:"anytype_3,omitempty"`
+ MapString *map[string]string `json:"map_string,omitempty"`
+
+ MapNumber *map[string]float32 `json:"map_number,omitempty"`
+
+ MapInteger *map[string]int32 `json:"map_integer,omitempty"`
+
+ MapBoolean *map[string]bool `json:"map_boolean,omitempty"`
+
+ MapArrayInteger *map[string][]int32 `json:"map_array_integer,omitempty"`
+
+ MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"`
+
+ MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"`
+
+ MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"`
+
+ Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"`
+
+ Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"`
+
+ Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"`
+
}
+
+// GetMapString returns the MapString field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetMapString() map[string]string {
+ if o == nil || o.MapString == nil {
+ var ret map[string]string
+ return ret
+ }
+ return *o.MapString
+}
+
+// GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool) {
+ if o == nil || o.MapString == nil {
+ var ret map[string]string
+ return ret, false
+ }
+ return *o.MapString, true
+}
+
+// HasMapString returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasMapString() bool {
+ if o != nil && o.MapString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapString gets a reference to the given map[string]string and assigns it to the MapString field.
+func (o *AdditionalPropertiesClass) SetMapString(v map[string]string) {
+ o.MapString = &v
+}
+
+// GetMapNumber returns the MapNumber field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32 {
+ if o == nil || o.MapNumber == nil {
+ var ret map[string]float32
+ return ret
+ }
+ return *o.MapNumber
+}
+
+// GetMapNumberOk returns a tuple with the MapNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool) {
+ if o == nil || o.MapNumber == nil {
+ var ret map[string]float32
+ return ret, false
+ }
+ return *o.MapNumber, true
+}
+
+// HasMapNumber returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasMapNumber() bool {
+ if o != nil && o.MapNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapNumber gets a reference to the given map[string]float32 and assigns it to the MapNumber field.
+func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32) {
+ o.MapNumber = &v
+}
+
+// GetMapInteger returns the MapInteger field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32 {
+ if o == nil || o.MapInteger == nil {
+ var ret map[string]int32
+ return ret
+ }
+ return *o.MapInteger
+}
+
+// GetMapIntegerOk returns a tuple with the MapInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool) {
+ if o == nil || o.MapInteger == nil {
+ var ret map[string]int32
+ return ret, false
+ }
+ return *o.MapInteger, true
+}
+
+// HasMapInteger returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasMapInteger() bool {
+ if o != nil && o.MapInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapInteger gets a reference to the given map[string]int32 and assigns it to the MapInteger field.
+func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32) {
+ o.MapInteger = &v
+}
+
+// GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool {
+ if o == nil || o.MapBoolean == nil {
+ var ret map[string]bool
+ return ret
+ }
+ return *o.MapBoolean
+}
+
+// GetMapBooleanOk returns a tuple with the MapBoolean field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool) {
+ if o == nil || o.MapBoolean == nil {
+ var ret map[string]bool
+ return ret, false
+ }
+ return *o.MapBoolean, true
+}
+
+// HasMapBoolean returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasMapBoolean() bool {
+ if o != nil && o.MapBoolean != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapBoolean gets a reference to the given map[string]bool and assigns it to the MapBoolean field.
+func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool) {
+ o.MapBoolean = &v
+}
+
+// GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32 {
+ if o == nil || o.MapArrayInteger == nil {
+ var ret map[string][]int32
+ return ret
+ }
+ return *o.MapArrayInteger
+}
+
+// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool) {
+ if o == nil || o.MapArrayInteger == nil {
+ var ret map[string][]int32
+ return ret, false
+ }
+ return *o.MapArrayInteger, true
+}
+
+// HasMapArrayInteger returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasMapArrayInteger() bool {
+ if o != nil && o.MapArrayInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapArrayInteger gets a reference to the given map[string][]int32 and assigns it to the MapArrayInteger field.
+func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32) {
+ o.MapArrayInteger = &v
+}
+
+// GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{} {
+ if o == nil || o.MapArrayAnytype == nil {
+ var ret map[string][]map[string]interface{}
+ return ret
+ }
+ return *o.MapArrayAnytype
+}
+
+// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool) {
+ if o == nil || o.MapArrayAnytype == nil {
+ var ret map[string][]map[string]interface{}
+ return ret, false
+ }
+ return *o.MapArrayAnytype, true
+}
+
+// HasMapArrayAnytype returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool {
+ if o != nil && o.MapArrayAnytype != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field.
+func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{}) {
+ o.MapArrayAnytype = &v
+}
+
+// GetMapMapString returns the MapMapString field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]string {
+ if o == nil || o.MapMapString == nil {
+ var ret map[string]map[string]string
+ return ret
+ }
+ return *o.MapMapString
+}
+
+// GetMapMapStringOk returns a tuple with the MapMapString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool) {
+ if o == nil || o.MapMapString == nil {
+ var ret map[string]map[string]string
+ return ret, false
+ }
+ return *o.MapMapString, true
+}
+
+// HasMapMapString returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasMapMapString() bool {
+ if o != nil && o.MapMapString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapMapString gets a reference to the given map[string]map[string]string and assigns it to the MapMapString field.
+func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]string) {
+ o.MapMapString = &v
+}
+
+// GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{} {
+ if o == nil || o.MapMapAnytype == nil {
+ var ret map[string]map[string]map[string]interface{}
+ return ret
+ }
+ return *o.MapMapAnytype
+}
+
+// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool) {
+ if o == nil || o.MapMapAnytype == nil {
+ var ret map[string]map[string]map[string]interface{}
+ return ret, false
+ }
+ return *o.MapMapAnytype, true
+}
+
+// HasMapMapAnytype returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool {
+ if o != nil && o.MapMapAnytype != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field.
+func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{}) {
+ o.MapMapAnytype = &v
+}
+
+// GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} {
+ if o == nil || o.Anytype1 == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return *o.Anytype1
+}
+
+// GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) {
+ if o == nil || o.Anytype1 == nil {
+ var ret map[string]interface{}
+ return ret, false
+ }
+ return *o.Anytype1, true
+}
+
+// HasAnytype1 returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasAnytype1() bool {
+ if o != nil && o.Anytype1 != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field.
+func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) {
+ o.Anytype1 = &v
+}
+
+// GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} {
+ if o == nil || o.Anytype2 == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return *o.Anytype2
+}
+
+// GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) {
+ if o == nil || o.Anytype2 == nil {
+ var ret map[string]interface{}
+ return ret, false
+ }
+ return *o.Anytype2, true
+}
+
+// HasAnytype2 returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasAnytype2() bool {
+ if o != nil && o.Anytype2 != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field.
+func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) {
+ o.Anytype2 = &v
+}
+
+// GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} {
+ if o == nil || o.Anytype3 == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return *o.Anytype3
+}
+
+// GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) {
+ if o == nil || o.Anytype3 == nil {
+ var ret map[string]interface{}
+ return ret, false
+ }
+ return *o.Anytype3, true
+}
+
+// HasAnytype3 returns a boolean if a field has been set.
+func (o *AdditionalPropertiesClass) HasAnytype3() bool {
+ if o != nil && o.Anytype3 != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field.
+func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) {
+ o.Anytype3 = &v
+}
+
+
+func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.MapString != nil {
+ toSerialize["map_string"] = o.MapString
+ }
+ if o.MapNumber != nil {
+ toSerialize["map_number"] = o.MapNumber
+ }
+ if o.MapInteger != nil {
+ toSerialize["map_integer"] = o.MapInteger
+ }
+ if o.MapBoolean != nil {
+ toSerialize["map_boolean"] = o.MapBoolean
+ }
+ if o.MapArrayInteger != nil {
+ toSerialize["map_array_integer"] = o.MapArrayInteger
+ }
+ if o.MapArrayAnytype != nil {
+ toSerialize["map_array_anytype"] = o.MapArrayAnytype
+ }
+ if o.MapMapString != nil {
+ toSerialize["map_map_string"] = o.MapMapString
+ }
+ if o.MapMapAnytype != nil {
+ toSerialize["map_map_anytype"] = o.MapMapAnytype
+ }
+ if o.Anytype1 != nil {
+ toSerialize["anytype_1"] = o.Anytype1
+ }
+ if o.Anytype2 != nil {
+ toSerialize["anytype_2"] = o.Anytype2
+ }
+ if o.Anytype3 != nil {
+ toSerialize["anytype_3"] = o.Anytype3
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go
index 2f69fe4b01..05dea42d51 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type AdditionalPropertiesInteger struct {
- Name string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesInteger) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *AdditionalPropertiesInteger) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *AdditionalPropertiesInteger) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o AdditionalPropertiesInteger) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go
index 900b2ec32c..484c9d79ad 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type AdditionalPropertiesNumber struct {
- Name string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesNumber) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *AdditionalPropertiesNumber) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *AdditionalPropertiesNumber) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o AdditionalPropertiesNumber) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go
index 99fa6d02fd..0482ad8ef1 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type AdditionalPropertiesObject struct {
- Name string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesObject) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesObject) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *AdditionalPropertiesObject) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *AdditionalPropertiesObject) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o AdditionalPropertiesObject) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go
index 82fe0e4ed3..561cd08191 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type AdditionalPropertiesString struct {
- Name string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *AdditionalPropertiesString) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *AdditionalPropertiesString) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *AdditionalPropertiesString) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *AdditionalPropertiesString) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o AdditionalPropertiesString) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/client/petstore/go-experimental/go-petstore/model_animal.go
index 39d0d2d1ec..897cac1f45 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_animal.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_animal.go
@@ -8,8 +8,97 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
type Animal struct {
- ClassName string `json:"className"`
- Color string `json:"color,omitempty"`
+ ClassName *string `json:"className,omitempty"`
+
+ Color *string `json:"color,omitempty"`
+
}
+
+// GetClassName returns the ClassName field if non-nil, zero value otherwise.
+func (o *Animal) GetClassName() string {
+ if o == nil || o.ClassName == nil {
+ var ret string
+ return ret
+ }
+ return *o.ClassName
+}
+
+// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Animal) GetClassNameOk() (string, bool) {
+ if o == nil || o.ClassName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ClassName, true
+}
+
+// HasClassName returns a boolean if a field has been set.
+func (o *Animal) HasClassName() bool {
+ if o != nil && o.ClassName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClassName gets a reference to the given string and assigns it to the ClassName field.
+func (o *Animal) SetClassName(v string) {
+ o.ClassName = &v
+}
+
+// GetColor returns the Color field if non-nil, zero value otherwise.
+func (o *Animal) GetColor() string {
+ if o == nil || o.Color == nil {
+ var ret string
+ return ret
+ }
+ return *o.Color
+}
+
+// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Animal) GetColorOk() (string, bool) {
+ if o == nil || o.Color == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Color, true
+}
+
+// HasColor returns a boolean if a field has been set.
+func (o *Animal) HasColor() bool {
+ if o != nil && o.Color != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetColor gets a reference to the given string and assigns it to the Color field.
+func (o *Animal) SetColor(v string) {
+ o.Color = &v
+}
+
+
+func (o Animal) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ClassName == nil {
+ return nil, errors.New("ClassName is required and not nullable, but was not set on Animal")
+ }
+ if o.ClassName != nil {
+ toSerialize["className"] = o.ClassName
+ }
+ if o.Color != nil {
+ toSerialize["color"] = o.Color
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go
index 12732fa32c..009e991072 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go
@@ -8,9 +8,131 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type ApiResponse struct {
- Code int32 `json:"code,omitempty"`
- Type string `json:"type,omitempty"`
- Message string `json:"message,omitempty"`
+ Code *int32 `json:"code,omitempty"`
+
+ Type *string `json:"type,omitempty"`
+
+ Message *string `json:"message,omitempty"`
+
}
+
+// GetCode returns the Code field if non-nil, zero value otherwise.
+func (o *ApiResponse) GetCode() int32 {
+ if o == nil || o.Code == nil {
+ var ret int32
+ return ret
+ }
+ return *o.Code
+}
+
+// GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ApiResponse) GetCodeOk() (int32, bool) {
+ if o == nil || o.Code == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.Code, true
+}
+
+// HasCode returns a boolean if a field has been set.
+func (o *ApiResponse) HasCode() bool {
+ if o != nil && o.Code != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCode gets a reference to the given int32 and assigns it to the Code field.
+func (o *ApiResponse) SetCode(v int32) {
+ o.Code = &v
+}
+
+// GetType returns the Type field if non-nil, zero value otherwise.
+func (o *ApiResponse) GetType() string {
+ if o == nil || o.Type == nil {
+ var ret string
+ return ret
+ }
+ return *o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ApiResponse) GetTypeOk() (string, bool) {
+ if o == nil || o.Type == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Type, true
+}
+
+// HasType returns a boolean if a field has been set.
+func (o *ApiResponse) HasType() bool {
+ if o != nil && o.Type != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetType gets a reference to the given string and assigns it to the Type field.
+func (o *ApiResponse) SetType(v string) {
+ o.Type = &v
+}
+
+// GetMessage returns the Message field if non-nil, zero value otherwise.
+func (o *ApiResponse) GetMessage() string {
+ if o == nil || o.Message == nil {
+ var ret string
+ return ret
+ }
+ return *o.Message
+}
+
+// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ApiResponse) GetMessageOk() (string, bool) {
+ if o == nil || o.Message == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Message, true
+}
+
+// HasMessage returns a boolean if a field has been set.
+func (o *ApiResponse) HasMessage() bool {
+ if o != nil && o.Message != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMessage gets a reference to the given string and assigns it to the Message field.
+func (o *ApiResponse) SetMessage(v string) {
+ o.Message = &v
+}
+
+
+func (o ApiResponse) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Code != nil {
+ toSerialize["code"] = o.Code
+ }
+ if o.Type != nil {
+ toSerialize["type"] = o.Type
+ }
+ if o.Message != nil {
+ toSerialize["message"] = o.Message
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go
index 8bf700c7eb..aadebc92a4 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type ArrayOfArrayOfNumberOnly struct {
- ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"`
+ ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"`
+
}
+
+// GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise.
+func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 {
+ if o == nil || o.ArrayArrayNumber == nil {
+ var ret [][]float32
+ return ret
+ }
+ return *o.ArrayArrayNumber
+}
+
+// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) {
+ if o == nil || o.ArrayArrayNumber == nil {
+ var ret [][]float32
+ return ret, false
+ }
+ return *o.ArrayArrayNumber, true
+}
+
+// HasArrayArrayNumber returns a boolean if a field has been set.
+func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool {
+ if o != nil && o.ArrayArrayNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field.
+func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) {
+ o.ArrayArrayNumber = &v
+}
+
+
+func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ArrayArrayNumber != nil {
+ toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go
index ccb473355c..418a07d7d6 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type ArrayOfNumberOnly struct {
- ArrayNumber []float32 `json:"ArrayNumber,omitempty"`
+ ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"`
+
}
+
+// GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise.
+func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 {
+ if o == nil || o.ArrayNumber == nil {
+ var ret []float32
+ return ret
+ }
+ return *o.ArrayNumber
+}
+
+// GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) {
+ if o == nil || o.ArrayNumber == nil {
+ var ret []float32
+ return ret, false
+ }
+ return *o.ArrayNumber, true
+}
+
+// HasArrayNumber returns a boolean if a field has been set.
+func (o *ArrayOfNumberOnly) HasArrayNumber() bool {
+ if o != nil && o.ArrayNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field.
+func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) {
+ o.ArrayNumber = &v
+}
+
+
+func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ArrayNumber != nil {
+ toSerialize["ArrayNumber"] = o.ArrayNumber
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go
index f881980093..8fa143ded8 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go
@@ -8,9 +8,131 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type ArrayTest struct {
- ArrayOfString []string `json:"array_of_string,omitempty"`
- ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty"`
- ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
+ ArrayOfString *[]string `json:"array_of_string,omitempty"`
+
+ ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"`
+
+ ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
+
}
+
+// GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise.
+func (o *ArrayTest) GetArrayOfString() []string {
+ if o == nil || o.ArrayOfString == nil {
+ var ret []string
+ return ret
+ }
+ return *o.ArrayOfString
+}
+
+// GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) {
+ if o == nil || o.ArrayOfString == nil {
+ var ret []string
+ return ret, false
+ }
+ return *o.ArrayOfString, true
+}
+
+// HasArrayOfString returns a boolean if a field has been set.
+func (o *ArrayTest) HasArrayOfString() bool {
+ if o != nil && o.ArrayOfString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field.
+func (o *ArrayTest) SetArrayOfString(v []string) {
+ o.ArrayOfString = &v
+}
+
+// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise.
+func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 {
+ if o == nil || o.ArrayArrayOfInteger == nil {
+ var ret [][]int64
+ return ret
+ }
+ return *o.ArrayArrayOfInteger
+}
+
+// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) {
+ if o == nil || o.ArrayArrayOfInteger == nil {
+ var ret [][]int64
+ return ret, false
+ }
+ return *o.ArrayArrayOfInteger, true
+}
+
+// HasArrayArrayOfInteger returns a boolean if a field has been set.
+func (o *ArrayTest) HasArrayArrayOfInteger() bool {
+ if o != nil && o.ArrayArrayOfInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field.
+func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) {
+ o.ArrayArrayOfInteger = &v
+}
+
+// GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise.
+func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst {
+ if o == nil || o.ArrayArrayOfModel == nil {
+ var ret [][]ReadOnlyFirst
+ return ret
+ }
+ return *o.ArrayArrayOfModel
+}
+
+// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) {
+ if o == nil || o.ArrayArrayOfModel == nil {
+ var ret [][]ReadOnlyFirst
+ return ret, false
+ }
+ return *o.ArrayArrayOfModel, true
+}
+
+// HasArrayArrayOfModel returns a boolean if a field has been set.
+func (o *ArrayTest) HasArrayArrayOfModel() bool {
+ if o != nil && o.ArrayArrayOfModel != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field.
+func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) {
+ o.ArrayArrayOfModel = &v
+}
+
+
+func (o ArrayTest) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ArrayOfString != nil {
+ toSerialize["array_of_string"] = o.ArrayOfString
+ }
+ if o.ArrayArrayOfInteger != nil {
+ toSerialize["array_array_of_integer"] = o.ArrayArrayOfInteger
+ }
+ if o.ArrayArrayOfModel != nil {
+ toSerialize["array_array_of_model"] = o.ArrayArrayOfModel
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go
index 8284ba9c76..107dd7932e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go
@@ -8,13 +8,246 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type Capitalization struct {
- SmallCamel string `json:"smallCamel,omitempty"`
- CapitalCamel string `json:"CapitalCamel,omitempty"`
- SmallSnake string `json:"small_Snake,omitempty"`
- CapitalSnake string `json:"Capital_Snake,omitempty"`
- SCAETHFlowPoints string `json:"SCA_ETH_Flow_Points,omitempty"`
+ SmallCamel *string `json:"smallCamel,omitempty"`
+
+ CapitalCamel *string `json:"CapitalCamel,omitempty"`
+
+ SmallSnake *string `json:"small_Snake,omitempty"`
+
+ CapitalSnake *string `json:"Capital_Snake,omitempty"`
+
+ SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty"`
+
// Name of the pet
- ATT_NAME string `json:"ATT_NAME,omitempty"`
+ ATT_NAME *string `json:"ATT_NAME,omitempty"`
+
}
+
+// GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise.
+func (o *Capitalization) GetSmallCamel() string {
+ if o == nil || o.SmallCamel == nil {
+ var ret string
+ return ret
+ }
+ return *o.SmallCamel
+}
+
+// GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Capitalization) GetSmallCamelOk() (string, bool) {
+ if o == nil || o.SmallCamel == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.SmallCamel, true
+}
+
+// HasSmallCamel returns a boolean if a field has been set.
+func (o *Capitalization) HasSmallCamel() bool {
+ if o != nil && o.SmallCamel != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field.
+func (o *Capitalization) SetSmallCamel(v string) {
+ o.SmallCamel = &v
+}
+
+// GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise.
+func (o *Capitalization) GetCapitalCamel() string {
+ if o == nil || o.CapitalCamel == nil {
+ var ret string
+ return ret
+ }
+ return *o.CapitalCamel
+}
+
+// GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Capitalization) GetCapitalCamelOk() (string, bool) {
+ if o == nil || o.CapitalCamel == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.CapitalCamel, true
+}
+
+// HasCapitalCamel returns a boolean if a field has been set.
+func (o *Capitalization) HasCapitalCamel() bool {
+ if o != nil && o.CapitalCamel != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field.
+func (o *Capitalization) SetCapitalCamel(v string) {
+ o.CapitalCamel = &v
+}
+
+// GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise.
+func (o *Capitalization) GetSmallSnake() string {
+ if o == nil || o.SmallSnake == nil {
+ var ret string
+ return ret
+ }
+ return *o.SmallSnake
+}
+
+// GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Capitalization) GetSmallSnakeOk() (string, bool) {
+ if o == nil || o.SmallSnake == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.SmallSnake, true
+}
+
+// HasSmallSnake returns a boolean if a field has been set.
+func (o *Capitalization) HasSmallSnake() bool {
+ if o != nil && o.SmallSnake != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field.
+func (o *Capitalization) SetSmallSnake(v string) {
+ o.SmallSnake = &v
+}
+
+// GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise.
+func (o *Capitalization) GetCapitalSnake() string {
+ if o == nil || o.CapitalSnake == nil {
+ var ret string
+ return ret
+ }
+ return *o.CapitalSnake
+}
+
+// GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Capitalization) GetCapitalSnakeOk() (string, bool) {
+ if o == nil || o.CapitalSnake == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.CapitalSnake, true
+}
+
+// HasCapitalSnake returns a boolean if a field has been set.
+func (o *Capitalization) HasCapitalSnake() bool {
+ if o != nil && o.CapitalSnake != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field.
+func (o *Capitalization) SetCapitalSnake(v string) {
+ o.CapitalSnake = &v
+}
+
+// GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise.
+func (o *Capitalization) GetSCAETHFlowPoints() string {
+ if o == nil || o.SCAETHFlowPoints == nil {
+ var ret string
+ return ret
+ }
+ return *o.SCAETHFlowPoints
+}
+
+// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) {
+ if o == nil || o.SCAETHFlowPoints == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.SCAETHFlowPoints, true
+}
+
+// HasSCAETHFlowPoints returns a boolean if a field has been set.
+func (o *Capitalization) HasSCAETHFlowPoints() bool {
+ if o != nil && o.SCAETHFlowPoints != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field.
+func (o *Capitalization) SetSCAETHFlowPoints(v string) {
+ o.SCAETHFlowPoints = &v
+}
+
+// GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise.
+func (o *Capitalization) GetATT_NAME() string {
+ if o == nil || o.ATT_NAME == nil {
+ var ret string
+ return ret
+ }
+ return *o.ATT_NAME
+}
+
+// GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Capitalization) GetATT_NAMEOk() (string, bool) {
+ if o == nil || o.ATT_NAME == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ATT_NAME, true
+}
+
+// HasATT_NAME returns a boolean if a field has been set.
+func (o *Capitalization) HasATT_NAME() bool {
+ if o != nil && o.ATT_NAME != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field.
+func (o *Capitalization) SetATT_NAME(v string) {
+ o.ATT_NAME = &v
+}
+
+
+func (o Capitalization) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.SmallCamel != nil {
+ toSerialize["smallCamel"] = o.SmallCamel
+ }
+ if o.CapitalCamel != nil {
+ toSerialize["CapitalCamel"] = o.CapitalCamel
+ }
+ if o.SmallSnake != nil {
+ toSerialize["small_Snake"] = o.SmallSnake
+ }
+ if o.CapitalSnake != nil {
+ toSerialize["Capital_Snake"] = o.CapitalSnake
+ }
+ if o.SCAETHFlowPoints != nil {
+ toSerialize["SCA_ETH_Flow_Points"] = o.SCAETHFlowPoints
+ }
+ if o.ATT_NAME != nil {
+ toSerialize["ATT_NAME"] = o.ATT_NAME
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_cat.go
index 58b3deeb93..8efbf58fd1 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_cat.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_cat.go
@@ -8,9 +8,135 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
type Cat struct {
- ClassName string `json:"className"`
- Color string `json:"color,omitempty"`
- Declawed bool `json:"declawed,omitempty"`
+ ClassName *string `json:"className,omitempty"`
+
+ Color *string `json:"color,omitempty"`
+
+ Declawed *bool `json:"declawed,omitempty"`
+
}
+
+// GetClassName returns the ClassName field if non-nil, zero value otherwise.
+func (o *Cat) GetClassName() string {
+ if o == nil || o.ClassName == nil {
+ var ret string
+ return ret
+ }
+ return *o.ClassName
+}
+
+// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Cat) GetClassNameOk() (string, bool) {
+ if o == nil || o.ClassName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ClassName, true
+}
+
+// HasClassName returns a boolean if a field has been set.
+func (o *Cat) HasClassName() bool {
+ if o != nil && o.ClassName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClassName gets a reference to the given string and assigns it to the ClassName field.
+func (o *Cat) SetClassName(v string) {
+ o.ClassName = &v
+}
+
+// GetColor returns the Color field if non-nil, zero value otherwise.
+func (o *Cat) GetColor() string {
+ if o == nil || o.Color == nil {
+ var ret string
+ return ret
+ }
+ return *o.Color
+}
+
+// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Cat) GetColorOk() (string, bool) {
+ if o == nil || o.Color == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Color, true
+}
+
+// HasColor returns a boolean if a field has been set.
+func (o *Cat) HasColor() bool {
+ if o != nil && o.Color != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetColor gets a reference to the given string and assigns it to the Color field.
+func (o *Cat) SetColor(v string) {
+ o.Color = &v
+}
+
+// GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
+func (o *Cat) GetDeclawed() bool {
+ if o == nil || o.Declawed == nil {
+ var ret bool
+ return ret
+ }
+ return *o.Declawed
+}
+
+// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Cat) GetDeclawedOk() (bool, bool) {
+ if o == nil || o.Declawed == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.Declawed, true
+}
+
+// HasDeclawed returns a boolean if a field has been set.
+func (o *Cat) HasDeclawed() bool {
+ if o != nil && o.Declawed != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
+func (o *Cat) SetDeclawed(v bool) {
+ o.Declawed = &v
+}
+
+
+func (o Cat) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ClassName == nil {
+ return nil, errors.New("ClassName is required and not nullable, but was not set on Cat")
+ }
+ if o.ClassName != nil {
+ toSerialize["className"] = o.ClassName
+ }
+ if o.Color != nil {
+ toSerialize["color"] = o.Color
+ }
+ if o.Declawed != nil {
+ toSerialize["declawed"] = o.Declawed
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go
index 3c1d802bd4..aaf2c8badb 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type CatAllOf struct {
- Declawed bool `json:"declawed,omitempty"`
+ Declawed *bool `json:"declawed,omitempty"`
+
}
+
+// GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
+func (o *CatAllOf) GetDeclawed() bool {
+ if o == nil || o.Declawed == nil {
+ var ret bool
+ return ret
+ }
+ return *o.Declawed
+}
+
+// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *CatAllOf) GetDeclawedOk() (bool, bool) {
+ if o == nil || o.Declawed == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.Declawed, true
+}
+
+// HasDeclawed returns a boolean if a field has been set.
+func (o *CatAllOf) HasDeclawed() bool {
+ if o != nil && o.Declawed != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
+func (o *CatAllOf) SetDeclawed(v bool) {
+ o.Declawed = &v
+}
+
+
+func (o CatAllOf) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Declawed != nil {
+ toSerialize["declawed"] = o.Declawed
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_category.go b/samples/client/petstore/go-experimental/go-petstore/model_category.go
index 2f971417ac..c55d4bd6e9 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_category.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_category.go
@@ -8,8 +8,97 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
type Category struct {
- Id int64 `json:"id,omitempty"`
- Name string `json:"name"`
+ Id *int64 `json:"id,omitempty"`
+
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetId returns the Id field if non-nil, zero value otherwise.
+func (o *Category) GetId() int64 {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Category) GetIdOk() (int64, bool) {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret, false
+ }
+ return *o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *Category) HasId() bool {
+ if o != nil && o.Id != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given int64 and assigns it to the Id field.
+func (o *Category) SetId(v int64) {
+ o.Id = &v
+}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *Category) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Category) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *Category) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *Category) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o Category) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Id != nil {
+ toSerialize["id"] = o.Id
+ }
+ if o.Name == nil {
+ return nil, errors.New("Name is required and not nullable, but was not set on Category")
+ }
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go
index 09c7e89196..0dcaa26431 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go
@@ -8,8 +8,56 @@
*/
package petstore
+import (
+ "encoding/json"
+)
// Model for testing model with \"_class\" property
type ClassModel struct {
- Class string `json:"_class,omitempty"`
+ Class *string `json:"_class,omitempty"`
+
}
+
+// GetClass returns the Class field if non-nil, zero value otherwise.
+func (o *ClassModel) GetClass() string {
+ if o == nil || o.Class == nil {
+ var ret string
+ return ret
+ }
+ return *o.Class
+}
+
+// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ClassModel) GetClassOk() (string, bool) {
+ if o == nil || o.Class == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Class, true
+}
+
+// HasClass returns a boolean if a field has been set.
+func (o *ClassModel) HasClass() bool {
+ if o != nil && o.Class != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClass gets a reference to the given string and assigns it to the Class field.
+func (o *ClassModel) SetClass(v string) {
+ o.Class = &v
+}
+
+
+func (o ClassModel) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Class != nil {
+ toSerialize["_class"] = o.Class
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_client.go b/samples/client/petstore/go-experimental/go-petstore/model_client.go
index 3aa61112c4..72ebd54300 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_client.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_client.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type Client struct {
- Client string `json:"client,omitempty"`
+ Client *string `json:"client,omitempty"`
+
}
+
+// GetClient returns the Client field if non-nil, zero value otherwise.
+func (o *Client) GetClient() string {
+ if o == nil || o.Client == nil {
+ var ret string
+ return ret
+ }
+ return *o.Client
+}
+
+// GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Client) GetClientOk() (string, bool) {
+ if o == nil || o.Client == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Client, true
+}
+
+// HasClient returns a boolean if a field has been set.
+func (o *Client) HasClient() bool {
+ if o != nil && o.Client != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClient gets a reference to the given string and assigns it to the Client field.
+func (o *Client) SetClient(v string) {
+ o.Client = &v
+}
+
+
+func (o Client) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Client != nil {
+ toSerialize["client"] = o.Client
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/client/petstore/go-experimental/go-petstore/model_dog.go
index 3f791ca194..dd9c4e1d67 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_dog.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_dog.go
@@ -8,9 +8,135 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
type Dog struct {
- ClassName string `json:"className"`
- Color string `json:"color,omitempty"`
- Breed string `json:"breed,omitempty"`
+ ClassName *string `json:"className,omitempty"`
+
+ Color *string `json:"color,omitempty"`
+
+ Breed *string `json:"breed,omitempty"`
+
}
+
+// GetClassName returns the ClassName field if non-nil, zero value otherwise.
+func (o *Dog) GetClassName() string {
+ if o == nil || o.ClassName == nil {
+ var ret string
+ return ret
+ }
+ return *o.ClassName
+}
+
+// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Dog) GetClassNameOk() (string, bool) {
+ if o == nil || o.ClassName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.ClassName, true
+}
+
+// HasClassName returns a boolean if a field has been set.
+func (o *Dog) HasClassName() bool {
+ if o != nil && o.ClassName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClassName gets a reference to the given string and assigns it to the ClassName field.
+func (o *Dog) SetClassName(v string) {
+ o.ClassName = &v
+}
+
+// GetColor returns the Color field if non-nil, zero value otherwise.
+func (o *Dog) GetColor() string {
+ if o == nil || o.Color == nil {
+ var ret string
+ return ret
+ }
+ return *o.Color
+}
+
+// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Dog) GetColorOk() (string, bool) {
+ if o == nil || o.Color == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Color, true
+}
+
+// HasColor returns a boolean if a field has been set.
+func (o *Dog) HasColor() bool {
+ if o != nil && o.Color != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetColor gets a reference to the given string and assigns it to the Color field.
+func (o *Dog) SetColor(v string) {
+ o.Color = &v
+}
+
+// GetBreed returns the Breed field if non-nil, zero value otherwise.
+func (o *Dog) GetBreed() string {
+ if o == nil || o.Breed == nil {
+ var ret string
+ return ret
+ }
+ return *o.Breed
+}
+
+// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Dog) GetBreedOk() (string, bool) {
+ if o == nil || o.Breed == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Breed, true
+}
+
+// HasBreed returns a boolean if a field has been set.
+func (o *Dog) HasBreed() bool {
+ if o != nil && o.Breed != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBreed gets a reference to the given string and assigns it to the Breed field.
+func (o *Dog) SetBreed(v string) {
+ o.Breed = &v
+}
+
+
+func (o Dog) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ClassName == nil {
+ return nil, errors.New("ClassName is required and not nullable, but was not set on Dog")
+ }
+ if o.ClassName != nil {
+ toSerialize["className"] = o.ClassName
+ }
+ if o.Color != nil {
+ toSerialize["color"] = o.Color
+ }
+ if o.Breed != nil {
+ toSerialize["breed"] = o.Breed
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go
index a0db0aba4b..9dd6d964f0 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type DogAllOf struct {
- Breed string `json:"breed,omitempty"`
+ Breed *string `json:"breed,omitempty"`
+
}
+
+// GetBreed returns the Breed field if non-nil, zero value otherwise.
+func (o *DogAllOf) GetBreed() string {
+ if o == nil || o.Breed == nil {
+ var ret string
+ return ret
+ }
+ return *o.Breed
+}
+
+// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *DogAllOf) GetBreedOk() (string, bool) {
+ if o == nil || o.Breed == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Breed, true
+}
+
+// HasBreed returns a boolean if a field has been set.
+func (o *DogAllOf) HasBreed() bool {
+ if o != nil && o.Breed != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBreed gets a reference to the given string and assigns it to the Breed field.
+func (o *DogAllOf) SetBreed(v string) {
+ o.Breed = &v
+}
+
+
+func (o DogAllOf) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Breed != nil {
+ toSerialize["breed"] = o.Breed
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go
index ab4dce92eb..b52471416a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go
@@ -8,8 +8,93 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type EnumArrays struct {
- JustSymbol string `json:"just_symbol,omitempty"`
- ArrayEnum []string `json:"array_enum,omitempty"`
+ JustSymbol *string `json:"just_symbol,omitempty"`
+
+ ArrayEnum *[]string `json:"array_enum,omitempty"`
+
}
+
+// GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise.
+func (o *EnumArrays) GetJustSymbol() string {
+ if o == nil || o.JustSymbol == nil {
+ var ret string
+ return ret
+ }
+ return *o.JustSymbol
+}
+
+// GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *EnumArrays) GetJustSymbolOk() (string, bool) {
+ if o == nil || o.JustSymbol == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.JustSymbol, true
+}
+
+// HasJustSymbol returns a boolean if a field has been set.
+func (o *EnumArrays) HasJustSymbol() bool {
+ if o != nil && o.JustSymbol != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field.
+func (o *EnumArrays) SetJustSymbol(v string) {
+ o.JustSymbol = &v
+}
+
+// GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise.
+func (o *EnumArrays) GetArrayEnum() []string {
+ if o == nil || o.ArrayEnum == nil {
+ var ret []string
+ return ret
+ }
+ return *o.ArrayEnum
+}
+
+// GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) {
+ if o == nil || o.ArrayEnum == nil {
+ var ret []string
+ return ret, false
+ }
+ return *o.ArrayEnum, true
+}
+
+// HasArrayEnum returns a boolean if a field has been set.
+func (o *EnumArrays) HasArrayEnum() bool {
+ if o != nil && o.ArrayEnum != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field.
+func (o *EnumArrays) SetArrayEnum(v []string) {
+ o.ArrayEnum = &v
+}
+
+
+func (o EnumArrays) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.JustSymbol != nil {
+ toSerialize["just_symbol"] = o.JustSymbol
+ }
+ if o.ArrayEnum != nil {
+ toSerialize["array_enum"] = o.ArrayEnum
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go
index 534ce43288..b52d109542 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go
@@ -15,4 +15,5 @@ const (
ABC EnumClass = "_abc"
EFG EnumClass = "-efg"
XYZ EnumClass = "(xyz)"
-)
\ No newline at end of file
+)
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go
index f85f31501a..1e9f8a449e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go
@@ -8,11 +8,211 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
type EnumTest struct {
- EnumString string `json:"enum_string,omitempty"`
- EnumStringRequired string `json:"enum_string_required"`
- EnumInteger int32 `json:"enum_integer,omitempty"`
- EnumNumber float64 `json:"enum_number,omitempty"`
- OuterEnum OuterEnum `json:"outerEnum,omitempty"`
+ EnumString *string `json:"enum_string,omitempty"`
+
+ EnumStringRequired *string `json:"enum_string_required,omitempty"`
+
+ EnumInteger *int32 `json:"enum_integer,omitempty"`
+
+ EnumNumber *float64 `json:"enum_number,omitempty"`
+
+ OuterEnum *OuterEnum `json:"outerEnum,omitempty"`
+
}
+
+// GetEnumString returns the EnumString field if non-nil, zero value otherwise.
+func (o *EnumTest) GetEnumString() string {
+ if o == nil || o.EnumString == nil {
+ var ret string
+ return ret
+ }
+ return *o.EnumString
+}
+
+// GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *EnumTest) GetEnumStringOk() (string, bool) {
+ if o == nil || o.EnumString == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.EnumString, true
+}
+
+// HasEnumString returns a boolean if a field has been set.
+func (o *EnumTest) HasEnumString() bool {
+ if o != nil && o.EnumString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEnumString gets a reference to the given string and assigns it to the EnumString field.
+func (o *EnumTest) SetEnumString(v string) {
+ o.EnumString = &v
+}
+
+// GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise.
+func (o *EnumTest) GetEnumStringRequired() string {
+ if o == nil || o.EnumStringRequired == nil {
+ var ret string
+ return ret
+ }
+ return *o.EnumStringRequired
+}
+
+// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *EnumTest) GetEnumStringRequiredOk() (string, bool) {
+ if o == nil || o.EnumStringRequired == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.EnumStringRequired, true
+}
+
+// HasEnumStringRequired returns a boolean if a field has been set.
+func (o *EnumTest) HasEnumStringRequired() bool {
+ if o != nil && o.EnumStringRequired != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field.
+func (o *EnumTest) SetEnumStringRequired(v string) {
+ o.EnumStringRequired = &v
+}
+
+// GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise.
+func (o *EnumTest) GetEnumInteger() int32 {
+ if o == nil || o.EnumInteger == nil {
+ var ret int32
+ return ret
+ }
+ return *o.EnumInteger
+}
+
+// GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *EnumTest) GetEnumIntegerOk() (int32, bool) {
+ if o == nil || o.EnumInteger == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.EnumInteger, true
+}
+
+// HasEnumInteger returns a boolean if a field has been set.
+func (o *EnumTest) HasEnumInteger() bool {
+ if o != nil && o.EnumInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field.
+func (o *EnumTest) SetEnumInteger(v int32) {
+ o.EnumInteger = &v
+}
+
+// GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise.
+func (o *EnumTest) GetEnumNumber() float64 {
+ if o == nil || o.EnumNumber == nil {
+ var ret float64
+ return ret
+ }
+ return *o.EnumNumber
+}
+
+// GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *EnumTest) GetEnumNumberOk() (float64, bool) {
+ if o == nil || o.EnumNumber == nil {
+ var ret float64
+ return ret, false
+ }
+ return *o.EnumNumber, true
+}
+
+// HasEnumNumber returns a boolean if a field has been set.
+func (o *EnumTest) HasEnumNumber() bool {
+ if o != nil && o.EnumNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field.
+func (o *EnumTest) SetEnumNumber(v float64) {
+ o.EnumNumber = &v
+}
+
+// GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise.
+func (o *EnumTest) GetOuterEnum() OuterEnum {
+ if o == nil || o.OuterEnum == nil {
+ var ret OuterEnum
+ return ret
+ }
+ return *o.OuterEnum
+}
+
+// GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) {
+ if o == nil || o.OuterEnum == nil {
+ var ret OuterEnum
+ return ret, false
+ }
+ return *o.OuterEnum, true
+}
+
+// HasOuterEnum returns a boolean if a field has been set.
+func (o *EnumTest) HasOuterEnum() bool {
+ if o != nil && o.OuterEnum != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field.
+func (o *EnumTest) SetOuterEnum(v OuterEnum) {
+ o.OuterEnum = &v
+}
+
+
+func (o EnumTest) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.EnumString != nil {
+ toSerialize["enum_string"] = o.EnumString
+ }
+ if o.EnumStringRequired == nil {
+ return nil, errors.New("EnumStringRequired is required and not nullable, but was not set on EnumTest")
+ }
+ if o.EnumStringRequired != nil {
+ toSerialize["enum_string_required"] = o.EnumStringRequired
+ }
+ if o.EnumInteger != nil {
+ toSerialize["enum_integer"] = o.EnumInteger
+ }
+ if o.EnumNumber != nil {
+ toSerialize["enum_number"] = o.EnumNumber
+ }
+ if o.OuterEnum != nil {
+ toSerialize["outerEnum"] = o.OuterEnum
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file.go b/samples/client/petstore/go-experimental/go-petstore/model_file.go
index 2782ccc9a2..4968739ef4 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_file.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_file.go
@@ -8,9 +8,57 @@
*/
package petstore
+import (
+ "encoding/json"
+)
// Must be named `File` for test.
type File struct {
// Test capitalization
- SourceURI string `json:"sourceURI,omitempty"`
+ SourceURI *string `json:"sourceURI,omitempty"`
+
}
+
+// GetSourceURI returns the SourceURI field if non-nil, zero value otherwise.
+func (o *File) GetSourceURI() string {
+ if o == nil || o.SourceURI == nil {
+ var ret string
+ return ret
+ }
+ return *o.SourceURI
+}
+
+// GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *File) GetSourceURIOk() (string, bool) {
+ if o == nil || o.SourceURI == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.SourceURI, true
+}
+
+// HasSourceURI returns a boolean if a field has been set.
+func (o *File) HasSourceURI() bool {
+ if o != nil && o.SourceURI != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSourceURI gets a reference to the given string and assigns it to the SourceURI field.
+func (o *File) SetSourceURI(v string) {
+ o.SourceURI = &v
+}
+
+
+func (o File) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.SourceURI != nil {
+ toSerialize["sourceURI"] = o.SourceURI
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go
index 487f766c64..16cd67f29d 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go
@@ -8,8 +8,93 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type FileSchemaTestClass struct {
- File File `json:"file,omitempty"`
- Files []File `json:"files,omitempty"`
+ File *File `json:"file,omitempty"`
+
+ Files *[]File `json:"files,omitempty"`
+
}
+
+// GetFile returns the File field if non-nil, zero value otherwise.
+func (o *FileSchemaTestClass) GetFile() File {
+ if o == nil || o.File == nil {
+ var ret File
+ return ret
+ }
+ return *o.File
+}
+
+// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FileSchemaTestClass) GetFileOk() (File, bool) {
+ if o == nil || o.File == nil {
+ var ret File
+ return ret, false
+ }
+ return *o.File, true
+}
+
+// HasFile returns a boolean if a field has been set.
+func (o *FileSchemaTestClass) HasFile() bool {
+ if o != nil && o.File != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFile gets a reference to the given File and assigns it to the File field.
+func (o *FileSchemaTestClass) SetFile(v File) {
+ o.File = &v
+}
+
+// GetFiles returns the Files field if non-nil, zero value otherwise.
+func (o *FileSchemaTestClass) GetFiles() []File {
+ if o == nil || o.Files == nil {
+ var ret []File
+ return ret
+ }
+ return *o.Files
+}
+
+// GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) {
+ if o == nil || o.Files == nil {
+ var ret []File
+ return ret, false
+ }
+ return *o.Files, true
+}
+
+// HasFiles returns a boolean if a field has been set.
+func (o *FileSchemaTestClass) HasFiles() bool {
+ if o != nil && o.Files != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFiles gets a reference to the given []File and assigns it to the Files field.
+func (o *FileSchemaTestClass) SetFiles(v []File) {
+ o.Files = &v
+}
+
+
+func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.File != nil {
+ toSerialize["file"] = o.File
+ }
+ if o.Files != nil {
+ toSerialize["files"] = o.Files
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go
index d723bdfee3..5532e92477 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go
@@ -11,20 +11,523 @@ package petstore
import (
"os"
"time"
+ "encoding/json"
+ "errors"
)
type FormatTest struct {
- Integer int32 `json:"integer,omitempty"`
- Int32 int32 `json:"int32,omitempty"`
- Int64 int64 `json:"int64,omitempty"`
- Number float32 `json:"number"`
- Float float32 `json:"float,omitempty"`
- Double float64 `json:"double,omitempty"`
- String string `json:"string,omitempty"`
- Byte string `json:"byte"`
- Binary *os.File `json:"binary,omitempty"`
- Date string `json:"date"`
- DateTime time.Time `json:"dateTime,omitempty"`
- Uuid string `json:"uuid,omitempty"`
- Password string `json:"password"`
+ Integer *int32 `json:"integer,omitempty"`
+
+ Int32 *int32 `json:"int32,omitempty"`
+
+ Int64 *int64 `json:"int64,omitempty"`
+
+ Number *float32 `json:"number,omitempty"`
+
+ Float *float32 `json:"float,omitempty"`
+
+ Double *float64 `json:"double,omitempty"`
+
+ String *string `json:"string,omitempty"`
+
+ Byte *string `json:"byte,omitempty"`
+
+ Binary **os.File `json:"binary,omitempty"`
+
+ Date *string `json:"date,omitempty"`
+
+ DateTime *time.Time `json:"dateTime,omitempty"`
+
+ Uuid *string `json:"uuid,omitempty"`
+
+ Password *string `json:"password,omitempty"`
+
}
+
+// GetInteger returns the Integer field if non-nil, zero value otherwise.
+func (o *FormatTest) GetInteger() int32 {
+ if o == nil || o.Integer == nil {
+ var ret int32
+ return ret
+ }
+ return *o.Integer
+}
+
+// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetIntegerOk() (int32, bool) {
+ if o == nil || o.Integer == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.Integer, true
+}
+
+// HasInteger returns a boolean if a field has been set.
+func (o *FormatTest) HasInteger() bool {
+ if o != nil && o.Integer != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetInteger gets a reference to the given int32 and assigns it to the Integer field.
+func (o *FormatTest) SetInteger(v int32) {
+ o.Integer = &v
+}
+
+// GetInt32 returns the Int32 field if non-nil, zero value otherwise.
+func (o *FormatTest) GetInt32() int32 {
+ if o == nil || o.Int32 == nil {
+ var ret int32
+ return ret
+ }
+ return *o.Int32
+}
+
+// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetInt32Ok() (int32, bool) {
+ if o == nil || o.Int32 == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.Int32, true
+}
+
+// HasInt32 returns a boolean if a field has been set.
+func (o *FormatTest) HasInt32() bool {
+ if o != nil && o.Int32 != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetInt32 gets a reference to the given int32 and assigns it to the Int32 field.
+func (o *FormatTest) SetInt32(v int32) {
+ o.Int32 = &v
+}
+
+// GetInt64 returns the Int64 field if non-nil, zero value otherwise.
+func (o *FormatTest) GetInt64() int64 {
+ if o == nil || o.Int64 == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Int64
+}
+
+// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetInt64Ok() (int64, bool) {
+ if o == nil || o.Int64 == nil {
+ var ret int64
+ return ret, false
+ }
+ return *o.Int64, true
+}
+
+// HasInt64 returns a boolean if a field has been set.
+func (o *FormatTest) HasInt64() bool {
+ if o != nil && o.Int64 != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetInt64 gets a reference to the given int64 and assigns it to the Int64 field.
+func (o *FormatTest) SetInt64(v int64) {
+ o.Int64 = &v
+}
+
+// GetNumber returns the Number field if non-nil, zero value otherwise.
+func (o *FormatTest) GetNumber() float32 {
+ if o == nil || o.Number == nil {
+ var ret float32
+ return ret
+ }
+ return *o.Number
+}
+
+// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetNumberOk() (float32, bool) {
+ if o == nil || o.Number == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.Number, true
+}
+
+// HasNumber returns a boolean if a field has been set.
+func (o *FormatTest) HasNumber() bool {
+ if o != nil && o.Number != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNumber gets a reference to the given float32 and assigns it to the Number field.
+func (o *FormatTest) SetNumber(v float32) {
+ o.Number = &v
+}
+
+// GetFloat returns the Float field if non-nil, zero value otherwise.
+func (o *FormatTest) GetFloat() float32 {
+ if o == nil || o.Float == nil {
+ var ret float32
+ return ret
+ }
+ return *o.Float
+}
+
+// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetFloatOk() (float32, bool) {
+ if o == nil || o.Float == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.Float, true
+}
+
+// HasFloat returns a boolean if a field has been set.
+func (o *FormatTest) HasFloat() bool {
+ if o != nil && o.Float != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFloat gets a reference to the given float32 and assigns it to the Float field.
+func (o *FormatTest) SetFloat(v float32) {
+ o.Float = &v
+}
+
+// GetDouble returns the Double field if non-nil, zero value otherwise.
+func (o *FormatTest) GetDouble() float64 {
+ if o == nil || o.Double == nil {
+ var ret float64
+ return ret
+ }
+ return *o.Double
+}
+
+// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetDoubleOk() (float64, bool) {
+ if o == nil || o.Double == nil {
+ var ret float64
+ return ret, false
+ }
+ return *o.Double, true
+}
+
+// HasDouble returns a boolean if a field has been set.
+func (o *FormatTest) HasDouble() bool {
+ if o != nil && o.Double != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDouble gets a reference to the given float64 and assigns it to the Double field.
+func (o *FormatTest) SetDouble(v float64) {
+ o.Double = &v
+}
+
+// GetString returns the String field if non-nil, zero value otherwise.
+func (o *FormatTest) GetString() string {
+ if o == nil || o.String == nil {
+ var ret string
+ return ret
+ }
+ return *o.String
+}
+
+// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetStringOk() (string, bool) {
+ if o == nil || o.String == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.String, true
+}
+
+// HasString returns a boolean if a field has been set.
+func (o *FormatTest) HasString() bool {
+ if o != nil && o.String != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetString gets a reference to the given string and assigns it to the String field.
+func (o *FormatTest) SetString(v string) {
+ o.String = &v
+}
+
+// GetByte returns the Byte field if non-nil, zero value otherwise.
+func (o *FormatTest) GetByte() string {
+ if o == nil || o.Byte == nil {
+ var ret string
+ return ret
+ }
+ return *o.Byte
+}
+
+// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetByteOk() (string, bool) {
+ if o == nil || o.Byte == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Byte, true
+}
+
+// HasByte returns a boolean if a field has been set.
+func (o *FormatTest) HasByte() bool {
+ if o != nil && o.Byte != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetByte gets a reference to the given string and assigns it to the Byte field.
+func (o *FormatTest) SetByte(v string) {
+ o.Byte = &v
+}
+
+// GetBinary returns the Binary field if non-nil, zero value otherwise.
+func (o *FormatTest) GetBinary() *os.File {
+ if o == nil || o.Binary == nil {
+ var ret *os.File
+ return ret
+ }
+ return *o.Binary
+}
+
+// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetBinaryOk() (*os.File, bool) {
+ if o == nil || o.Binary == nil {
+ var ret *os.File
+ return ret, false
+ }
+ return *o.Binary, true
+}
+
+// HasBinary returns a boolean if a field has been set.
+func (o *FormatTest) HasBinary() bool {
+ if o != nil && o.Binary != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBinary gets a reference to the given *os.File and assigns it to the Binary field.
+func (o *FormatTest) SetBinary(v *os.File) {
+ o.Binary = &v
+}
+
+// GetDate returns the Date field if non-nil, zero value otherwise.
+func (o *FormatTest) GetDate() string {
+ if o == nil || o.Date == nil {
+ var ret string
+ return ret
+ }
+ return *o.Date
+}
+
+// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetDateOk() (string, bool) {
+ if o == nil || o.Date == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Date, true
+}
+
+// HasDate returns a boolean if a field has been set.
+func (o *FormatTest) HasDate() bool {
+ if o != nil && o.Date != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDate gets a reference to the given string and assigns it to the Date field.
+func (o *FormatTest) SetDate(v string) {
+ o.Date = &v
+}
+
+// GetDateTime returns the DateTime field if non-nil, zero value otherwise.
+func (o *FormatTest) GetDateTime() time.Time {
+ if o == nil || o.DateTime == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.DateTime
+}
+
+// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetDateTimeOk() (time.Time, bool) {
+ if o == nil || o.DateTime == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.DateTime, true
+}
+
+// HasDateTime returns a boolean if a field has been set.
+func (o *FormatTest) HasDateTime() bool {
+ if o != nil && o.DateTime != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field.
+func (o *FormatTest) SetDateTime(v time.Time) {
+ o.DateTime = &v
+}
+
+// GetUuid returns the Uuid field if non-nil, zero value otherwise.
+func (o *FormatTest) GetUuid() string {
+ if o == nil || o.Uuid == nil {
+ var ret string
+ return ret
+ }
+ return *o.Uuid
+}
+
+// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetUuidOk() (string, bool) {
+ if o == nil || o.Uuid == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Uuid, true
+}
+
+// HasUuid returns a boolean if a field has been set.
+func (o *FormatTest) HasUuid() bool {
+ if o != nil && o.Uuid != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUuid gets a reference to the given string and assigns it to the Uuid field.
+func (o *FormatTest) SetUuid(v string) {
+ o.Uuid = &v
+}
+
+// GetPassword returns the Password field if non-nil, zero value otherwise.
+func (o *FormatTest) GetPassword() string {
+ if o == nil || o.Password == nil {
+ var ret string
+ return ret
+ }
+ return *o.Password
+}
+
+// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *FormatTest) GetPasswordOk() (string, bool) {
+ if o == nil || o.Password == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Password, true
+}
+
+// HasPassword returns a boolean if a field has been set.
+func (o *FormatTest) HasPassword() bool {
+ if o != nil && o.Password != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPassword gets a reference to the given string and assigns it to the Password field.
+func (o *FormatTest) SetPassword(v string) {
+ o.Password = &v
+}
+
+
+func (o FormatTest) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Integer != nil {
+ toSerialize["integer"] = o.Integer
+ }
+ if o.Int32 != nil {
+ toSerialize["int32"] = o.Int32
+ }
+ if o.Int64 != nil {
+ toSerialize["int64"] = o.Int64
+ }
+ if o.Number == nil {
+ return nil, errors.New("Number is required and not nullable, but was not set on FormatTest")
+ }
+ if o.Number != nil {
+ toSerialize["number"] = o.Number
+ }
+ if o.Float != nil {
+ toSerialize["float"] = o.Float
+ }
+ if o.Double != nil {
+ toSerialize["double"] = o.Double
+ }
+ if o.String != nil {
+ toSerialize["string"] = o.String
+ }
+ if o.Byte == nil {
+ return nil, errors.New("Byte is required and not nullable, but was not set on FormatTest")
+ }
+ if o.Byte != nil {
+ toSerialize["byte"] = o.Byte
+ }
+ if o.Binary != nil {
+ toSerialize["binary"] = o.Binary
+ }
+ if o.Date == nil {
+ return nil, errors.New("Date is required and not nullable, but was not set on FormatTest")
+ }
+ if o.Date != nil {
+ toSerialize["date"] = o.Date
+ }
+ if o.DateTime != nil {
+ toSerialize["dateTime"] = o.DateTime
+ }
+ if o.Uuid != nil {
+ toSerialize["uuid"] = o.Uuid
+ }
+ if o.Password == nil {
+ return nil, errors.New("Password is required and not nullable, but was not set on FormatTest")
+ }
+ if o.Password != nil {
+ toSerialize["password"] = o.Password
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go
index 1cf0e4f530..1b03286159 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go
@@ -8,8 +8,93 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type HasOnlyReadOnly struct {
- Bar string `json:"bar,omitempty"`
- Foo string `json:"foo,omitempty"`
+ Bar *string `json:"bar,omitempty"`
+
+ Foo *string `json:"foo,omitempty"`
+
}
+
+// GetBar returns the Bar field if non-nil, zero value otherwise.
+func (o *HasOnlyReadOnly) GetBar() string {
+ if o == nil || o.Bar == nil {
+ var ret string
+ return ret
+ }
+ return *o.Bar
+}
+
+// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *HasOnlyReadOnly) GetBarOk() (string, bool) {
+ if o == nil || o.Bar == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Bar, true
+}
+
+// HasBar returns a boolean if a field has been set.
+func (o *HasOnlyReadOnly) HasBar() bool {
+ if o != nil && o.Bar != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBar gets a reference to the given string and assigns it to the Bar field.
+func (o *HasOnlyReadOnly) SetBar(v string) {
+ o.Bar = &v
+}
+
+// GetFoo returns the Foo field if non-nil, zero value otherwise.
+func (o *HasOnlyReadOnly) GetFoo() string {
+ if o == nil || o.Foo == nil {
+ var ret string
+ return ret
+ }
+ return *o.Foo
+}
+
+// GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *HasOnlyReadOnly) GetFooOk() (string, bool) {
+ if o == nil || o.Foo == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Foo, true
+}
+
+// HasFoo returns a boolean if a field has been set.
+func (o *HasOnlyReadOnly) HasFoo() bool {
+ if o != nil && o.Foo != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFoo gets a reference to the given string and assigns it to the Foo field.
+func (o *HasOnlyReadOnly) SetFoo(v string) {
+ o.Foo = &v
+}
+
+
+func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Bar != nil {
+ toSerialize["bar"] = o.Bar
+ }
+ if o.Foo != nil {
+ toSerialize["foo"] = o.Foo
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_list.go b/samples/client/petstore/go-experimental/go-petstore/model_list.go
index 12f3bd3f66..5c9d4df5c9 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_list.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_list.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type List struct {
- Var123List string `json:"123-list,omitempty"`
+ Var123List *string `json:"123-list,omitempty"`
+
}
+
+// GetVar123List returns the Var123List field if non-nil, zero value otherwise.
+func (o *List) GetVar123List() string {
+ if o == nil || o.Var123List == nil {
+ var ret string
+ return ret
+ }
+ return *o.Var123List
+}
+
+// GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *List) GetVar123ListOk() (string, bool) {
+ if o == nil || o.Var123List == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Var123List, true
+}
+
+// HasVar123List returns a boolean if a field has been set.
+func (o *List) HasVar123List() bool {
+ if o != nil && o.Var123List != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetVar123List gets a reference to the given string and assigns it to the Var123List field.
+func (o *List) SetVar123List(v string) {
+ o.Var123List = &v
+}
+
+
+func (o List) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Var123List != nil {
+ toSerialize["123-list"] = o.Var123List
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go
index 830e760fe3..3ae7b22b88 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go
@@ -8,10 +8,169 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type MapTest struct {
- MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty"`
- MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty"`
- DirectMap map[string]bool `json:"direct_map,omitempty"`
- IndirectMap map[string]bool `json:"indirect_map,omitempty"`
+ MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty"`
+
+ MapOfEnumString *map[string]string `json:"map_of_enum_string,omitempty"`
+
+ DirectMap *map[string]bool `json:"direct_map,omitempty"`
+
+ IndirectMap *map[string]bool `json:"indirect_map,omitempty"`
+
}
+
+// GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise.
+func (o *MapTest) GetMapMapOfString() map[string]map[string]string {
+ if o == nil || o.MapMapOfString == nil {
+ var ret map[string]map[string]string
+ return ret
+ }
+ return *o.MapMapOfString
+}
+
+// GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool) {
+ if o == nil || o.MapMapOfString == nil {
+ var ret map[string]map[string]string
+ return ret, false
+ }
+ return *o.MapMapOfString, true
+}
+
+// HasMapMapOfString returns a boolean if a field has been set.
+func (o *MapTest) HasMapMapOfString() bool {
+ if o != nil && o.MapMapOfString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field.
+func (o *MapTest) SetMapMapOfString(v map[string]map[string]string) {
+ o.MapMapOfString = &v
+}
+
+// GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise.
+func (o *MapTest) GetMapOfEnumString() map[string]string {
+ if o == nil || o.MapOfEnumString == nil {
+ var ret map[string]string
+ return ret
+ }
+ return *o.MapOfEnumString
+}
+
+// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool) {
+ if o == nil || o.MapOfEnumString == nil {
+ var ret map[string]string
+ return ret, false
+ }
+ return *o.MapOfEnumString, true
+}
+
+// HasMapOfEnumString returns a boolean if a field has been set.
+func (o *MapTest) HasMapOfEnumString() bool {
+ if o != nil && o.MapOfEnumString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field.
+func (o *MapTest) SetMapOfEnumString(v map[string]string) {
+ o.MapOfEnumString = &v
+}
+
+// GetDirectMap returns the DirectMap field if non-nil, zero value otherwise.
+func (o *MapTest) GetDirectMap() map[string]bool {
+ if o == nil || o.DirectMap == nil {
+ var ret map[string]bool
+ return ret
+ }
+ return *o.DirectMap
+}
+
+// GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MapTest) GetDirectMapOk() (map[string]bool, bool) {
+ if o == nil || o.DirectMap == nil {
+ var ret map[string]bool
+ return ret, false
+ }
+ return *o.DirectMap, true
+}
+
+// HasDirectMap returns a boolean if a field has been set.
+func (o *MapTest) HasDirectMap() bool {
+ if o != nil && o.DirectMap != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field.
+func (o *MapTest) SetDirectMap(v map[string]bool) {
+ o.DirectMap = &v
+}
+
+// GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise.
+func (o *MapTest) GetIndirectMap() map[string]bool {
+ if o == nil || o.IndirectMap == nil {
+ var ret map[string]bool
+ return ret
+ }
+ return *o.IndirectMap
+}
+
+// GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool) {
+ if o == nil || o.IndirectMap == nil {
+ var ret map[string]bool
+ return ret, false
+ }
+ return *o.IndirectMap, true
+}
+
+// HasIndirectMap returns a boolean if a field has been set.
+func (o *MapTest) HasIndirectMap() bool {
+ if o != nil && o.IndirectMap != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field.
+func (o *MapTest) SetIndirectMap(v map[string]bool) {
+ o.IndirectMap = &v
+}
+
+
+func (o MapTest) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.MapMapOfString != nil {
+ toSerialize["map_map_of_string"] = o.MapMapOfString
+ }
+ if o.MapOfEnumString != nil {
+ toSerialize["map_of_enum_string"] = o.MapOfEnumString
+ }
+ if o.DirectMap != nil {
+ toSerialize["direct_map"] = o.DirectMap
+ }
+ if o.IndirectMap != nil {
+ toSerialize["indirect_map"] = o.IndirectMap
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go
index 0ad92e96f8..5dd3d1d020 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go
@@ -10,10 +10,130 @@
package petstore
import (
"time"
+ "encoding/json"
)
type MixedPropertiesAndAdditionalPropertiesClass struct {
- Uuid string `json:"uuid,omitempty"`
- DateTime time.Time `json:"dateTime,omitempty"`
- Map map[string]Animal `json:"map,omitempty"`
+ Uuid *string `json:"uuid,omitempty"`
+
+ DateTime *time.Time `json:"dateTime,omitempty"`
+
+ Map *map[string]Animal `json:"map,omitempty"`
+
}
+
+// GetUuid returns the Uuid field if non-nil, zero value otherwise.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string {
+ if o == nil || o.Uuid == nil {
+ var ret string
+ return ret
+ }
+ return *o.Uuid
+}
+
+// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) {
+ if o == nil || o.Uuid == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Uuid, true
+}
+
+// HasUuid returns a boolean if a field has been set.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool {
+ if o != nil && o.Uuid != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUuid gets a reference to the given string and assigns it to the Uuid field.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) {
+ o.Uuid = &v
+}
+
+// GetDateTime returns the DateTime field if non-nil, zero value otherwise.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time {
+ if o == nil || o.DateTime == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.DateTime
+}
+
+// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool) {
+ if o == nil || o.DateTime == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.DateTime, true
+}
+
+// HasDateTime returns a boolean if a field has been set.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool {
+ if o != nil && o.DateTime != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time) {
+ o.DateTime = &v
+}
+
+// GetMap returns the Map field if non-nil, zero value otherwise.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal {
+ if o == nil || o.Map == nil {
+ var ret map[string]Animal
+ return ret
+ }
+ return *o.Map
+}
+
+// GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool) {
+ if o == nil || o.Map == nil {
+ var ret map[string]Animal
+ return ret, false
+ }
+ return *o.Map, true
+}
+
+// HasMap returns a boolean if a field has been set.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool {
+ if o != nil && o.Map != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMap gets a reference to the given map[string]Animal and assigns it to the Map field.
+func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal) {
+ o.Map = &v
+}
+
+
+func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Uuid != nil {
+ toSerialize["uuid"] = o.Uuid
+ }
+ if o.DateTime != nil {
+ toSerialize["dateTime"] = o.DateTime
+ }
+ if o.Map != nil {
+ toSerialize["map"] = o.Map
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_name.go
index dde1b92eb6..1a0addae44 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_name.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_name.go
@@ -8,11 +8,174 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
// Model for testing model name same as property name
type Name struct {
- Name int32 `json:"name"`
- SnakeCase int32 `json:"snake_case,omitempty"`
- Property string `json:"property,omitempty"`
- Var123Number int32 `json:"123Number,omitempty"`
+ Name *int32 `json:"name,omitempty"`
+
+ SnakeCase *int32 `json:"snake_case,omitempty"`
+
+ Property *string `json:"property,omitempty"`
+
+ Var123Number *int32 `json:"123Number,omitempty"`
+
}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *Name) GetName() int32 {
+ if o == nil || o.Name == nil {
+ var ret int32
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Name) GetNameOk() (int32, bool) {
+ if o == nil || o.Name == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *Name) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given int32 and assigns it to the Name field.
+func (o *Name) SetName(v int32) {
+ o.Name = &v
+}
+
+// GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise.
+func (o *Name) GetSnakeCase() int32 {
+ if o == nil || o.SnakeCase == nil {
+ var ret int32
+ return ret
+ }
+ return *o.SnakeCase
+}
+
+// GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Name) GetSnakeCaseOk() (int32, bool) {
+ if o == nil || o.SnakeCase == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.SnakeCase, true
+}
+
+// HasSnakeCase returns a boolean if a field has been set.
+func (o *Name) HasSnakeCase() bool {
+ if o != nil && o.SnakeCase != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field.
+func (o *Name) SetSnakeCase(v int32) {
+ o.SnakeCase = &v
+}
+
+// GetProperty returns the Property field if non-nil, zero value otherwise.
+func (o *Name) GetProperty() string {
+ if o == nil || o.Property == nil {
+ var ret string
+ return ret
+ }
+ return *o.Property
+}
+
+// GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Name) GetPropertyOk() (string, bool) {
+ if o == nil || o.Property == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Property, true
+}
+
+// HasProperty returns a boolean if a field has been set.
+func (o *Name) HasProperty() bool {
+ if o != nil && o.Property != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProperty gets a reference to the given string and assigns it to the Property field.
+func (o *Name) SetProperty(v string) {
+ o.Property = &v
+}
+
+// GetVar123Number returns the Var123Number field if non-nil, zero value otherwise.
+func (o *Name) GetVar123Number() int32 {
+ if o == nil || o.Var123Number == nil {
+ var ret int32
+ return ret
+ }
+ return *o.Var123Number
+}
+
+// GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Name) GetVar123NumberOk() (int32, bool) {
+ if o == nil || o.Var123Number == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.Var123Number, true
+}
+
+// HasVar123Number returns a boolean if a field has been set.
+func (o *Name) HasVar123Number() bool {
+ if o != nil && o.Var123Number != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field.
+func (o *Name) SetVar123Number(v int32) {
+ o.Var123Number = &v
+}
+
+
+func (o Name) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name == nil {
+ return nil, errors.New("Name is required and not nullable, but was not set on Name")
+ }
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ if o.SnakeCase != nil {
+ toSerialize["snake_case"] = o.SnakeCase
+ }
+ if o.Property != nil {
+ toSerialize["property"] = o.Property
+ }
+ if o.Var123Number != nil {
+ toSerialize["123Number"] = o.Var123Number
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go
index 7a2fd5fd8f..47d69c607e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type NumberOnly struct {
- JustNumber float32 `json:"JustNumber,omitempty"`
+ JustNumber *float32 `json:"JustNumber,omitempty"`
+
}
+
+// GetJustNumber returns the JustNumber field if non-nil, zero value otherwise.
+func (o *NumberOnly) GetJustNumber() float32 {
+ if o == nil || o.JustNumber == nil {
+ var ret float32
+ return ret
+ }
+ return *o.JustNumber
+}
+
+// GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *NumberOnly) GetJustNumberOk() (float32, bool) {
+ if o == nil || o.JustNumber == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.JustNumber, true
+}
+
+// HasJustNumber returns a boolean if a field has been set.
+func (o *NumberOnly) HasJustNumber() bool {
+ if o != nil && o.JustNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field.
+func (o *NumberOnly) SetJustNumber(v float32) {
+ o.JustNumber = &v
+}
+
+
+func (o NumberOnly) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.JustNumber != nil {
+ toSerialize["JustNumber"] = o.JustNumber
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_order.go b/samples/client/petstore/go-experimental/go-petstore/model_order.go
index c81d67ae0f..75d9299386 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_order.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_order.go
@@ -10,14 +10,245 @@
package petstore
import (
"time"
+ "encoding/json"
)
type Order struct {
- Id int64 `json:"id,omitempty"`
- PetId int64 `json:"petId,omitempty"`
- Quantity int32 `json:"quantity,omitempty"`
- ShipDate time.Time `json:"shipDate,omitempty"`
+ Id *int64 `json:"id,omitempty"`
+
+ PetId *int64 `json:"petId,omitempty"`
+
+ Quantity *int32 `json:"quantity,omitempty"`
+
+ ShipDate *time.Time `json:"shipDate,omitempty"`
+
// Order Status
- Status string `json:"status,omitempty"`
- Complete bool `json:"complete,omitempty"`
+ Status *string `json:"status,omitempty"`
+
+ Complete *bool `json:"complete,omitempty"`
+
}
+
+// GetId returns the Id field if non-nil, zero value otherwise.
+func (o *Order) GetId() int64 {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Order) GetIdOk() (int64, bool) {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret, false
+ }
+ return *o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *Order) HasId() bool {
+ if o != nil && o.Id != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given int64 and assigns it to the Id field.
+func (o *Order) SetId(v int64) {
+ o.Id = &v
+}
+
+// GetPetId returns the PetId field if non-nil, zero value otherwise.
+func (o *Order) GetPetId() int64 {
+ if o == nil || o.PetId == nil {
+ var ret int64
+ return ret
+ }
+ return *o.PetId
+}
+
+// GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Order) GetPetIdOk() (int64, bool) {
+ if o == nil || o.PetId == nil {
+ var ret int64
+ return ret, false
+ }
+ return *o.PetId, true
+}
+
+// HasPetId returns a boolean if a field has been set.
+func (o *Order) HasPetId() bool {
+ if o != nil && o.PetId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPetId gets a reference to the given int64 and assigns it to the PetId field.
+func (o *Order) SetPetId(v int64) {
+ o.PetId = &v
+}
+
+// GetQuantity returns the Quantity field if non-nil, zero value otherwise.
+func (o *Order) GetQuantity() int32 {
+ if o == nil || o.Quantity == nil {
+ var ret int32
+ return ret
+ }
+ return *o.Quantity
+}
+
+// GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Order) GetQuantityOk() (int32, bool) {
+ if o == nil || o.Quantity == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.Quantity, true
+}
+
+// HasQuantity returns a boolean if a field has been set.
+func (o *Order) HasQuantity() bool {
+ if o != nil && o.Quantity != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetQuantity gets a reference to the given int32 and assigns it to the Quantity field.
+func (o *Order) SetQuantity(v int32) {
+ o.Quantity = &v
+}
+
+// GetShipDate returns the ShipDate field if non-nil, zero value otherwise.
+func (o *Order) GetShipDate() time.Time {
+ if o == nil || o.ShipDate == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.ShipDate
+}
+
+// GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Order) GetShipDateOk() (time.Time, bool) {
+ if o == nil || o.ShipDate == nil {
+ var ret time.Time
+ return ret, false
+ }
+ return *o.ShipDate, true
+}
+
+// HasShipDate returns a boolean if a field has been set.
+func (o *Order) HasShipDate() bool {
+ if o != nil && o.ShipDate != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field.
+func (o *Order) SetShipDate(v time.Time) {
+ o.ShipDate = &v
+}
+
+// GetStatus returns the Status field if non-nil, zero value otherwise.
+func (o *Order) GetStatus() string {
+ if o == nil || o.Status == nil {
+ var ret string
+ return ret
+ }
+ return *o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Order) GetStatusOk() (string, bool) {
+ if o == nil || o.Status == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Status, true
+}
+
+// HasStatus returns a boolean if a field has been set.
+func (o *Order) HasStatus() bool {
+ if o != nil && o.Status != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetStatus gets a reference to the given string and assigns it to the Status field.
+func (o *Order) SetStatus(v string) {
+ o.Status = &v
+}
+
+// GetComplete returns the Complete field if non-nil, zero value otherwise.
+func (o *Order) GetComplete() bool {
+ if o == nil || o.Complete == nil {
+ var ret bool
+ return ret
+ }
+ return *o.Complete
+}
+
+// GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Order) GetCompleteOk() (bool, bool) {
+ if o == nil || o.Complete == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.Complete, true
+}
+
+// HasComplete returns a boolean if a field has been set.
+func (o *Order) HasComplete() bool {
+ if o != nil && o.Complete != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetComplete gets a reference to the given bool and assigns it to the Complete field.
+func (o *Order) SetComplete(v bool) {
+ o.Complete = &v
+}
+
+
+func (o Order) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Id != nil {
+ toSerialize["id"] = o.Id
+ }
+ if o.PetId != nil {
+ toSerialize["petId"] = o.PetId
+ }
+ if o.Quantity != nil {
+ toSerialize["quantity"] = o.Quantity
+ }
+ if o.ShipDate != nil {
+ toSerialize["shipDate"] = o.ShipDate
+ }
+ if o.Status != nil {
+ toSerialize["status"] = o.Status
+ }
+ if o.Complete != nil {
+ toSerialize["complete"] = o.Complete
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go
index 0ebb526267..83723a9b8e 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go
@@ -8,9 +8,131 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type OuterComposite struct {
- MyNumber float32 `json:"my_number,omitempty"`
- MyString string `json:"my_string,omitempty"`
- MyBoolean bool `json:"my_boolean,omitempty"`
+ MyNumber *float32 `json:"my_number,omitempty"`
+
+ MyString *string `json:"my_string,omitempty"`
+
+ MyBoolean *bool `json:"my_boolean,omitempty"`
+
}
+
+// GetMyNumber returns the MyNumber field if non-nil, zero value otherwise.
+func (o *OuterComposite) GetMyNumber() float32 {
+ if o == nil || o.MyNumber == nil {
+ var ret float32
+ return ret
+ }
+ return *o.MyNumber
+}
+
+// GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *OuterComposite) GetMyNumberOk() (float32, bool) {
+ if o == nil || o.MyNumber == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.MyNumber, true
+}
+
+// HasMyNumber returns a boolean if a field has been set.
+func (o *OuterComposite) HasMyNumber() bool {
+ if o != nil && o.MyNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field.
+func (o *OuterComposite) SetMyNumber(v float32) {
+ o.MyNumber = &v
+}
+
+// GetMyString returns the MyString field if non-nil, zero value otherwise.
+func (o *OuterComposite) GetMyString() string {
+ if o == nil || o.MyString == nil {
+ var ret string
+ return ret
+ }
+ return *o.MyString
+}
+
+// GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *OuterComposite) GetMyStringOk() (string, bool) {
+ if o == nil || o.MyString == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.MyString, true
+}
+
+// HasMyString returns a boolean if a field has been set.
+func (o *OuterComposite) HasMyString() bool {
+ if o != nil && o.MyString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMyString gets a reference to the given string and assigns it to the MyString field.
+func (o *OuterComposite) SetMyString(v string) {
+ o.MyString = &v
+}
+
+// GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise.
+func (o *OuterComposite) GetMyBoolean() bool {
+ if o == nil || o.MyBoolean == nil {
+ var ret bool
+ return ret
+ }
+ return *o.MyBoolean
+}
+
+// GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *OuterComposite) GetMyBooleanOk() (bool, bool) {
+ if o == nil || o.MyBoolean == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.MyBoolean, true
+}
+
+// HasMyBoolean returns a boolean if a field has been set.
+func (o *OuterComposite) HasMyBoolean() bool {
+ if o != nil && o.MyBoolean != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field.
+func (o *OuterComposite) SetMyBoolean(v bool) {
+ o.MyBoolean = &v
+}
+
+
+func (o OuterComposite) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.MyNumber != nil {
+ toSerialize["my_number"] = o.MyNumber
+ }
+ if o.MyString != nil {
+ toSerialize["my_string"] = o.MyString
+ }
+ if o.MyBoolean != nil {
+ toSerialize["my_boolean"] = o.MyBoolean
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go
index 903d31e826..131a07c71a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go
@@ -15,4 +15,5 @@ const (
PLACED OuterEnum = "placed"
APPROVED OuterEnum = "approved"
DELIVERED OuterEnum = "delivered"
-)
\ No newline at end of file
+)
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/client/petstore/go-experimental/go-petstore/model_pet.go
index 4930dbb92e..1216b0e799 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_pet.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_pet.go
@@ -8,13 +8,253 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
type Pet struct {
- Id int64 `json:"id,omitempty"`
- Category Category `json:"category,omitempty"`
- Name string `json:"name"`
- PhotoUrls []string `json:"photoUrls"`
- Tags []Tag `json:"tags,omitempty"`
+ Id *int64 `json:"id,omitempty"`
+
+ Category *Category `json:"category,omitempty"`
+
+ Name *string `json:"name,omitempty"`
+
+ PhotoUrls *[]string `json:"photoUrls,omitempty"`
+
+ Tags *[]Tag `json:"tags,omitempty"`
+
// pet status in the store
- Status string `json:"status,omitempty"`
+ Status *string `json:"status,omitempty"`
+
}
+
+// GetId returns the Id field if non-nil, zero value otherwise.
+func (o *Pet) GetId() int64 {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Pet) GetIdOk() (int64, bool) {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret, false
+ }
+ return *o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *Pet) HasId() bool {
+ if o != nil && o.Id != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given int64 and assigns it to the Id field.
+func (o *Pet) SetId(v int64) {
+ o.Id = &v
+}
+
+// GetCategory returns the Category field if non-nil, zero value otherwise.
+func (o *Pet) GetCategory() Category {
+ if o == nil || o.Category == nil {
+ var ret Category
+ return ret
+ }
+ return *o.Category
+}
+
+// GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Pet) GetCategoryOk() (Category, bool) {
+ if o == nil || o.Category == nil {
+ var ret Category
+ return ret, false
+ }
+ return *o.Category, true
+}
+
+// HasCategory returns a boolean if a field has been set.
+func (o *Pet) HasCategory() bool {
+ if o != nil && o.Category != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCategory gets a reference to the given Category and assigns it to the Category field.
+func (o *Pet) SetCategory(v Category) {
+ o.Category = &v
+}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *Pet) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Pet) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *Pet) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *Pet) SetName(v string) {
+ o.Name = &v
+}
+
+// GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise.
+func (o *Pet) GetPhotoUrls() []string {
+ if o == nil || o.PhotoUrls == nil {
+ var ret []string
+ return ret
+ }
+ return *o.PhotoUrls
+}
+
+// GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Pet) GetPhotoUrlsOk() ([]string, bool) {
+ if o == nil || o.PhotoUrls == nil {
+ var ret []string
+ return ret, false
+ }
+ return *o.PhotoUrls, true
+}
+
+// HasPhotoUrls returns a boolean if a field has been set.
+func (o *Pet) HasPhotoUrls() bool {
+ if o != nil && o.PhotoUrls != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field.
+func (o *Pet) SetPhotoUrls(v []string) {
+ o.PhotoUrls = &v
+}
+
+// GetTags returns the Tags field if non-nil, zero value otherwise.
+func (o *Pet) GetTags() []Tag {
+ if o == nil || o.Tags == nil {
+ var ret []Tag
+ return ret
+ }
+ return *o.Tags
+}
+
+// GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Pet) GetTagsOk() ([]Tag, bool) {
+ if o == nil || o.Tags == nil {
+ var ret []Tag
+ return ret, false
+ }
+ return *o.Tags, true
+}
+
+// HasTags returns a boolean if a field has been set.
+func (o *Pet) HasTags() bool {
+ if o != nil && o.Tags != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTags gets a reference to the given []Tag and assigns it to the Tags field.
+func (o *Pet) SetTags(v []Tag) {
+ o.Tags = &v
+}
+
+// GetStatus returns the Status field if non-nil, zero value otherwise.
+func (o *Pet) GetStatus() string {
+ if o == nil || o.Status == nil {
+ var ret string
+ return ret
+ }
+ return *o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Pet) GetStatusOk() (string, bool) {
+ if o == nil || o.Status == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Status, true
+}
+
+// HasStatus returns a boolean if a field has been set.
+func (o *Pet) HasStatus() bool {
+ if o != nil && o.Status != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetStatus gets a reference to the given string and assigns it to the Status field.
+func (o *Pet) SetStatus(v string) {
+ o.Status = &v
+}
+
+
+func (o Pet) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Id != nil {
+ toSerialize["id"] = o.Id
+ }
+ if o.Category != nil {
+ toSerialize["category"] = o.Category
+ }
+ if o.Name == nil {
+ return nil, errors.New("Name is required and not nullable, but was not set on Pet")
+ }
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ if o.PhotoUrls == nil {
+ return nil, errors.New("PhotoUrls is required and not nullable, but was not set on Pet")
+ }
+ if o.PhotoUrls != nil {
+ toSerialize["photoUrls"] = o.PhotoUrls
+ }
+ if o.Tags != nil {
+ toSerialize["tags"] = o.Tags
+ }
+ if o.Status != nil {
+ toSerialize["status"] = o.Status
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go
index 6b22163900..5c92010e8d 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go
@@ -8,8 +8,93 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type ReadOnlyFirst struct {
- Bar string `json:"bar,omitempty"`
- Baz string `json:"baz,omitempty"`
+ Bar *string `json:"bar,omitempty"`
+
+ Baz *string `json:"baz,omitempty"`
+
}
+
+// GetBar returns the Bar field if non-nil, zero value otherwise.
+func (o *ReadOnlyFirst) GetBar() string {
+ if o == nil || o.Bar == nil {
+ var ret string
+ return ret
+ }
+ return *o.Bar
+}
+
+// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ReadOnlyFirst) GetBarOk() (string, bool) {
+ if o == nil || o.Bar == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Bar, true
+}
+
+// HasBar returns a boolean if a field has been set.
+func (o *ReadOnlyFirst) HasBar() bool {
+ if o != nil && o.Bar != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBar gets a reference to the given string and assigns it to the Bar field.
+func (o *ReadOnlyFirst) SetBar(v string) {
+ o.Bar = &v
+}
+
+// GetBaz returns the Baz field if non-nil, zero value otherwise.
+func (o *ReadOnlyFirst) GetBaz() string {
+ if o == nil || o.Baz == nil {
+ var ret string
+ return ret
+ }
+ return *o.Baz
+}
+
+// GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *ReadOnlyFirst) GetBazOk() (string, bool) {
+ if o == nil || o.Baz == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Baz, true
+}
+
+// HasBaz returns a boolean if a field has been set.
+func (o *ReadOnlyFirst) HasBaz() bool {
+ if o != nil && o.Baz != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBaz gets a reference to the given string and assigns it to the Baz field.
+func (o *ReadOnlyFirst) SetBaz(v string) {
+ o.Baz = &v
+}
+
+
+func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Bar != nil {
+ toSerialize["bar"] = o.Bar
+ }
+ if o.Baz != nil {
+ toSerialize["baz"] = o.Baz
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_return.go b/samples/client/petstore/go-experimental/go-petstore/model_return.go
index 7851dd851d..e53cc31b5f 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_return.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_return.go
@@ -8,8 +8,56 @@
*/
package petstore
+import (
+ "encoding/json"
+)
// Model for testing reserved words
type Return struct {
- Return int32 `json:"return,omitempty"`
+ Return *int32 `json:"return,omitempty"`
+
}
+
+// GetReturn returns the Return field if non-nil, zero value otherwise.
+func (o *Return) GetReturn() int32 {
+ if o == nil || o.Return == nil {
+ var ret int32
+ return ret
+ }
+ return *o.Return
+}
+
+// GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Return) GetReturnOk() (int32, bool) {
+ if o == nil || o.Return == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.Return, true
+}
+
+// HasReturn returns a boolean if a field has been set.
+func (o *Return) HasReturn() bool {
+ if o != nil && o.Return != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturn gets a reference to the given int32 and assigns it to the Return field.
+func (o *Return) SetReturn(v int32) {
+ o.Return = &v
+}
+
+
+func (o Return) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Return != nil {
+ toSerialize["return"] = o.Return
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go
index f906e91987..7e940165d9 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go
@@ -8,7 +8,55 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type SpecialModelName struct {
- SpecialPropertyName int64 `json:"$special[property.name],omitempty"`
+ SpecialPropertyName *int64 `json:"$special[property.name],omitempty"`
+
}
+
+// GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise.
+func (o *SpecialModelName) GetSpecialPropertyName() int64 {
+ if o == nil || o.SpecialPropertyName == nil {
+ var ret int64
+ return ret
+ }
+ return *o.SpecialPropertyName
+}
+
+// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) {
+ if o == nil || o.SpecialPropertyName == nil {
+ var ret int64
+ return ret, false
+ }
+ return *o.SpecialPropertyName, true
+}
+
+// HasSpecialPropertyName returns a boolean if a field has been set.
+func (o *SpecialModelName) HasSpecialPropertyName() bool {
+ if o != nil && o.SpecialPropertyName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field.
+func (o *SpecialModelName) SetSpecialPropertyName(v int64) {
+ o.SpecialPropertyName = &v
+}
+
+
+func (o SpecialModelName) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.SpecialPropertyName != nil {
+ toSerialize["$special[property.name]"] = o.SpecialPropertyName
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/client/petstore/go-experimental/go-petstore/model_tag.go
index 37a2b63d44..dc4053da9b 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_tag.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_tag.go
@@ -8,8 +8,93 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type Tag struct {
- Id int64 `json:"id,omitempty"`
- Name string `json:"name,omitempty"`
+ Id *int64 `json:"id,omitempty"`
+
+ Name *string `json:"name,omitempty"`
+
}
+
+// GetId returns the Id field if non-nil, zero value otherwise.
+func (o *Tag) GetId() int64 {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Tag) GetIdOk() (int64, bool) {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret, false
+ }
+ return *o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *Tag) HasId() bool {
+ if o != nil && o.Id != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given int64 and assigns it to the Id field.
+func (o *Tag) SetId(v int64) {
+ o.Id = &v
+}
+
+// GetName returns the Name field if non-nil, zero value otherwise.
+func (o *Tag) GetName() string {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *Tag) GetNameOk() (string, bool) {
+ if o == nil || o.Name == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *Tag) HasName() bool {
+ if o != nil && o.Name != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *Tag) SetName(v string) {
+ o.Name = &v
+}
+
+
+func (o Tag) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Id != nil {
+ toSerialize["id"] = o.Id
+ }
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go
index 68e1218ec9..f1fcc93dd8 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go
@@ -8,11 +8,223 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
type TypeHolderDefault struct {
- StringItem string `json:"string_item"`
- NumberItem float32 `json:"number_item"`
- IntegerItem int32 `json:"integer_item"`
- BoolItem bool `json:"bool_item"`
- ArrayItem []int32 `json:"array_item"`
+ StringItem *string `json:"string_item,omitempty"`
+
+ NumberItem *float32 `json:"number_item,omitempty"`
+
+ IntegerItem *int32 `json:"integer_item,omitempty"`
+
+ BoolItem *bool `json:"bool_item,omitempty"`
+
+ ArrayItem *[]int32 `json:"array_item,omitempty"`
+
}
+
+// GetStringItem returns the StringItem field if non-nil, zero value otherwise.
+func (o *TypeHolderDefault) GetStringItem() string {
+ if o == nil || o.StringItem == nil {
+ var ret string
+ return ret
+ }
+ return *o.StringItem
+}
+
+// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderDefault) GetStringItemOk() (string, bool) {
+ if o == nil || o.StringItem == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.StringItem, true
+}
+
+// HasStringItem returns a boolean if a field has been set.
+func (o *TypeHolderDefault) HasStringItem() bool {
+ if o != nil && o.StringItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetStringItem gets a reference to the given string and assigns it to the StringItem field.
+func (o *TypeHolderDefault) SetStringItem(v string) {
+ o.StringItem = &v
+}
+
+// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise.
+func (o *TypeHolderDefault) GetNumberItem() float32 {
+ if o == nil || o.NumberItem == nil {
+ var ret float32
+ return ret
+ }
+ return *o.NumberItem
+}
+
+// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool) {
+ if o == nil || o.NumberItem == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.NumberItem, true
+}
+
+// HasNumberItem returns a boolean if a field has been set.
+func (o *TypeHolderDefault) HasNumberItem() bool {
+ if o != nil && o.NumberItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field.
+func (o *TypeHolderDefault) SetNumberItem(v float32) {
+ o.NumberItem = &v
+}
+
+// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise.
+func (o *TypeHolderDefault) GetIntegerItem() int32 {
+ if o == nil || o.IntegerItem == nil {
+ var ret int32
+ return ret
+ }
+ return *o.IntegerItem
+}
+
+// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool) {
+ if o == nil || o.IntegerItem == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.IntegerItem, true
+}
+
+// HasIntegerItem returns a boolean if a field has been set.
+func (o *TypeHolderDefault) HasIntegerItem() bool {
+ if o != nil && o.IntegerItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field.
+func (o *TypeHolderDefault) SetIntegerItem(v int32) {
+ o.IntegerItem = &v
+}
+
+// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise.
+func (o *TypeHolderDefault) GetBoolItem() bool {
+ if o == nil || o.BoolItem == nil {
+ var ret bool
+ return ret
+ }
+ return *o.BoolItem
+}
+
+// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool) {
+ if o == nil || o.BoolItem == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.BoolItem, true
+}
+
+// HasBoolItem returns a boolean if a field has been set.
+func (o *TypeHolderDefault) HasBoolItem() bool {
+ if o != nil && o.BoolItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field.
+func (o *TypeHolderDefault) SetBoolItem(v bool) {
+ o.BoolItem = &v
+}
+
+// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise.
+func (o *TypeHolderDefault) GetArrayItem() []int32 {
+ if o == nil || o.ArrayItem == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.ArrayItem
+}
+
+// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool) {
+ if o == nil || o.ArrayItem == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.ArrayItem, true
+}
+
+// HasArrayItem returns a boolean if a field has been set.
+func (o *TypeHolderDefault) HasArrayItem() bool {
+ if o != nil && o.ArrayItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field.
+func (o *TypeHolderDefault) SetArrayItem(v []int32) {
+ o.ArrayItem = &v
+}
+
+
+func (o TypeHolderDefault) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.StringItem == nil {
+ return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderDefault")
+ }
+ if o.StringItem != nil {
+ toSerialize["string_item"] = o.StringItem
+ }
+ if o.NumberItem == nil {
+ return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderDefault")
+ }
+ if o.NumberItem != nil {
+ toSerialize["number_item"] = o.NumberItem
+ }
+ if o.IntegerItem == nil {
+ return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderDefault")
+ }
+ if o.IntegerItem != nil {
+ toSerialize["integer_item"] = o.IntegerItem
+ }
+ if o.BoolItem == nil {
+ return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderDefault")
+ }
+ if o.BoolItem != nil {
+ toSerialize["bool_item"] = o.BoolItem
+ }
+ if o.ArrayItem == nil {
+ return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderDefault")
+ }
+ if o.ArrayItem != nil {
+ toSerialize["array_item"] = o.ArrayItem
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go
index e129bb6a76..0fe346c7cd 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go
@@ -8,11 +8,223 @@
*/
package petstore
+import (
+ "encoding/json"
+ "errors"
+)
type TypeHolderExample struct {
- StringItem string `json:"string_item"`
- NumberItem float32 `json:"number_item"`
- IntegerItem int32 `json:"integer_item"`
- BoolItem bool `json:"bool_item"`
- ArrayItem []int32 `json:"array_item"`
+ StringItem *string `json:"string_item,omitempty"`
+
+ NumberItem *float32 `json:"number_item,omitempty"`
+
+ IntegerItem *int32 `json:"integer_item,omitempty"`
+
+ BoolItem *bool `json:"bool_item,omitempty"`
+
+ ArrayItem *[]int32 `json:"array_item,omitempty"`
+
}
+
+// GetStringItem returns the StringItem field if non-nil, zero value otherwise.
+func (o *TypeHolderExample) GetStringItem() string {
+ if o == nil || o.StringItem == nil {
+ var ret string
+ return ret
+ }
+ return *o.StringItem
+}
+
+// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderExample) GetStringItemOk() (string, bool) {
+ if o == nil || o.StringItem == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.StringItem, true
+}
+
+// HasStringItem returns a boolean if a field has been set.
+func (o *TypeHolderExample) HasStringItem() bool {
+ if o != nil && o.StringItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetStringItem gets a reference to the given string and assigns it to the StringItem field.
+func (o *TypeHolderExample) SetStringItem(v string) {
+ o.StringItem = &v
+}
+
+// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise.
+func (o *TypeHolderExample) GetNumberItem() float32 {
+ if o == nil || o.NumberItem == nil {
+ var ret float32
+ return ret
+ }
+ return *o.NumberItem
+}
+
+// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderExample) GetNumberItemOk() (float32, bool) {
+ if o == nil || o.NumberItem == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.NumberItem, true
+}
+
+// HasNumberItem returns a boolean if a field has been set.
+func (o *TypeHolderExample) HasNumberItem() bool {
+ if o != nil && o.NumberItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field.
+func (o *TypeHolderExample) SetNumberItem(v float32) {
+ o.NumberItem = &v
+}
+
+// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise.
+func (o *TypeHolderExample) GetIntegerItem() int32 {
+ if o == nil || o.IntegerItem == nil {
+ var ret int32
+ return ret
+ }
+ return *o.IntegerItem
+}
+
+// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool) {
+ if o == nil || o.IntegerItem == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.IntegerItem, true
+}
+
+// HasIntegerItem returns a boolean if a field has been set.
+func (o *TypeHolderExample) HasIntegerItem() bool {
+ if o != nil && o.IntegerItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field.
+func (o *TypeHolderExample) SetIntegerItem(v int32) {
+ o.IntegerItem = &v
+}
+
+// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise.
+func (o *TypeHolderExample) GetBoolItem() bool {
+ if o == nil || o.BoolItem == nil {
+ var ret bool
+ return ret
+ }
+ return *o.BoolItem
+}
+
+// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderExample) GetBoolItemOk() (bool, bool) {
+ if o == nil || o.BoolItem == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.BoolItem, true
+}
+
+// HasBoolItem returns a boolean if a field has been set.
+func (o *TypeHolderExample) HasBoolItem() bool {
+ if o != nil && o.BoolItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field.
+func (o *TypeHolderExample) SetBoolItem(v bool) {
+ o.BoolItem = &v
+}
+
+// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise.
+func (o *TypeHolderExample) GetArrayItem() []int32 {
+ if o == nil || o.ArrayItem == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.ArrayItem
+}
+
+// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool) {
+ if o == nil || o.ArrayItem == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.ArrayItem, true
+}
+
+// HasArrayItem returns a boolean if a field has been set.
+func (o *TypeHolderExample) HasArrayItem() bool {
+ if o != nil && o.ArrayItem != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field.
+func (o *TypeHolderExample) SetArrayItem(v []int32) {
+ o.ArrayItem = &v
+}
+
+
+func (o TypeHolderExample) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.StringItem == nil {
+ return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderExample")
+ }
+ if o.StringItem != nil {
+ toSerialize["string_item"] = o.StringItem
+ }
+ if o.NumberItem == nil {
+ return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderExample")
+ }
+ if o.NumberItem != nil {
+ toSerialize["number_item"] = o.NumberItem
+ }
+ if o.IntegerItem == nil {
+ return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderExample")
+ }
+ if o.IntegerItem != nil {
+ toSerialize["integer_item"] = o.IntegerItem
+ }
+ if o.BoolItem == nil {
+ return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderExample")
+ }
+ if o.BoolItem != nil {
+ toSerialize["bool_item"] = o.BoolItem
+ }
+ if o.ArrayItem == nil {
+ return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderExample")
+ }
+ if o.ArrayItem != nil {
+ toSerialize["array_item"] = o.ArrayItem
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_user.go b/samples/client/petstore/go-experimental/go-petstore/model_user.go
index caff75ebc2..925f82d582 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_user.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_user.go
@@ -8,15 +8,322 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type User struct {
- Id int64 `json:"id,omitempty"`
- Username string `json:"username,omitempty"`
- FirstName string `json:"firstName,omitempty"`
- LastName string `json:"lastName,omitempty"`
- Email string `json:"email,omitempty"`
- Password string `json:"password,omitempty"`
- Phone string `json:"phone,omitempty"`
+ Id *int64 `json:"id,omitempty"`
+
+ Username *string `json:"username,omitempty"`
+
+ FirstName *string `json:"firstName,omitempty"`
+
+ LastName *string `json:"lastName,omitempty"`
+
+ Email *string `json:"email,omitempty"`
+
+ Password *string `json:"password,omitempty"`
+
+ Phone *string `json:"phone,omitempty"`
+
// User Status
- UserStatus int32 `json:"userStatus,omitempty"`
+ UserStatus *int32 `json:"userStatus,omitempty"`
+
}
+
+// GetId returns the Id field if non-nil, zero value otherwise.
+func (o *User) GetId() int64 {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *User) GetIdOk() (int64, bool) {
+ if o == nil || o.Id == nil {
+ var ret int64
+ return ret, false
+ }
+ return *o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *User) HasId() bool {
+ if o != nil && o.Id != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given int64 and assigns it to the Id field.
+func (o *User) SetId(v int64) {
+ o.Id = &v
+}
+
+// GetUsername returns the Username field if non-nil, zero value otherwise.
+func (o *User) GetUsername() string {
+ if o == nil || o.Username == nil {
+ var ret string
+ return ret
+ }
+ return *o.Username
+}
+
+// GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *User) GetUsernameOk() (string, bool) {
+ if o == nil || o.Username == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Username, true
+}
+
+// HasUsername returns a boolean if a field has been set.
+func (o *User) HasUsername() bool {
+ if o != nil && o.Username != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUsername gets a reference to the given string and assigns it to the Username field.
+func (o *User) SetUsername(v string) {
+ o.Username = &v
+}
+
+// GetFirstName returns the FirstName field if non-nil, zero value otherwise.
+func (o *User) GetFirstName() string {
+ if o == nil || o.FirstName == nil {
+ var ret string
+ return ret
+ }
+ return *o.FirstName
+}
+
+// GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *User) GetFirstNameOk() (string, bool) {
+ if o == nil || o.FirstName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.FirstName, true
+}
+
+// HasFirstName returns a boolean if a field has been set.
+func (o *User) HasFirstName() bool {
+ if o != nil && o.FirstName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFirstName gets a reference to the given string and assigns it to the FirstName field.
+func (o *User) SetFirstName(v string) {
+ o.FirstName = &v
+}
+
+// GetLastName returns the LastName field if non-nil, zero value otherwise.
+func (o *User) GetLastName() string {
+ if o == nil || o.LastName == nil {
+ var ret string
+ return ret
+ }
+ return *o.LastName
+}
+
+// GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *User) GetLastNameOk() (string, bool) {
+ if o == nil || o.LastName == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.LastName, true
+}
+
+// HasLastName returns a boolean if a field has been set.
+func (o *User) HasLastName() bool {
+ if o != nil && o.LastName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetLastName gets a reference to the given string and assigns it to the LastName field.
+func (o *User) SetLastName(v string) {
+ o.LastName = &v
+}
+
+// GetEmail returns the Email field if non-nil, zero value otherwise.
+func (o *User) GetEmail() string {
+ if o == nil || o.Email == nil {
+ var ret string
+ return ret
+ }
+ return *o.Email
+}
+
+// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *User) GetEmailOk() (string, bool) {
+ if o == nil || o.Email == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Email, true
+}
+
+// HasEmail returns a boolean if a field has been set.
+func (o *User) HasEmail() bool {
+ if o != nil && o.Email != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetEmail gets a reference to the given string and assigns it to the Email field.
+func (o *User) SetEmail(v string) {
+ o.Email = &v
+}
+
+// GetPassword returns the Password field if non-nil, zero value otherwise.
+func (o *User) GetPassword() string {
+ if o == nil || o.Password == nil {
+ var ret string
+ return ret
+ }
+ return *o.Password
+}
+
+// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *User) GetPasswordOk() (string, bool) {
+ if o == nil || o.Password == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Password, true
+}
+
+// HasPassword returns a boolean if a field has been set.
+func (o *User) HasPassword() bool {
+ if o != nil && o.Password != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPassword gets a reference to the given string and assigns it to the Password field.
+func (o *User) SetPassword(v string) {
+ o.Password = &v
+}
+
+// GetPhone returns the Phone field if non-nil, zero value otherwise.
+func (o *User) GetPhone() string {
+ if o == nil || o.Phone == nil {
+ var ret string
+ return ret
+ }
+ return *o.Phone
+}
+
+// GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *User) GetPhoneOk() (string, bool) {
+ if o == nil || o.Phone == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.Phone, true
+}
+
+// HasPhone returns a boolean if a field has been set.
+func (o *User) HasPhone() bool {
+ if o != nil && o.Phone != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPhone gets a reference to the given string and assigns it to the Phone field.
+func (o *User) SetPhone(v string) {
+ o.Phone = &v
+}
+
+// GetUserStatus returns the UserStatus field if non-nil, zero value otherwise.
+func (o *User) GetUserStatus() int32 {
+ if o == nil || o.UserStatus == nil {
+ var ret int32
+ return ret
+ }
+ return *o.UserStatus
+}
+
+// GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *User) GetUserStatusOk() (int32, bool) {
+ if o == nil || o.UserStatus == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.UserStatus, true
+}
+
+// HasUserStatus returns a boolean if a field has been set.
+func (o *User) HasUserStatus() bool {
+ if o != nil && o.UserStatus != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field.
+func (o *User) SetUserStatus(v int32) {
+ o.UserStatus = &v
+}
+
+
+func (o User) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Id != nil {
+ toSerialize["id"] = o.Id
+ }
+ if o.Username != nil {
+ toSerialize["username"] = o.Username
+ }
+ if o.FirstName != nil {
+ toSerialize["firstName"] = o.FirstName
+ }
+ if o.LastName != nil {
+ toSerialize["lastName"] = o.LastName
+ }
+ if o.Email != nil {
+ toSerialize["email"] = o.Email
+ }
+ if o.Password != nil {
+ toSerialize["password"] = o.Password
+ }
+ if o.Phone != nil {
+ toSerialize["phone"] = o.Phone
+ }
+ if o.UserStatus != nil {
+ toSerialize["userStatus"] = o.UserStatus
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go
index a623bda5c7..2f0f8f89c4 100644
--- a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go
+++ b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go
@@ -8,35 +8,1119 @@
*/
package petstore
+import (
+ "encoding/json"
+)
type XmlItem struct {
- AttributeString string `json:"attribute_string,omitempty"`
- AttributeNumber float32 `json:"attribute_number,omitempty"`
- AttributeInteger int32 `json:"attribute_integer,omitempty"`
- AttributeBoolean bool `json:"attribute_boolean,omitempty"`
- WrappedArray []int32 `json:"wrapped_array,omitempty"`
- NameString string `json:"name_string,omitempty"`
- NameNumber float32 `json:"name_number,omitempty"`
- NameInteger int32 `json:"name_integer,omitempty"`
- NameBoolean bool `json:"name_boolean,omitempty"`
- NameArray []int32 `json:"name_array,omitempty"`
- NameWrappedArray []int32 `json:"name_wrapped_array,omitempty"`
- PrefixString string `json:"prefix_string,omitempty"`
- PrefixNumber float32 `json:"prefix_number,omitempty"`
- PrefixInteger int32 `json:"prefix_integer,omitempty"`
- PrefixBoolean bool `json:"prefix_boolean,omitempty"`
- PrefixArray []int32 `json:"prefix_array,omitempty"`
- PrefixWrappedArray []int32 `json:"prefix_wrapped_array,omitempty"`
- NamespaceString string `json:"namespace_string,omitempty"`
- NamespaceNumber float32 `json:"namespace_number,omitempty"`
- NamespaceInteger int32 `json:"namespace_integer,omitempty"`
- NamespaceBoolean bool `json:"namespace_boolean,omitempty"`
- NamespaceArray []int32 `json:"namespace_array,omitempty"`
- NamespaceWrappedArray []int32 `json:"namespace_wrapped_array,omitempty"`
- PrefixNsString string `json:"prefix_ns_string,omitempty"`
- PrefixNsNumber float32 `json:"prefix_ns_number,omitempty"`
- PrefixNsInteger int32 `json:"prefix_ns_integer,omitempty"`
- PrefixNsBoolean bool `json:"prefix_ns_boolean,omitempty"`
- PrefixNsArray []int32 `json:"prefix_ns_array,omitempty"`
- PrefixNsWrappedArray []int32 `json:"prefix_ns_wrapped_array,omitempty"`
+ AttributeString *string `json:"attribute_string,omitempty"`
+
+ AttributeNumber *float32 `json:"attribute_number,omitempty"`
+
+ AttributeInteger *int32 `json:"attribute_integer,omitempty"`
+
+ AttributeBoolean *bool `json:"attribute_boolean,omitempty"`
+
+ WrappedArray *[]int32 `json:"wrapped_array,omitempty"`
+
+ NameString *string `json:"name_string,omitempty"`
+
+ NameNumber *float32 `json:"name_number,omitempty"`
+
+ NameInteger *int32 `json:"name_integer,omitempty"`
+
+ NameBoolean *bool `json:"name_boolean,omitempty"`
+
+ NameArray *[]int32 `json:"name_array,omitempty"`
+
+ NameWrappedArray *[]int32 `json:"name_wrapped_array,omitempty"`
+
+ PrefixString *string `json:"prefix_string,omitempty"`
+
+ PrefixNumber *float32 `json:"prefix_number,omitempty"`
+
+ PrefixInteger *int32 `json:"prefix_integer,omitempty"`
+
+ PrefixBoolean *bool `json:"prefix_boolean,omitempty"`
+
+ PrefixArray *[]int32 `json:"prefix_array,omitempty"`
+
+ PrefixWrappedArray *[]int32 `json:"prefix_wrapped_array,omitempty"`
+
+ NamespaceString *string `json:"namespace_string,omitempty"`
+
+ NamespaceNumber *float32 `json:"namespace_number,omitempty"`
+
+ NamespaceInteger *int32 `json:"namespace_integer,omitempty"`
+
+ NamespaceBoolean *bool `json:"namespace_boolean,omitempty"`
+
+ NamespaceArray *[]int32 `json:"namespace_array,omitempty"`
+
+ NamespaceWrappedArray *[]int32 `json:"namespace_wrapped_array,omitempty"`
+
+ PrefixNsString *string `json:"prefix_ns_string,omitempty"`
+
+ PrefixNsNumber *float32 `json:"prefix_ns_number,omitempty"`
+
+ PrefixNsInteger *int32 `json:"prefix_ns_integer,omitempty"`
+
+ PrefixNsBoolean *bool `json:"prefix_ns_boolean,omitempty"`
+
+ PrefixNsArray *[]int32 `json:"prefix_ns_array,omitempty"`
+
+ PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty"`
+
}
+
+// GetAttributeString returns the AttributeString field if non-nil, zero value otherwise.
+func (o *XmlItem) GetAttributeString() string {
+ if o == nil || o.AttributeString == nil {
+ var ret string
+ return ret
+ }
+ return *o.AttributeString
+}
+
+// GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetAttributeStringOk() (string, bool) {
+ if o == nil || o.AttributeString == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.AttributeString, true
+}
+
+// HasAttributeString returns a boolean if a field has been set.
+func (o *XmlItem) HasAttributeString() bool {
+ if o != nil && o.AttributeString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAttributeString gets a reference to the given string and assigns it to the AttributeString field.
+func (o *XmlItem) SetAttributeString(v string) {
+ o.AttributeString = &v
+}
+
+// GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise.
+func (o *XmlItem) GetAttributeNumber() float32 {
+ if o == nil || o.AttributeNumber == nil {
+ var ret float32
+ return ret
+ }
+ return *o.AttributeNumber
+}
+
+// GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetAttributeNumberOk() (float32, bool) {
+ if o == nil || o.AttributeNumber == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.AttributeNumber, true
+}
+
+// HasAttributeNumber returns a boolean if a field has been set.
+func (o *XmlItem) HasAttributeNumber() bool {
+ if o != nil && o.AttributeNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field.
+func (o *XmlItem) SetAttributeNumber(v float32) {
+ o.AttributeNumber = &v
+}
+
+// GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise.
+func (o *XmlItem) GetAttributeInteger() int32 {
+ if o == nil || o.AttributeInteger == nil {
+ var ret int32
+ return ret
+ }
+ return *o.AttributeInteger
+}
+
+// GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetAttributeIntegerOk() (int32, bool) {
+ if o == nil || o.AttributeInteger == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.AttributeInteger, true
+}
+
+// HasAttributeInteger returns a boolean if a field has been set.
+func (o *XmlItem) HasAttributeInteger() bool {
+ if o != nil && o.AttributeInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field.
+func (o *XmlItem) SetAttributeInteger(v int32) {
+ o.AttributeInteger = &v
+}
+
+// GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise.
+func (o *XmlItem) GetAttributeBoolean() bool {
+ if o == nil || o.AttributeBoolean == nil {
+ var ret bool
+ return ret
+ }
+ return *o.AttributeBoolean
+}
+
+// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetAttributeBooleanOk() (bool, bool) {
+ if o == nil || o.AttributeBoolean == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.AttributeBoolean, true
+}
+
+// HasAttributeBoolean returns a boolean if a field has been set.
+func (o *XmlItem) HasAttributeBoolean() bool {
+ if o != nil && o.AttributeBoolean != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field.
+func (o *XmlItem) SetAttributeBoolean(v bool) {
+ o.AttributeBoolean = &v
+}
+
+// GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetWrappedArray() []int32 {
+ if o == nil || o.WrappedArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.WrappedArray
+}
+
+// GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) {
+ if o == nil || o.WrappedArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.WrappedArray, true
+}
+
+// HasWrappedArray returns a boolean if a field has been set.
+func (o *XmlItem) HasWrappedArray() bool {
+ if o != nil && o.WrappedArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field.
+func (o *XmlItem) SetWrappedArray(v []int32) {
+ o.WrappedArray = &v
+}
+
+// GetNameString returns the NameString field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNameString() string {
+ if o == nil || o.NameString == nil {
+ var ret string
+ return ret
+ }
+ return *o.NameString
+}
+
+// GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNameStringOk() (string, bool) {
+ if o == nil || o.NameString == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.NameString, true
+}
+
+// HasNameString returns a boolean if a field has been set.
+func (o *XmlItem) HasNameString() bool {
+ if o != nil && o.NameString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNameString gets a reference to the given string and assigns it to the NameString field.
+func (o *XmlItem) SetNameString(v string) {
+ o.NameString = &v
+}
+
+// GetNameNumber returns the NameNumber field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNameNumber() float32 {
+ if o == nil || o.NameNumber == nil {
+ var ret float32
+ return ret
+ }
+ return *o.NameNumber
+}
+
+// GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNameNumberOk() (float32, bool) {
+ if o == nil || o.NameNumber == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.NameNumber, true
+}
+
+// HasNameNumber returns a boolean if a field has been set.
+func (o *XmlItem) HasNameNumber() bool {
+ if o != nil && o.NameNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field.
+func (o *XmlItem) SetNameNumber(v float32) {
+ o.NameNumber = &v
+}
+
+// GetNameInteger returns the NameInteger field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNameInteger() int32 {
+ if o == nil || o.NameInteger == nil {
+ var ret int32
+ return ret
+ }
+ return *o.NameInteger
+}
+
+// GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNameIntegerOk() (int32, bool) {
+ if o == nil || o.NameInteger == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.NameInteger, true
+}
+
+// HasNameInteger returns a boolean if a field has been set.
+func (o *XmlItem) HasNameInteger() bool {
+ if o != nil && o.NameInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field.
+func (o *XmlItem) SetNameInteger(v int32) {
+ o.NameInteger = &v
+}
+
+// GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNameBoolean() bool {
+ if o == nil || o.NameBoolean == nil {
+ var ret bool
+ return ret
+ }
+ return *o.NameBoolean
+}
+
+// GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNameBooleanOk() (bool, bool) {
+ if o == nil || o.NameBoolean == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.NameBoolean, true
+}
+
+// HasNameBoolean returns a boolean if a field has been set.
+func (o *XmlItem) HasNameBoolean() bool {
+ if o != nil && o.NameBoolean != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field.
+func (o *XmlItem) SetNameBoolean(v bool) {
+ o.NameBoolean = &v
+}
+
+// GetNameArray returns the NameArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNameArray() []int32 {
+ if o == nil || o.NameArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.NameArray
+}
+
+// GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNameArrayOk() ([]int32, bool) {
+ if o == nil || o.NameArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.NameArray, true
+}
+
+// HasNameArray returns a boolean if a field has been set.
+func (o *XmlItem) HasNameArray() bool {
+ if o != nil && o.NameArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field.
+func (o *XmlItem) SetNameArray(v []int32) {
+ o.NameArray = &v
+}
+
+// GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNameWrappedArray() []int32 {
+ if o == nil || o.NameWrappedArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.NameWrappedArray
+}
+
+// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) {
+ if o == nil || o.NameWrappedArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.NameWrappedArray, true
+}
+
+// HasNameWrappedArray returns a boolean if a field has been set.
+func (o *XmlItem) HasNameWrappedArray() bool {
+ if o != nil && o.NameWrappedArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field.
+func (o *XmlItem) SetNameWrappedArray(v []int32) {
+ o.NameWrappedArray = &v
+}
+
+// GetPrefixString returns the PrefixString field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixString() string {
+ if o == nil || o.PrefixString == nil {
+ var ret string
+ return ret
+ }
+ return *o.PrefixString
+}
+
+// GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixStringOk() (string, bool) {
+ if o == nil || o.PrefixString == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.PrefixString, true
+}
+
+// HasPrefixString returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixString() bool {
+ if o != nil && o.PrefixString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixString gets a reference to the given string and assigns it to the PrefixString field.
+func (o *XmlItem) SetPrefixString(v string) {
+ o.PrefixString = &v
+}
+
+// GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixNumber() float32 {
+ if o == nil || o.PrefixNumber == nil {
+ var ret float32
+ return ret
+ }
+ return *o.PrefixNumber
+}
+
+// GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixNumberOk() (float32, bool) {
+ if o == nil || o.PrefixNumber == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.PrefixNumber, true
+}
+
+// HasPrefixNumber returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixNumber() bool {
+ if o != nil && o.PrefixNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field.
+func (o *XmlItem) SetPrefixNumber(v float32) {
+ o.PrefixNumber = &v
+}
+
+// GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixInteger() int32 {
+ if o == nil || o.PrefixInteger == nil {
+ var ret int32
+ return ret
+ }
+ return *o.PrefixInteger
+}
+
+// GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixIntegerOk() (int32, bool) {
+ if o == nil || o.PrefixInteger == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.PrefixInteger, true
+}
+
+// HasPrefixInteger returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixInteger() bool {
+ if o != nil && o.PrefixInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field.
+func (o *XmlItem) SetPrefixInteger(v int32) {
+ o.PrefixInteger = &v
+}
+
+// GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixBoolean() bool {
+ if o == nil || o.PrefixBoolean == nil {
+ var ret bool
+ return ret
+ }
+ return *o.PrefixBoolean
+}
+
+// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixBooleanOk() (bool, bool) {
+ if o == nil || o.PrefixBoolean == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.PrefixBoolean, true
+}
+
+// HasPrefixBoolean returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixBoolean() bool {
+ if o != nil && o.PrefixBoolean != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field.
+func (o *XmlItem) SetPrefixBoolean(v bool) {
+ o.PrefixBoolean = &v
+}
+
+// GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixArray() []int32 {
+ if o == nil || o.PrefixArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.PrefixArray
+}
+
+// GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) {
+ if o == nil || o.PrefixArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.PrefixArray, true
+}
+
+// HasPrefixArray returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixArray() bool {
+ if o != nil && o.PrefixArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field.
+func (o *XmlItem) SetPrefixArray(v []int32) {
+ o.PrefixArray = &v
+}
+
+// GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixWrappedArray() []int32 {
+ if o == nil || o.PrefixWrappedArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.PrefixWrappedArray
+}
+
+// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) {
+ if o == nil || o.PrefixWrappedArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.PrefixWrappedArray, true
+}
+
+// HasPrefixWrappedArray returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixWrappedArray() bool {
+ if o != nil && o.PrefixWrappedArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field.
+func (o *XmlItem) SetPrefixWrappedArray(v []int32) {
+ o.PrefixWrappedArray = &v
+}
+
+// GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNamespaceString() string {
+ if o == nil || o.NamespaceString == nil {
+ var ret string
+ return ret
+ }
+ return *o.NamespaceString
+}
+
+// GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNamespaceStringOk() (string, bool) {
+ if o == nil || o.NamespaceString == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.NamespaceString, true
+}
+
+// HasNamespaceString returns a boolean if a field has been set.
+func (o *XmlItem) HasNamespaceString() bool {
+ if o != nil && o.NamespaceString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field.
+func (o *XmlItem) SetNamespaceString(v string) {
+ o.NamespaceString = &v
+}
+
+// GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNamespaceNumber() float32 {
+ if o == nil || o.NamespaceNumber == nil {
+ var ret float32
+ return ret
+ }
+ return *o.NamespaceNumber
+}
+
+// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNamespaceNumberOk() (float32, bool) {
+ if o == nil || o.NamespaceNumber == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.NamespaceNumber, true
+}
+
+// HasNamespaceNumber returns a boolean if a field has been set.
+func (o *XmlItem) HasNamespaceNumber() bool {
+ if o != nil && o.NamespaceNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field.
+func (o *XmlItem) SetNamespaceNumber(v float32) {
+ o.NamespaceNumber = &v
+}
+
+// GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNamespaceInteger() int32 {
+ if o == nil || o.NamespaceInteger == nil {
+ var ret int32
+ return ret
+ }
+ return *o.NamespaceInteger
+}
+
+// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool) {
+ if o == nil || o.NamespaceInteger == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.NamespaceInteger, true
+}
+
+// HasNamespaceInteger returns a boolean if a field has been set.
+func (o *XmlItem) HasNamespaceInteger() bool {
+ if o != nil && o.NamespaceInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field.
+func (o *XmlItem) SetNamespaceInteger(v int32) {
+ o.NamespaceInteger = &v
+}
+
+// GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNamespaceBoolean() bool {
+ if o == nil || o.NamespaceBoolean == nil {
+ var ret bool
+ return ret
+ }
+ return *o.NamespaceBoolean
+}
+
+// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool) {
+ if o == nil || o.NamespaceBoolean == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.NamespaceBoolean, true
+}
+
+// HasNamespaceBoolean returns a boolean if a field has been set.
+func (o *XmlItem) HasNamespaceBoolean() bool {
+ if o != nil && o.NamespaceBoolean != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field.
+func (o *XmlItem) SetNamespaceBoolean(v bool) {
+ o.NamespaceBoolean = &v
+}
+
+// GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNamespaceArray() []int32 {
+ if o == nil || o.NamespaceArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.NamespaceArray
+}
+
+// GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) {
+ if o == nil || o.NamespaceArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.NamespaceArray, true
+}
+
+// HasNamespaceArray returns a boolean if a field has been set.
+func (o *XmlItem) HasNamespaceArray() bool {
+ if o != nil && o.NamespaceArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field.
+func (o *XmlItem) SetNamespaceArray(v []int32) {
+ o.NamespaceArray = &v
+}
+
+// GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetNamespaceWrappedArray() []int32 {
+ if o == nil || o.NamespaceWrappedArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.NamespaceWrappedArray
+}
+
+// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) {
+ if o == nil || o.NamespaceWrappedArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.NamespaceWrappedArray, true
+}
+
+// HasNamespaceWrappedArray returns a boolean if a field has been set.
+func (o *XmlItem) HasNamespaceWrappedArray() bool {
+ if o != nil && o.NamespaceWrappedArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field.
+func (o *XmlItem) SetNamespaceWrappedArray(v []int32) {
+ o.NamespaceWrappedArray = &v
+}
+
+// GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixNsString() string {
+ if o == nil || o.PrefixNsString == nil {
+ var ret string
+ return ret
+ }
+ return *o.PrefixNsString
+}
+
+// GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixNsStringOk() (string, bool) {
+ if o == nil || o.PrefixNsString == nil {
+ var ret string
+ return ret, false
+ }
+ return *o.PrefixNsString, true
+}
+
+// HasPrefixNsString returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixNsString() bool {
+ if o != nil && o.PrefixNsString != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field.
+func (o *XmlItem) SetPrefixNsString(v string) {
+ o.PrefixNsString = &v
+}
+
+// GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixNsNumber() float32 {
+ if o == nil || o.PrefixNsNumber == nil {
+ var ret float32
+ return ret
+ }
+ return *o.PrefixNsNumber
+}
+
+// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool) {
+ if o == nil || o.PrefixNsNumber == nil {
+ var ret float32
+ return ret, false
+ }
+ return *o.PrefixNsNumber, true
+}
+
+// HasPrefixNsNumber returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixNsNumber() bool {
+ if o != nil && o.PrefixNsNumber != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field.
+func (o *XmlItem) SetPrefixNsNumber(v float32) {
+ o.PrefixNsNumber = &v
+}
+
+// GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixNsInteger() int32 {
+ if o == nil || o.PrefixNsInteger == nil {
+ var ret int32
+ return ret
+ }
+ return *o.PrefixNsInteger
+}
+
+// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool) {
+ if o == nil || o.PrefixNsInteger == nil {
+ var ret int32
+ return ret, false
+ }
+ return *o.PrefixNsInteger, true
+}
+
+// HasPrefixNsInteger returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixNsInteger() bool {
+ if o != nil && o.PrefixNsInteger != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field.
+func (o *XmlItem) SetPrefixNsInteger(v int32) {
+ o.PrefixNsInteger = &v
+}
+
+// GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixNsBoolean() bool {
+ if o == nil || o.PrefixNsBoolean == nil {
+ var ret bool
+ return ret
+ }
+ return *o.PrefixNsBoolean
+}
+
+// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool) {
+ if o == nil || o.PrefixNsBoolean == nil {
+ var ret bool
+ return ret, false
+ }
+ return *o.PrefixNsBoolean, true
+}
+
+// HasPrefixNsBoolean returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixNsBoolean() bool {
+ if o != nil && o.PrefixNsBoolean != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field.
+func (o *XmlItem) SetPrefixNsBoolean(v bool) {
+ o.PrefixNsBoolean = &v
+}
+
+// GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixNsArray() []int32 {
+ if o == nil || o.PrefixNsArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.PrefixNsArray
+}
+
+// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) {
+ if o == nil || o.PrefixNsArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.PrefixNsArray, true
+}
+
+// HasPrefixNsArray returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixNsArray() bool {
+ if o != nil && o.PrefixNsArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field.
+func (o *XmlItem) SetPrefixNsArray(v []int32) {
+ o.PrefixNsArray = &v
+}
+
+// GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise.
+func (o *XmlItem) GetPrefixNsWrappedArray() []int32 {
+ if o == nil || o.PrefixNsWrappedArray == nil {
+ var ret []int32
+ return ret
+ }
+ return *o.PrefixNsWrappedArray
+}
+
+// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise
+// and a boolean to check if the value has been set.
+func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) {
+ if o == nil || o.PrefixNsWrappedArray == nil {
+ var ret []int32
+ return ret, false
+ }
+ return *o.PrefixNsWrappedArray, true
+}
+
+// HasPrefixNsWrappedArray returns a boolean if a field has been set.
+func (o *XmlItem) HasPrefixNsWrappedArray() bool {
+ if o != nil && o.PrefixNsWrappedArray != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field.
+func (o *XmlItem) SetPrefixNsWrappedArray(v []int32) {
+ o.PrefixNsWrappedArray = &v
+}
+
+
+func (o XmlItem) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.AttributeString != nil {
+ toSerialize["attribute_string"] = o.AttributeString
+ }
+ if o.AttributeNumber != nil {
+ toSerialize["attribute_number"] = o.AttributeNumber
+ }
+ if o.AttributeInteger != nil {
+ toSerialize["attribute_integer"] = o.AttributeInteger
+ }
+ if o.AttributeBoolean != nil {
+ toSerialize["attribute_boolean"] = o.AttributeBoolean
+ }
+ if o.WrappedArray != nil {
+ toSerialize["wrapped_array"] = o.WrappedArray
+ }
+ if o.NameString != nil {
+ toSerialize["name_string"] = o.NameString
+ }
+ if o.NameNumber != nil {
+ toSerialize["name_number"] = o.NameNumber
+ }
+ if o.NameInteger != nil {
+ toSerialize["name_integer"] = o.NameInteger
+ }
+ if o.NameBoolean != nil {
+ toSerialize["name_boolean"] = o.NameBoolean
+ }
+ if o.NameArray != nil {
+ toSerialize["name_array"] = o.NameArray
+ }
+ if o.NameWrappedArray != nil {
+ toSerialize["name_wrapped_array"] = o.NameWrappedArray
+ }
+ if o.PrefixString != nil {
+ toSerialize["prefix_string"] = o.PrefixString
+ }
+ if o.PrefixNumber != nil {
+ toSerialize["prefix_number"] = o.PrefixNumber
+ }
+ if o.PrefixInteger != nil {
+ toSerialize["prefix_integer"] = o.PrefixInteger
+ }
+ if o.PrefixBoolean != nil {
+ toSerialize["prefix_boolean"] = o.PrefixBoolean
+ }
+ if o.PrefixArray != nil {
+ toSerialize["prefix_array"] = o.PrefixArray
+ }
+ if o.PrefixWrappedArray != nil {
+ toSerialize["prefix_wrapped_array"] = o.PrefixWrappedArray
+ }
+ if o.NamespaceString != nil {
+ toSerialize["namespace_string"] = o.NamespaceString
+ }
+ if o.NamespaceNumber != nil {
+ toSerialize["namespace_number"] = o.NamespaceNumber
+ }
+ if o.NamespaceInteger != nil {
+ toSerialize["namespace_integer"] = o.NamespaceInteger
+ }
+ if o.NamespaceBoolean != nil {
+ toSerialize["namespace_boolean"] = o.NamespaceBoolean
+ }
+ if o.NamespaceArray != nil {
+ toSerialize["namespace_array"] = o.NamespaceArray
+ }
+ if o.NamespaceWrappedArray != nil {
+ toSerialize["namespace_wrapped_array"] = o.NamespaceWrappedArray
+ }
+ if o.PrefixNsString != nil {
+ toSerialize["prefix_ns_string"] = o.PrefixNsString
+ }
+ if o.PrefixNsNumber != nil {
+ toSerialize["prefix_ns_number"] = o.PrefixNsNumber
+ }
+ if o.PrefixNsInteger != nil {
+ toSerialize["prefix_ns_integer"] = o.PrefixNsInteger
+ }
+ if o.PrefixNsBoolean != nil {
+ toSerialize["prefix_ns_boolean"] = o.PrefixNsBoolean
+ }
+ if o.PrefixNsArray != nil {
+ toSerialize["prefix_ns_array"] = o.PrefixNsArray
+ }
+ if o.PrefixNsWrappedArray != nil {
+ toSerialize["prefix_ns_wrapped_array"] = o.PrefixNsWrappedArray
+ }
+ return json.Marshal(toSerialize)
+}
+
+
diff --git a/samples/client/petstore/go-experimental/go-petstore/utils.go b/samples/client/petstore/go-experimental/go-petstore/utils.go
new file mode 100644
index 0000000000..8d2130be3f
--- /dev/null
+++ b/samples/client/petstore/go-experimental/go-petstore/utils.go
@@ -0,0 +1,39 @@
+/*
+ * 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
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package petstore
+
+import "time"
+
+// PtrBool is a helper routine that returns a pointer to given integer value.
+func PtrBool(v bool) *bool { return &v }
+
+// PtrInt is a helper routine that returns a pointer to given integer value.
+func PtrInt(v int) *int { return &v }
+
+// PtrInt32 is a helper routine that returns a pointer to given integer value.
+func PtrInt32(v int32) *int32 { return &v }
+
+// PtrInt64 is a helper routine that returns a pointer to given integer value.
+func PtrInt64(v int64) *int64 { return &v }
+
+// PtrFloat is a helper routine that returns a pointer to given float value.
+func PtrFloat(v float32) *float32 { return &v }
+
+// PtrFloat32 is a helper routine that returns a pointer to given float value.
+func PtrFloat32(v float32) *float32 { return &v }
+
+// PtrFloat64 is a helper routine that returns a pointer to given float value.
+func PtrFloat64(v float64) *float64 { return &v }
+
+// PtrString is a helper routine that returns a pointer to given string value.
+func PtrString(v string) *string { return &v }
+
+// PtrTime is helper routine that returns a pointer to given Time value.
+func PtrTime(v time.Time) *time.Time { return &v }
\ No newline at end of file
diff --git a/samples/client/petstore/go-experimental/pet_api_test.go b/samples/client/petstore/go-experimental/pet_api_test.go
index 969fab1f66..c1e8006bb0 100644
--- a/samples/client/petstore/go-experimental/pet_api_test.go
+++ b/samples/client/petstore/go-experimental/pet_api_test.go
@@ -28,8 +28,9 @@ func TestMain(m *testing.M) {
}
func TestAddPet(t *testing.T) {
- newPet := (sw.Pet{Id: 12830, Name: "gopher",
- PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}})
+ newPet := (sw.Pet{Id: sw.PtrInt64(12830), Name: sw.PtrString("gopher"),
+ PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
+ Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background(), newPet)
@@ -86,8 +87,8 @@ func TestUpdatePetWithForm(t *testing.T) {
t.Log(r)
}
- // get the pet with id 12830 from server to verify the update
- isPetCorrect(t, 12830, "golang", "available")
+ // get the pet with id 12830 from server to verify the update
+ isPetCorrect(t, 12830, "golang", "available")
}
func TestFindPetsByTag(t *testing.T) {
@@ -103,8 +104,8 @@ func TestFindPetsByTag(t *testing.T) {
assert := assert.New(t)
for i := 0; i < len(resp); i++ {
- if resp[i].Id == 12830 {
- assert.Equal(resp[i].Status, "available", "Pet status should be `pending`")
+ if *resp[i].Id == 12830 {
+ assert.Equal(*resp[i].Status, "available", "Pet status should be `pending`")
found = true
}
}
@@ -131,7 +132,7 @@ func TestFindPetsByStatus(t *testing.T) {
} else {
assert := assert.New(t)
for i := 0; i < len(resp); i++ {
- assert.Equal(resp[i].Status, "available", "Pet status should be `available`")
+ assert.Equal(*resp[i].Status, "available", "Pet status should be `available`")
}
}
@@ -284,9 +285,9 @@ func isPetCorrect(t *testing.T, id int64, name string, status string) {
if err != nil {
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))
- assert.Equal(resp.Status, status, fmt.Sprintf("Pet status should be %s", status))
+ assert.Equal(*resp.Id, int64(id), "Pet id should be equal")
+ assert.Equal(*resp.Name, name, fmt.Sprintf("Pet name should be %s", name))
+ assert.Equal(*resp.Status, status, fmt.Sprintf("Pet status should be %s", status))
//t.Log(resp)
}
@@ -294,4 +295,3 @@ func isPetCorrect(t *testing.T, id int64, name string, status string) {
t.Log(r)
}
}
-
diff --git a/samples/client/petstore/go-experimental/store_api_test.go b/samples/client/petstore/go-experimental/store_api_test.go
index 3088adf7b4..81f4fd7e33 100644
--- a/samples/client/petstore/go-experimental/store_api_test.go
+++ b/samples/client/petstore/go-experimental/store_api_test.go
@@ -11,12 +11,12 @@ import (
func TestPlaceOrder(t *testing.T) {
newOrder := sw.Order{
- Id: 0,
- PetId: 0,
- Quantity: 0,
- ShipDate: time.Now().UTC(),
- Status: "placed",
- Complete: false}
+ Id: sw.PtrInt64(0),
+ PetId: sw.PtrInt64(0),
+ Quantity: sw.PtrInt32(0),
+ ShipDate: sw.PtrTime(time.Now().UTC()),
+ Status: sw.PtrString("placed"),
+ Complete: sw.PtrBool(false)}
_, r, err := client.StoreApi.PlaceOrder(context.Background(), newOrder)
diff --git a/samples/client/petstore/go-experimental/user_api_test.go b/samples/client/petstore/go-experimental/user_api_test.go
index 012c608fab..07b82ebb97 100644
--- a/samples/client/petstore/go-experimental/user_api_test.go
+++ b/samples/client/petstore/go-experimental/user_api_test.go
@@ -11,14 +11,14 @@ import (
func TestCreateUser(t *testing.T) {
newUser := sw.User{
- Id: 1000,
- FirstName: "gopher",
- LastName: "lang",
- Username: "gopher",
- Password: "lang",
- Email: "lang@test.com",
- Phone: "5101112222",
- UserStatus: 1}
+ Id: sw.PtrInt64(1000),
+ FirstName: sw.PtrString("gopher"),
+ LastName: sw.PtrString("lang"),
+ Username: sw.PtrString("gopher"),
+ Password: sw.PtrString("lang"),
+ Email: sw.PtrString("lang@test.com"),
+ Phone: sw.PtrString("5101112222"),
+ UserStatus: sw.PtrInt32(1)}
apiResponse, err := client.UserApi.CreateUser(context.Background(), newUser)
@@ -34,24 +34,24 @@ func TestCreateUser(t *testing.T) {
func TestCreateUsersWithArrayInput(t *testing.T) {
newUsers := []sw.User{
sw.User{
- Id: int64(1001),
- FirstName: "gopher1",
- LastName: "lang1",
- Username: "gopher1",
- Password: "lang1",
- Email: "lang1@test.com",
- Phone: "5101112222",
- UserStatus: int32(1),
+ Id: sw.PtrInt64(1001),
+ FirstName: sw.PtrString("gopher1"),
+ LastName: sw.PtrString("lang1"),
+ Username: sw.PtrString("gopher1"),
+ Password: sw.PtrString("lang1"),
+ Email: sw.PtrString("lang1@test.com"),
+ Phone: sw.PtrString("5101112222"),
+ UserStatus: sw.PtrInt32(1),
},
sw.User{
- Id: int64(1002),
- FirstName: "gopher2",
- LastName: "lang2",
- Username: "gopher2",
- Password: "lang2",
- Email: "lang2@test.com",
- Phone: "5101112222",
- UserStatus: int32(1),
+ Id: sw.PtrInt64(1002),
+ FirstName: sw.PtrString("gopher2"),
+ LastName: sw.PtrString("lang2"),
+ Username: sw.PtrString("gopher2"),
+ Password: sw.PtrString("lang2"),
+ Email: sw.PtrString("lang2@test.com"),
+ Phone: sw.PtrString("5101112222"),
+ UserStatus: sw.PtrInt32(1),
},
}
@@ -84,9 +84,9 @@ func TestGetUserByName(t *testing.T) {
if err != nil {
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")
- assert.Equal(resp.LastName, "lang", "Last name should be lang")
+ assert.Equal(*resp.Id, int64(1000), "User id should be equal")
+ assert.Equal(*resp.Username, "gopher", "User name should be gopher")
+ assert.Equal(*resp.LastName, "lang", "Last name should be lang")
//t.Log(resp)
}
if apiResponse.StatusCode != 200 {
@@ -113,14 +113,14 @@ func TestUpdateUser(t *testing.T) {
assert := assert.New(t)
newUser := sw.User{
- Id: 1000,
- FirstName: "gopher20",
- LastName: "lang20",
- Username: "gopher",
- Password: "lang",
- Email: "lang@test.com",
- Phone: "5101112222",
- UserStatus: 1}
+ Id: sw.PtrInt64(1000),
+ FirstName: sw.PtrString("gopher20"),
+ LastName: sw.PtrString("lang20"),
+ Username: sw.PtrString("gopher"),
+ Password: sw.PtrString("lang"),
+ Email: sw.PtrString("lang@test.com"),
+ Phone: sw.PtrString("5101112222"),
+ UserStatus: sw.PtrInt32(1)}
apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher", newUser)
if err != nil {
@@ -135,9 +135,9 @@ func TestUpdateUser(t *testing.T) {
if err != nil {
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")
- assert.Equal(resp.Password, "lang", "User name should be the same")
+ assert.Equal(*resp.Id, int64(1000), "User id should be equal")
+ assert.Equal(*resp.FirstName, "gopher20", "User name should be gopher")
+ assert.Equal(*resp.Password, "lang", "User name should be the same")
}
}
diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle
index af30107a4f..f05dc55cd7 100644
--- a/samples/client/petstore/java/feign/build.gradle
+++ b/samples/client/petstore/java/feign/build.gradle
@@ -107,6 +107,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "io.github.openfeign:feign-core:$feign_version"
compile "io.github.openfeign:feign-jackson:$feign_version"
compile "io.github.openfeign:feign-slf4j:$feign_version"
diff --git a/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml
index d354a95b03..a55c44d654 100644
--- a/samples/client/petstore/java/feign/pom.xml
+++ b/samples/client/petstore/java/feign/pom.xml
@@ -192,6 +192,13 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
io.github.openfeign
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
index d223a661f8..69d6a81729 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesAnyType extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
index db738129d0..0147a592b7 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesArray extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
index 754ff32555..89aa511c2a 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesBoolean extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index 2de7a27185..cb955d1165 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -80,6 +80,7 @@ public class AdditionalPropertiesClass {
* Get mapString
* @return mapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapString() {
return mapString;
@@ -106,6 +107,7 @@ public class AdditionalPropertiesClass {
* Get mapNumber
* @return mapNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapNumber() {
return mapNumber;
@@ -132,6 +134,7 @@ public class AdditionalPropertiesClass {
* Get mapInteger
* @return mapInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapInteger() {
return mapInteger;
@@ -158,6 +161,7 @@ public class AdditionalPropertiesClass {
* Get mapBoolean
* @return mapBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapBoolean() {
return mapBoolean;
@@ -184,6 +188,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger
* @return mapArrayInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayInteger() {
return mapArrayInteger;
@@ -210,6 +215,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayAnytype() {
return mapArrayAnytype;
@@ -236,6 +242,7 @@ public class AdditionalPropertiesClass {
* Get mapMapString
* @return mapMapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapString() {
return mapMapString;
@@ -262,6 +269,7 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype
* @return mapMapAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapAnytype() {
return mapMapAnytype;
@@ -280,6 +288,7 @@ public class AdditionalPropertiesClass {
* Get anytype1
* @return anytype1
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype1() {
return anytype1;
@@ -298,6 +307,7 @@ public class AdditionalPropertiesClass {
* Get anytype2
* @return anytype2
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype2() {
return anytype2;
@@ -316,6 +326,7 @@ public class AdditionalPropertiesClass {
* Get anytype3
* @return anytype3
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype3() {
return anytype3;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
index 1f61976466..f27ff011de 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesInteger extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
index 474d7b8f04..479696fdce 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesNumber extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
index 40ff424fe4..bd569b0da3 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesObject extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
index eeaedf3bda..27e03a2313 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesString extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java
index f210737e12..dc16717ac3 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java
@@ -67,6 +67,7 @@ public class Animal {
* Get color
* @return color
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
index f5c02b2326..b670ecb66e 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayNumber() {
return arrayArrayNumber;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
index 2dcfdf3c78..9d6997f88f 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfNumberOnly {
* Get arrayNumber
* @return arrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayNumber() {
return arrayNumber;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java
index 0778fc2d8f..7dc235f0a9 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -55,6 +55,7 @@ public class ArrayTest {
* Get arrayOfString
* @return arrayOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayOfString() {
return arrayOfString;
@@ -81,6 +82,7 @@ public class ArrayTest {
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
@@ -107,6 +109,7 @@ public class ArrayTest {
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfModel() {
return arrayArrayOfModel;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java
index cedbd8c9db..3f3df29d5d 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -53,6 +53,7 @@ public class Capitalization {
* Get smallCamel
* @return smallCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
@@ -71,6 +72,7 @@ public class Capitalization {
* Get capitalCamel
* @return capitalCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
@@ -89,6 +91,7 @@ public class Capitalization {
* Get smallSnake
* @return smallSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
@@ -107,6 +110,7 @@ public class Capitalization {
* Get capitalSnake
* @return capitalSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
@@ -125,6 +129,7 @@ public class Capitalization {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
@@ -143,6 +148,7 @@ public class Capitalization {
* Name of the pet
* @return ATT_NAME
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java
index 91cffa9f32..3f770e0791 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java
@@ -40,6 +40,7 @@ public class Cat extends Animal {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java
index 93f6f6d59c..9a258b81bf 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java
@@ -38,6 +38,7 @@ public class CatAllOf {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java
index baf44c948a..3eccd2cd92 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java
@@ -41,6 +41,7 @@ public class Category {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java
index 0904f531de..2aaed27fff 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -39,6 +39,7 @@ public class ClassModel {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java
index 9ebcc7294e..458e812960 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java
@@ -38,6 +38,7 @@ public class Client {
* Get client
* @return client
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java
index 3b1c570cb4..83f5cb0e27 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java
@@ -40,6 +40,7 @@ public class Dog extends Animal {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java
index cb95a6a372..d1e1402789 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java
@@ -38,6 +38,7 @@ public class DogAllOf {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java
index cb8d45860a..368b481f7e 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java
@@ -113,6 +113,7 @@ public class EnumArrays {
* Get justSymbol
* @return justSymbol
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
@@ -139,6 +140,7 @@ public class EnumArrays {
* Get arrayEnum
* @return arrayEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayEnum() {
return arrayEnum;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java
index bdf61d52c9..b365a8a56f 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -195,6 +195,7 @@ public class EnumTest {
* Get enumString
* @return enumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
@@ -231,6 +232,7 @@ public class EnumTest {
* Get enumInteger
* @return enumInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
@@ -249,6 +251,7 @@ public class EnumTest {
* Get enumNumber
* @return enumNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
@@ -267,6 +270,7 @@ public class EnumTest {
* Get outerEnum
* @return outerEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
index 326b1a90a3..ca73764280 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -43,6 +43,7 @@ public class FileSchemaTestClass {
* Get file
* @return file
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public java.io.File getFile() {
return file;
@@ -69,6 +70,7 @@ public class FileSchemaTestClass {
* Get files
* @return files
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getFiles() {
return files;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java
index dd1c2d2f58..00d132529e 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -81,6 +81,7 @@ public class FormatTest {
* maximum: 100
* @return integer
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
@@ -101,6 +102,7 @@ public class FormatTest {
* maximum: 200
* @return int32
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
@@ -119,6 +121,7 @@ public class FormatTest {
* Get int64
* @return int64
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
@@ -159,6 +162,7 @@ public class FormatTest {
* maximum: 987.6
* @return _float
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
@@ -179,6 +183,7 @@ public class FormatTest {
* maximum: 123.4
* @return _double
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
@@ -197,6 +202,7 @@ public class FormatTest {
* Get string
* @return string
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getString() {
return string;
@@ -233,6 +239,7 @@ public class FormatTest {
* Get binary
* @return binary
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public File getBinary() {
return binary;
@@ -269,6 +276,7 @@ public class FormatTest {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -287,6 +295,7 @@ public class FormatTest {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
index 4dbede6b7d..e9453bb6cc 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
@@ -36,6 +36,7 @@ public class HasOnlyReadOnly {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -45,6 +46,7 @@ public class HasOnlyReadOnly {
* Get foo
* @return foo
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java
index 625b6be97d..44cd694057 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java
@@ -93,6 +93,7 @@ public class MapTest {
* Get mapMapOfString
* @return mapMapOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapOfString() {
return mapMapOfString;
@@ -119,6 +120,7 @@ public class MapTest {
* Get mapOfEnumString
* @return mapOfEnumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapOfEnumString() {
return mapOfEnumString;
@@ -145,6 +147,7 @@ public class MapTest {
* Get directMap
* @return directMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getDirectMap() {
return directMap;
@@ -171,6 +174,7 @@ public class MapTest {
* Get indirectMap
* @return indirectMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getIndirectMap() {
return indirectMap;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index 0adbe0caa7..19d808093c 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -50,6 +50,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
@@ -68,6 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -94,6 +96,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map
* @return map
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMap() {
return map;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java
index 3be60ea3ae..39fabeeb6d 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java
@@ -42,6 +42,7 @@ public class Model200Response {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getName() {
return name;
@@ -60,6 +61,7 @@ public class Model200Response {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java
index 6e458e38dc..bb33412951 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java
@@ -44,6 +44,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
@@ -62,6 +63,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getType() {
return type;
@@ -80,6 +82,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMessage() {
return message;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java
index 62e5295212..9aafb13e04 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java
@@ -39,6 +39,7 @@ public class ModelReturn {
* Get _return
* @return _return
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java
index 852a999035..9518276dd6 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java
@@ -61,6 +61,7 @@ public class Name {
* Get snakeCase
* @return snakeCase
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
@@ -75,6 +76,7 @@ public class Name {
* Get property
* @return property
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getProperty() {
return property;
@@ -88,6 +90,7 @@ public class Name {
* Get _123number
* @return _123number
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer get123number() {
return _123number;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java
index 530a4d5818..0245e8e210 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java
@@ -39,6 +39,7 @@ public class NumberOnly {
* Get justNumber
* @return justNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java
index 7e705c58a2..f72f97defc 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java
@@ -91,6 +91,7 @@ public class Order {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -109,6 +110,7 @@ public class Order {
* Get petId
* @return petId
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getPetId() {
return petId;
@@ -127,6 +129,7 @@ public class Order {
* Get quantity
* @return quantity
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getQuantity() {
return quantity;
@@ -145,6 +148,7 @@ public class Order {
* Get shipDate
* @return shipDate
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getShipDate() {
return shipDate;
@@ -163,6 +167,7 @@ public class Order {
* Order Status
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() {
return status;
@@ -181,6 +186,7 @@ public class Order {
* Get complete
* @return complete
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isComplete() {
return complete;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java
index 3a99006820..8fcdb3b130 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java
@@ -45,6 +45,7 @@ public class OuterComposite {
* Get myNumber
* @return myNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getMyNumber() {
return myNumber;
@@ -63,6 +64,7 @@ public class OuterComposite {
* Get myString
* @return myString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMyString() {
return myString;
@@ -81,6 +83,7 @@ public class OuterComposite {
* Get myBoolean
* @return myBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isMyBoolean() {
return myBoolean;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java
index 8a2408a296..a7d92129d7 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java
@@ -94,6 +94,7 @@ public class Pet {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -112,6 +113,7 @@ public class Pet {
* Get category
* @return category
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
@@ -179,6 +181,7 @@ public class Pet {
* Get tags
* @return tags
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getTags() {
return tags;
@@ -197,6 +200,7 @@ public class Pet {
* pet status in the store
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
index 83f25c7923..1379ee09ea 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
@@ -36,6 +36,7 @@ public class ReadOnlyFirst {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -50,6 +51,7 @@ public class ReadOnlyFirst {
* Get baz
* @return baz
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java
index 5abfc132ad..869771afad 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java
@@ -38,6 +38,7 @@ public class SpecialModelName {
* Get $specialPropertyName
* @return $specialPropertyName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long get$SpecialPropertyName() {
return $specialPropertyName;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java
index e2e947b84a..4bb498aff4 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java
@@ -41,6 +41,7 @@ public class Tag {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -59,6 +60,7 @@ public class Tag {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java
index ee3f656a1a..73164c3ee2 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java
@@ -59,6 +59,7 @@ public class User {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -77,6 +78,7 @@ public class User {
* Get username
* @return username
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getUsername() {
return username;
@@ -95,6 +97,7 @@ public class User {
* Get firstName
* @return firstName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
@@ -113,6 +116,7 @@ public class User {
* Get lastName
* @return lastName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
@@ -131,6 +135,7 @@ public class User {
* Get email
* @return email
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getEmail() {
return email;
@@ -149,6 +154,7 @@ public class User {
* Get password
* @return password
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPassword() {
return password;
@@ -167,6 +173,7 @@ public class User {
* Get phone
* @return phone
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
@@ -185,6 +192,7 @@ public class User {
* User Status
* @return userStatus
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java
index 85c9dc3eb4..9ee6eca908 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java
@@ -125,6 +125,7 @@ public class XmlItem {
* Get attributeString
* @return attributeString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
@@ -143,6 +144,7 @@ public class XmlItem {
* Get attributeNumber
* @return attributeNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
@@ -161,6 +163,7 @@ public class XmlItem {
* Get attributeInteger
* @return attributeInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
@@ -179,6 +182,7 @@ public class XmlItem {
* Get attributeBoolean
* @return attributeBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isAttributeBoolean() {
return attributeBoolean;
@@ -205,6 +209,7 @@ public class XmlItem {
* Get wrappedArray
* @return wrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getWrappedArray() {
return wrappedArray;
@@ -223,6 +228,7 @@ public class XmlItem {
* Get nameString
* @return nameString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
@@ -241,6 +247,7 @@ public class XmlItem {
* Get nameNumber
* @return nameNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
@@ -259,6 +266,7 @@ public class XmlItem {
* Get nameInteger
* @return nameInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
@@ -277,6 +285,7 @@ public class XmlItem {
* Get nameBoolean
* @return nameBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isNameBoolean() {
return nameBoolean;
@@ -303,6 +312,7 @@ public class XmlItem {
* Get nameArray
* @return nameArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameArray() {
return nameArray;
@@ -329,6 +339,7 @@ public class XmlItem {
* Get nameWrappedArray
* @return nameWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameWrappedArray() {
return nameWrappedArray;
@@ -347,6 +358,7 @@ public class XmlItem {
* Get prefixString
* @return prefixString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
@@ -365,6 +377,7 @@ public class XmlItem {
* Get prefixNumber
* @return prefixNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
@@ -383,6 +396,7 @@ public class XmlItem {
* Get prefixInteger
* @return prefixInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
@@ -401,6 +415,7 @@ public class XmlItem {
* Get prefixBoolean
* @return prefixBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isPrefixBoolean() {
return prefixBoolean;
@@ -427,6 +442,7 @@ public class XmlItem {
* Get prefixArray
* @return prefixArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixArray() {
return prefixArray;
@@ -453,6 +469,7 @@ public class XmlItem {
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixWrappedArray() {
return prefixWrappedArray;
@@ -471,6 +488,7 @@ public class XmlItem {
* Get namespaceString
* @return namespaceString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
@@ -489,6 +507,7 @@ public class XmlItem {
* Get namespaceNumber
* @return namespaceNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
@@ -507,6 +526,7 @@ public class XmlItem {
* Get namespaceInteger
* @return namespaceInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
@@ -525,6 +545,7 @@ public class XmlItem {
* Get namespaceBoolean
* @return namespaceBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isNamespaceBoolean() {
return namespaceBoolean;
@@ -551,6 +572,7 @@ public class XmlItem {
* Get namespaceArray
* @return namespaceArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceArray() {
return namespaceArray;
@@ -577,6 +599,7 @@ public class XmlItem {
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceWrappedArray() {
return namespaceWrappedArray;
@@ -595,6 +618,7 @@ public class XmlItem {
* Get prefixNsString
* @return prefixNsString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
@@ -613,6 +637,7 @@ public class XmlItem {
* Get prefixNsNumber
* @return prefixNsNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
@@ -631,6 +656,7 @@ public class XmlItem {
* Get prefixNsInteger
* @return prefixNsInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
@@ -649,6 +675,7 @@ public class XmlItem {
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isPrefixNsBoolean() {
return prefixNsBoolean;
@@ -675,6 +702,7 @@ public class XmlItem {
* Get prefixNsArray
* @return prefixNsArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsArray() {
return prefixNsArray;
@@ -701,6 +729,7 @@ public class XmlItem {
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign10x/build.gradle
index 6eaeb4b872..39c2746905 100644
--- a/samples/client/petstore/java/feign10x/build.gradle
+++ b/samples/client/petstore/java/feign10x/build.gradle
@@ -107,6 +107,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "io.github.openfeign:feign-core:$feign_version"
compile "io.github.openfeign:feign-jackson:$feign_version"
compile "io.github.openfeign:feign-slf4j:$feign_version"
diff --git a/samples/client/petstore/java/feign10x/pom.xml b/samples/client/petstore/java/feign10x/pom.xml
index 7f402f8e0e..0bf621890f 100644
--- a/samples/client/petstore/java/feign10x/pom.xml
+++ b/samples/client/petstore/java/feign10x/pom.xml
@@ -192,6 +192,13 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
io.github.openfeign
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
index d223a661f8..69d6a81729 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesAnyType extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
index db738129d0..0147a592b7 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesArray extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
index 754ff32555..89aa511c2a 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesBoolean extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index 2de7a27185..cb955d1165 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -80,6 +80,7 @@ public class AdditionalPropertiesClass {
* Get mapString
* @return mapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapString() {
return mapString;
@@ -106,6 +107,7 @@ public class AdditionalPropertiesClass {
* Get mapNumber
* @return mapNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapNumber() {
return mapNumber;
@@ -132,6 +134,7 @@ public class AdditionalPropertiesClass {
* Get mapInteger
* @return mapInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapInteger() {
return mapInteger;
@@ -158,6 +161,7 @@ public class AdditionalPropertiesClass {
* Get mapBoolean
* @return mapBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapBoolean() {
return mapBoolean;
@@ -184,6 +188,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger
* @return mapArrayInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayInteger() {
return mapArrayInteger;
@@ -210,6 +215,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayAnytype() {
return mapArrayAnytype;
@@ -236,6 +242,7 @@ public class AdditionalPropertiesClass {
* Get mapMapString
* @return mapMapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapString() {
return mapMapString;
@@ -262,6 +269,7 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype
* @return mapMapAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapAnytype() {
return mapMapAnytype;
@@ -280,6 +288,7 @@ public class AdditionalPropertiesClass {
* Get anytype1
* @return anytype1
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype1() {
return anytype1;
@@ -298,6 +307,7 @@ public class AdditionalPropertiesClass {
* Get anytype2
* @return anytype2
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype2() {
return anytype2;
@@ -316,6 +326,7 @@ public class AdditionalPropertiesClass {
* Get anytype3
* @return anytype3
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype3() {
return anytype3;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
index 1f61976466..f27ff011de 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesInteger extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
index 474d7b8f04..479696fdce 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesNumber extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
index 40ff424fe4..bd569b0da3 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesObject extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
index eeaedf3bda..27e03a2313 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesString extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java
index f210737e12..dc16717ac3 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java
@@ -67,6 +67,7 @@ public class Animal {
* Get color
* @return color
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
index f5c02b2326..b670ecb66e 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayNumber() {
return arrayArrayNumber;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
index 2dcfdf3c78..9d6997f88f 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfNumberOnly {
* Get arrayNumber
* @return arrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayNumber() {
return arrayNumber;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java
index 0778fc2d8f..7dc235f0a9 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -55,6 +55,7 @@ public class ArrayTest {
* Get arrayOfString
* @return arrayOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayOfString() {
return arrayOfString;
@@ -81,6 +82,7 @@ public class ArrayTest {
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
@@ -107,6 +109,7 @@ public class ArrayTest {
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfModel() {
return arrayArrayOfModel;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java
index cedbd8c9db..3f3df29d5d 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -53,6 +53,7 @@ public class Capitalization {
* Get smallCamel
* @return smallCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
@@ -71,6 +72,7 @@ public class Capitalization {
* Get capitalCamel
* @return capitalCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
@@ -89,6 +91,7 @@ public class Capitalization {
* Get smallSnake
* @return smallSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
@@ -107,6 +110,7 @@ public class Capitalization {
* Get capitalSnake
* @return capitalSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
@@ -125,6 +129,7 @@ public class Capitalization {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
@@ -143,6 +148,7 @@ public class Capitalization {
* Name of the pet
* @return ATT_NAME
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java
index 91cffa9f32..3f770e0791 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java
@@ -40,6 +40,7 @@ public class Cat extends Animal {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java
index 93f6f6d59c..9a258b81bf 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java
@@ -38,6 +38,7 @@ public class CatAllOf {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java
index baf44c948a..3eccd2cd92 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java
@@ -41,6 +41,7 @@ public class Category {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java
index 0904f531de..2aaed27fff 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -39,6 +39,7 @@ public class ClassModel {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java
index 9ebcc7294e..458e812960 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java
@@ -38,6 +38,7 @@ public class Client {
* Get client
* @return client
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java
index 3b1c570cb4..83f5cb0e27 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java
@@ -40,6 +40,7 @@ public class Dog extends Animal {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java
index cb95a6a372..d1e1402789 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java
@@ -38,6 +38,7 @@ public class DogAllOf {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java
index cb8d45860a..368b481f7e 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java
@@ -113,6 +113,7 @@ public class EnumArrays {
* Get justSymbol
* @return justSymbol
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
@@ -139,6 +140,7 @@ public class EnumArrays {
* Get arrayEnum
* @return arrayEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayEnum() {
return arrayEnum;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java
index bdf61d52c9..b365a8a56f 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -195,6 +195,7 @@ public class EnumTest {
* Get enumString
* @return enumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
@@ -231,6 +232,7 @@ public class EnumTest {
* Get enumInteger
* @return enumInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
@@ -249,6 +251,7 @@ public class EnumTest {
* Get enumNumber
* @return enumNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
@@ -267,6 +270,7 @@ public class EnumTest {
* Get outerEnum
* @return outerEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
index 326b1a90a3..ca73764280 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -43,6 +43,7 @@ public class FileSchemaTestClass {
* Get file
* @return file
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public java.io.File getFile() {
return file;
@@ -69,6 +70,7 @@ public class FileSchemaTestClass {
* Get files
* @return files
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getFiles() {
return files;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java
index dd1c2d2f58..00d132529e 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -81,6 +81,7 @@ public class FormatTest {
* maximum: 100
* @return integer
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
@@ -101,6 +102,7 @@ public class FormatTest {
* maximum: 200
* @return int32
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
@@ -119,6 +121,7 @@ public class FormatTest {
* Get int64
* @return int64
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
@@ -159,6 +162,7 @@ public class FormatTest {
* maximum: 987.6
* @return _float
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
@@ -179,6 +183,7 @@ public class FormatTest {
* maximum: 123.4
* @return _double
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
@@ -197,6 +202,7 @@ public class FormatTest {
* Get string
* @return string
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getString() {
return string;
@@ -233,6 +239,7 @@ public class FormatTest {
* Get binary
* @return binary
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public File getBinary() {
return binary;
@@ -269,6 +276,7 @@ public class FormatTest {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -287,6 +295,7 @@ public class FormatTest {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
index 4dbede6b7d..e9453bb6cc 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
@@ -36,6 +36,7 @@ public class HasOnlyReadOnly {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -45,6 +46,7 @@ public class HasOnlyReadOnly {
* Get foo
* @return foo
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java
index 625b6be97d..44cd694057 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java
@@ -93,6 +93,7 @@ public class MapTest {
* Get mapMapOfString
* @return mapMapOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapOfString() {
return mapMapOfString;
@@ -119,6 +120,7 @@ public class MapTest {
* Get mapOfEnumString
* @return mapOfEnumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapOfEnumString() {
return mapOfEnumString;
@@ -145,6 +147,7 @@ public class MapTest {
* Get directMap
* @return directMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getDirectMap() {
return directMap;
@@ -171,6 +174,7 @@ public class MapTest {
* Get indirectMap
* @return indirectMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getIndirectMap() {
return indirectMap;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index 0adbe0caa7..19d808093c 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -50,6 +50,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
@@ -68,6 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -94,6 +96,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map
* @return map
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMap() {
return map;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java
index 3be60ea3ae..39fabeeb6d 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java
@@ -42,6 +42,7 @@ public class Model200Response {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getName() {
return name;
@@ -60,6 +61,7 @@ public class Model200Response {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java
index 6e458e38dc..bb33412951 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java
@@ -44,6 +44,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
@@ -62,6 +63,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getType() {
return type;
@@ -80,6 +82,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMessage() {
return message;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java
index 62e5295212..9aafb13e04 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java
@@ -39,6 +39,7 @@ public class ModelReturn {
* Get _return
* @return _return
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java
index 852a999035..9518276dd6 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java
@@ -61,6 +61,7 @@ public class Name {
* Get snakeCase
* @return snakeCase
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
@@ -75,6 +76,7 @@ public class Name {
* Get property
* @return property
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getProperty() {
return property;
@@ -88,6 +90,7 @@ public class Name {
* Get _123number
* @return _123number
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer get123number() {
return _123number;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java
index 530a4d5818..0245e8e210 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java
@@ -39,6 +39,7 @@ public class NumberOnly {
* Get justNumber
* @return justNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java
index 7e705c58a2..f72f97defc 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java
@@ -91,6 +91,7 @@ public class Order {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -109,6 +110,7 @@ public class Order {
* Get petId
* @return petId
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getPetId() {
return petId;
@@ -127,6 +129,7 @@ public class Order {
* Get quantity
* @return quantity
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getQuantity() {
return quantity;
@@ -145,6 +148,7 @@ public class Order {
* Get shipDate
* @return shipDate
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getShipDate() {
return shipDate;
@@ -163,6 +167,7 @@ public class Order {
* Order Status
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() {
return status;
@@ -181,6 +186,7 @@ public class Order {
* Get complete
* @return complete
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isComplete() {
return complete;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java
index 3a99006820..8fcdb3b130 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java
@@ -45,6 +45,7 @@ public class OuterComposite {
* Get myNumber
* @return myNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getMyNumber() {
return myNumber;
@@ -63,6 +64,7 @@ public class OuterComposite {
* Get myString
* @return myString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMyString() {
return myString;
@@ -81,6 +83,7 @@ public class OuterComposite {
* Get myBoolean
* @return myBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isMyBoolean() {
return myBoolean;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java
index 8a2408a296..a7d92129d7 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java
@@ -94,6 +94,7 @@ public class Pet {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -112,6 +113,7 @@ public class Pet {
* Get category
* @return category
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
@@ -179,6 +181,7 @@ public class Pet {
* Get tags
* @return tags
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getTags() {
return tags;
@@ -197,6 +200,7 @@ public class Pet {
* pet status in the store
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
index 83f25c7923..1379ee09ea 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
@@ -36,6 +36,7 @@ public class ReadOnlyFirst {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -50,6 +51,7 @@ public class ReadOnlyFirst {
* Get baz
* @return baz
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java
index 5abfc132ad..869771afad 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java
@@ -38,6 +38,7 @@ public class SpecialModelName {
* Get $specialPropertyName
* @return $specialPropertyName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long get$SpecialPropertyName() {
return $specialPropertyName;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java
index e2e947b84a..4bb498aff4 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java
@@ -41,6 +41,7 @@ public class Tag {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -59,6 +60,7 @@ public class Tag {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java
index ee3f656a1a..73164c3ee2 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java
@@ -59,6 +59,7 @@ public class User {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -77,6 +78,7 @@ public class User {
* Get username
* @return username
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getUsername() {
return username;
@@ -95,6 +97,7 @@ public class User {
* Get firstName
* @return firstName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
@@ -113,6 +116,7 @@ public class User {
* Get lastName
* @return lastName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
@@ -131,6 +135,7 @@ public class User {
* Get email
* @return email
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getEmail() {
return email;
@@ -149,6 +154,7 @@ public class User {
* Get password
* @return password
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPassword() {
return password;
@@ -167,6 +173,7 @@ public class User {
* Get phone
* @return phone
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
@@ -185,6 +192,7 @@ public class User {
* User Status
* @return userStatus
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java
index 85c9dc3eb4..9ee6eca908 100644
--- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java
+++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java
@@ -125,6 +125,7 @@ public class XmlItem {
* Get attributeString
* @return attributeString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
@@ -143,6 +144,7 @@ public class XmlItem {
* Get attributeNumber
* @return attributeNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
@@ -161,6 +163,7 @@ public class XmlItem {
* Get attributeInteger
* @return attributeInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
@@ -179,6 +182,7 @@ public class XmlItem {
* Get attributeBoolean
* @return attributeBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isAttributeBoolean() {
return attributeBoolean;
@@ -205,6 +209,7 @@ public class XmlItem {
* Get wrappedArray
* @return wrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getWrappedArray() {
return wrappedArray;
@@ -223,6 +228,7 @@ public class XmlItem {
* Get nameString
* @return nameString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
@@ -241,6 +247,7 @@ public class XmlItem {
* Get nameNumber
* @return nameNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
@@ -259,6 +266,7 @@ public class XmlItem {
* Get nameInteger
* @return nameInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
@@ -277,6 +285,7 @@ public class XmlItem {
* Get nameBoolean
* @return nameBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isNameBoolean() {
return nameBoolean;
@@ -303,6 +312,7 @@ public class XmlItem {
* Get nameArray
* @return nameArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameArray() {
return nameArray;
@@ -329,6 +339,7 @@ public class XmlItem {
* Get nameWrappedArray
* @return nameWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameWrappedArray() {
return nameWrappedArray;
@@ -347,6 +358,7 @@ public class XmlItem {
* Get prefixString
* @return prefixString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
@@ -365,6 +377,7 @@ public class XmlItem {
* Get prefixNumber
* @return prefixNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
@@ -383,6 +396,7 @@ public class XmlItem {
* Get prefixInteger
* @return prefixInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
@@ -401,6 +415,7 @@ public class XmlItem {
* Get prefixBoolean
* @return prefixBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isPrefixBoolean() {
return prefixBoolean;
@@ -427,6 +442,7 @@ public class XmlItem {
* Get prefixArray
* @return prefixArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixArray() {
return prefixArray;
@@ -453,6 +469,7 @@ public class XmlItem {
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixWrappedArray() {
return prefixWrappedArray;
@@ -471,6 +488,7 @@ public class XmlItem {
* Get namespaceString
* @return namespaceString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
@@ -489,6 +507,7 @@ public class XmlItem {
* Get namespaceNumber
* @return namespaceNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
@@ -507,6 +526,7 @@ public class XmlItem {
* Get namespaceInteger
* @return namespaceInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
@@ -525,6 +545,7 @@ public class XmlItem {
* Get namespaceBoolean
* @return namespaceBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isNamespaceBoolean() {
return namespaceBoolean;
@@ -551,6 +572,7 @@ public class XmlItem {
* Get namespaceArray
* @return namespaceArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceArray() {
return namespaceArray;
@@ -577,6 +599,7 @@ public class XmlItem {
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceWrappedArray() {
return namespaceWrappedArray;
@@ -595,6 +618,7 @@ public class XmlItem {
* Get prefixNsString
* @return prefixNsString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
@@ -613,6 +637,7 @@ public class XmlItem {
* Get prefixNsNumber
* @return prefixNsNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
@@ -631,6 +656,7 @@ public class XmlItem {
* Get prefixNsInteger
* @return prefixNsInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
@@ -649,6 +675,7 @@ public class XmlItem {
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isPrefixNsBoolean() {
return prefixNsBoolean;
@@ -675,6 +702,7 @@ public class XmlItem {
* Get prefixNsArray
* @return prefixNsArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsArray() {
return prefixNsArray;
@@ -701,6 +729,7 @@ public class XmlItem {
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle
index 67e159bb94..ea26f68752 100644
--- a/samples/client/petstore/java/google-api-client/build.gradle
+++ b/samples/client/petstore/java/google-api-client/build.gradle
@@ -107,6 +107,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "com.google.api-client:google-api-client:${google_api_client_version}"
compile "org.glassfish.jersey.core:jersey-common:${jersey_common_version}"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
diff --git a/samples/client/petstore/java/google-api-client/pom.xml b/samples/client/petstore/java/google-api-client/pom.xml
index a030fdb321..314ca64233 100644
--- a/samples/client/petstore/java/google-api-client/pom.xml
+++ b/samples/client/petstore/java/google-api-client/pom.xml
@@ -200,6 +200,12 @@
swagger-annotations
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.google.api-client
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
index d223a661f8..69d6a81729 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesAnyType extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
index db738129d0..0147a592b7 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesArray extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
index 754ff32555..89aa511c2a 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesBoolean extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index 2de7a27185..cb955d1165 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -80,6 +80,7 @@ public class AdditionalPropertiesClass {
* Get mapString
* @return mapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapString() {
return mapString;
@@ -106,6 +107,7 @@ public class AdditionalPropertiesClass {
* Get mapNumber
* @return mapNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapNumber() {
return mapNumber;
@@ -132,6 +134,7 @@ public class AdditionalPropertiesClass {
* Get mapInteger
* @return mapInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapInteger() {
return mapInteger;
@@ -158,6 +161,7 @@ public class AdditionalPropertiesClass {
* Get mapBoolean
* @return mapBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapBoolean() {
return mapBoolean;
@@ -184,6 +188,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger
* @return mapArrayInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayInteger() {
return mapArrayInteger;
@@ -210,6 +215,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayAnytype() {
return mapArrayAnytype;
@@ -236,6 +242,7 @@ public class AdditionalPropertiesClass {
* Get mapMapString
* @return mapMapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapString() {
return mapMapString;
@@ -262,6 +269,7 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype
* @return mapMapAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapAnytype() {
return mapMapAnytype;
@@ -280,6 +288,7 @@ public class AdditionalPropertiesClass {
* Get anytype1
* @return anytype1
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype1() {
return anytype1;
@@ -298,6 +307,7 @@ public class AdditionalPropertiesClass {
* Get anytype2
* @return anytype2
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype2() {
return anytype2;
@@ -316,6 +326,7 @@ public class AdditionalPropertiesClass {
* Get anytype3
* @return anytype3
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype3() {
return anytype3;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
index 1f61976466..f27ff011de 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesInteger extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
index 474d7b8f04..479696fdce 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesNumber extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
index 40ff424fe4..bd569b0da3 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesObject extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
index eeaedf3bda..27e03a2313 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesString extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java
index f210737e12..dc16717ac3 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Animal.java
@@ -67,6 +67,7 @@ public class Animal {
* Get color
* @return color
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
index f5c02b2326..b670ecb66e 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayNumber() {
return arrayArrayNumber;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
index 2dcfdf3c78..9d6997f88f 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfNumberOnly {
* Get arrayNumber
* @return arrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayNumber() {
return arrayNumber;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java
index 0778fc2d8f..7dc235f0a9 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -55,6 +55,7 @@ public class ArrayTest {
* Get arrayOfString
* @return arrayOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayOfString() {
return arrayOfString;
@@ -81,6 +82,7 @@ public class ArrayTest {
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
@@ -107,6 +109,7 @@ public class ArrayTest {
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfModel() {
return arrayArrayOfModel;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java
index cedbd8c9db..3f3df29d5d 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -53,6 +53,7 @@ public class Capitalization {
* Get smallCamel
* @return smallCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
@@ -71,6 +72,7 @@ public class Capitalization {
* Get capitalCamel
* @return capitalCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
@@ -89,6 +91,7 @@ public class Capitalization {
* Get smallSnake
* @return smallSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
@@ -107,6 +110,7 @@ public class Capitalization {
* Get capitalSnake
* @return capitalSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
@@ -125,6 +129,7 @@ public class Capitalization {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
@@ -143,6 +148,7 @@ public class Capitalization {
* Name of the pet
* @return ATT_NAME
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java
index 40f40f869e..a8108d6f15 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Cat.java
@@ -40,6 +40,7 @@ public class Cat extends Animal {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java
index 0e8a7f8fa9..42e9614610 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java
@@ -38,6 +38,7 @@ public class CatAllOf {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java
index baf44c948a..3eccd2cd92 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Category.java
@@ -41,6 +41,7 @@ public class Category {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java
index 0904f531de..2aaed27fff 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -39,6 +39,7 @@ public class ClassModel {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java
index 9ebcc7294e..458e812960 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Client.java
@@ -38,6 +38,7 @@ public class Client {
* Get client
* @return client
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java
index 3b1c570cb4..83f5cb0e27 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Dog.java
@@ -40,6 +40,7 @@ public class Dog extends Animal {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java
index cb95a6a372..d1e1402789 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java
@@ -38,6 +38,7 @@ public class DogAllOf {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java
index cb8d45860a..368b481f7e 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumArrays.java
@@ -113,6 +113,7 @@ public class EnumArrays {
* Get justSymbol
* @return justSymbol
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
@@ -139,6 +140,7 @@ public class EnumArrays {
* Get arrayEnum
* @return arrayEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayEnum() {
return arrayEnum;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java
index bdf61d52c9..b365a8a56f 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -195,6 +195,7 @@ public class EnumTest {
* Get enumString
* @return enumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
@@ -231,6 +232,7 @@ public class EnumTest {
* Get enumInteger
* @return enumInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
@@ -249,6 +251,7 @@ public class EnumTest {
* Get enumNumber
* @return enumNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
@@ -267,6 +270,7 @@ public class EnumTest {
* Get outerEnum
* @return outerEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
index 326b1a90a3..ca73764280 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -43,6 +43,7 @@ public class FileSchemaTestClass {
* Get file
* @return file
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public java.io.File getFile() {
return file;
@@ -69,6 +70,7 @@ public class FileSchemaTestClass {
* Get files
* @return files
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getFiles() {
return files;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java
index dd1c2d2f58..00d132529e 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -81,6 +81,7 @@ public class FormatTest {
* maximum: 100
* @return integer
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
@@ -101,6 +102,7 @@ public class FormatTest {
* maximum: 200
* @return int32
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
@@ -119,6 +121,7 @@ public class FormatTest {
* Get int64
* @return int64
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
@@ -159,6 +162,7 @@ public class FormatTest {
* maximum: 987.6
* @return _float
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
@@ -179,6 +183,7 @@ public class FormatTest {
* maximum: 123.4
* @return _double
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
@@ -197,6 +202,7 @@ public class FormatTest {
* Get string
* @return string
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getString() {
return string;
@@ -233,6 +239,7 @@ public class FormatTest {
* Get binary
* @return binary
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public File getBinary() {
return binary;
@@ -269,6 +276,7 @@ public class FormatTest {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -287,6 +295,7 @@ public class FormatTest {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
index 4dbede6b7d..e9453bb6cc 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
@@ -36,6 +36,7 @@ public class HasOnlyReadOnly {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -45,6 +46,7 @@ public class HasOnlyReadOnly {
* Get foo
* @return foo
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java
index 625b6be97d..44cd694057 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java
@@ -93,6 +93,7 @@ public class MapTest {
* Get mapMapOfString
* @return mapMapOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapOfString() {
return mapMapOfString;
@@ -119,6 +120,7 @@ public class MapTest {
* Get mapOfEnumString
* @return mapOfEnumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapOfEnumString() {
return mapOfEnumString;
@@ -145,6 +147,7 @@ public class MapTest {
* Get directMap
* @return directMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getDirectMap() {
return directMap;
@@ -171,6 +174,7 @@ public class MapTest {
* Get indirectMap
* @return indirectMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getIndirectMap() {
return indirectMap;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index 0adbe0caa7..19d808093c 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -50,6 +50,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
@@ -68,6 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -94,6 +96,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map
* @return map
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMap() {
return map;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java
index 3be60ea3ae..39fabeeb6d 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Model200Response.java
@@ -42,6 +42,7 @@ public class Model200Response {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getName() {
return name;
@@ -60,6 +61,7 @@ public class Model200Response {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java
index 6e458e38dc..bb33412951 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java
@@ -44,6 +44,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
@@ -62,6 +63,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getType() {
return type;
@@ -80,6 +82,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMessage() {
return message;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java
index 62e5295212..9aafb13e04 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ModelReturn.java
@@ -39,6 +39,7 @@ public class ModelReturn {
* Get _return
* @return _return
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java
index 852a999035..9518276dd6 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Name.java
@@ -61,6 +61,7 @@ public class Name {
* Get snakeCase
* @return snakeCase
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
@@ -75,6 +76,7 @@ public class Name {
* Get property
* @return property
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getProperty() {
return property;
@@ -88,6 +90,7 @@ public class Name {
* Get _123number
* @return _123number
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer get123number() {
return _123number;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java
index 530a4d5818..0245e8e210 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NumberOnly.java
@@ -39,6 +39,7 @@ public class NumberOnly {
* Get justNumber
* @return justNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java
index c6cee16a58..a9e2986a2f 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Order.java
@@ -91,6 +91,7 @@ public class Order {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -109,6 +110,7 @@ public class Order {
* Get petId
* @return petId
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getPetId() {
return petId;
@@ -127,6 +129,7 @@ public class Order {
* Get quantity
* @return quantity
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getQuantity() {
return quantity;
@@ -145,6 +148,7 @@ public class Order {
* Get shipDate
* @return shipDate
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getShipDate() {
return shipDate;
@@ -163,6 +167,7 @@ public class Order {
* Order Status
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() {
return status;
@@ -181,6 +186,7 @@ public class Order {
* Get complete
* @return complete
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getComplete() {
return complete;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java
index 6e71242384..c8bd99011c 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java
@@ -45,6 +45,7 @@ public class OuterComposite {
* Get myNumber
* @return myNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getMyNumber() {
return myNumber;
@@ -63,6 +64,7 @@ public class OuterComposite {
* Get myString
* @return myString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMyString() {
return myString;
@@ -81,6 +83,7 @@ public class OuterComposite {
* Get myBoolean
* @return myBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getMyBoolean() {
return myBoolean;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java
index 8a2408a296..a7d92129d7 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Pet.java
@@ -94,6 +94,7 @@ public class Pet {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -112,6 +113,7 @@ public class Pet {
* Get category
* @return category
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
@@ -179,6 +181,7 @@ public class Pet {
* Get tags
* @return tags
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getTags() {
return tags;
@@ -197,6 +200,7 @@ public class Pet {
* pet status in the store
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
index 83f25c7923..1379ee09ea 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
@@ -36,6 +36,7 @@ public class ReadOnlyFirst {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -50,6 +51,7 @@ public class ReadOnlyFirst {
* Get baz
* @return baz
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java
index 5abfc132ad..869771afad 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SpecialModelName.java
@@ -38,6 +38,7 @@ public class SpecialModelName {
* Get $specialPropertyName
* @return $specialPropertyName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long get$SpecialPropertyName() {
return $specialPropertyName;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java
index e2e947b84a..4bb498aff4 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Tag.java
@@ -41,6 +41,7 @@ public class Tag {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -59,6 +60,7 @@ public class Tag {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java
index ee3f656a1a..73164c3ee2 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/User.java
@@ -59,6 +59,7 @@ public class User {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -77,6 +78,7 @@ public class User {
* Get username
* @return username
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getUsername() {
return username;
@@ -95,6 +97,7 @@ public class User {
* Get firstName
* @return firstName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
@@ -113,6 +116,7 @@ public class User {
* Get lastName
* @return lastName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
@@ -131,6 +135,7 @@ public class User {
* Get email
* @return email
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getEmail() {
return email;
@@ -149,6 +154,7 @@ public class User {
* Get password
* @return password
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPassword() {
return password;
@@ -167,6 +173,7 @@ public class User {
* Get phone
* @return phone
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
@@ -185,6 +192,7 @@ public class User {
* User Status
* @return userStatus
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java
index cb31157306..9032c23424 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/XmlItem.java
@@ -125,6 +125,7 @@ public class XmlItem {
* Get attributeString
* @return attributeString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
@@ -143,6 +144,7 @@ public class XmlItem {
* Get attributeNumber
* @return attributeNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
@@ -161,6 +163,7 @@ public class XmlItem {
* Get attributeInteger
* @return attributeInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
@@ -179,6 +182,7 @@ public class XmlItem {
* Get attributeBoolean
* @return attributeBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getAttributeBoolean() {
return attributeBoolean;
@@ -205,6 +209,7 @@ public class XmlItem {
* Get wrappedArray
* @return wrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getWrappedArray() {
return wrappedArray;
@@ -223,6 +228,7 @@ public class XmlItem {
* Get nameString
* @return nameString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
@@ -241,6 +247,7 @@ public class XmlItem {
* Get nameNumber
* @return nameNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
@@ -259,6 +266,7 @@ public class XmlItem {
* Get nameInteger
* @return nameInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
@@ -277,6 +285,7 @@ public class XmlItem {
* Get nameBoolean
* @return nameBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNameBoolean() {
return nameBoolean;
@@ -303,6 +312,7 @@ public class XmlItem {
* Get nameArray
* @return nameArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameArray() {
return nameArray;
@@ -329,6 +339,7 @@ public class XmlItem {
* Get nameWrappedArray
* @return nameWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameWrappedArray() {
return nameWrappedArray;
@@ -347,6 +358,7 @@ public class XmlItem {
* Get prefixString
* @return prefixString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
@@ -365,6 +377,7 @@ public class XmlItem {
* Get prefixNumber
* @return prefixNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
@@ -383,6 +396,7 @@ public class XmlItem {
* Get prefixInteger
* @return prefixInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
@@ -401,6 +415,7 @@ public class XmlItem {
* Get prefixBoolean
* @return prefixBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixBoolean() {
return prefixBoolean;
@@ -427,6 +442,7 @@ public class XmlItem {
* Get prefixArray
* @return prefixArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixArray() {
return prefixArray;
@@ -453,6 +469,7 @@ public class XmlItem {
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixWrappedArray() {
return prefixWrappedArray;
@@ -471,6 +488,7 @@ public class XmlItem {
* Get namespaceString
* @return namespaceString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
@@ -489,6 +507,7 @@ public class XmlItem {
* Get namespaceNumber
* @return namespaceNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
@@ -507,6 +526,7 @@ public class XmlItem {
* Get namespaceInteger
* @return namespaceInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
@@ -525,6 +545,7 @@ public class XmlItem {
* Get namespaceBoolean
* @return namespaceBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNamespaceBoolean() {
return namespaceBoolean;
@@ -551,6 +572,7 @@ public class XmlItem {
* Get namespaceArray
* @return namespaceArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceArray() {
return namespaceArray;
@@ -577,6 +599,7 @@ public class XmlItem {
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceWrappedArray() {
return namespaceWrappedArray;
@@ -595,6 +618,7 @@ public class XmlItem {
* Get prefixNsString
* @return prefixNsString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
@@ -613,6 +637,7 @@ public class XmlItem {
* Get prefixNsNumber
* @return prefixNsNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
@@ -631,6 +656,7 @@ public class XmlItem {
* Get prefixNsInteger
* @return prefixNsInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
@@ -649,6 +675,7 @@ public class XmlItem {
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixNsBoolean() {
return prefixNsBoolean;
@@ -675,6 +702,7 @@ public class XmlItem {
* Get prefixNsArray
* @return prefixNsArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsArray() {
return prefixNsArray;
@@ -701,6 +729,7 @@ public class XmlItem {
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle
index 1fbe205a65..111b509b38 100644
--- a/samples/client/petstore/java/jersey1/build.gradle
+++ b/samples/client/petstore/java/jersey1/build.gradle
@@ -121,6 +121,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "com.sun.jersey:jersey-client:$jersey_version"
compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
diff --git a/samples/client/petstore/java/jersey1/pom.xml b/samples/client/petstore/java/jersey1/pom.xml
index a6c96d94d1..80243d26d1 100644
--- a/samples/client/petstore/java/jersey1/pom.xml
+++ b/samples/client/petstore/java/jersey1/pom.xml
@@ -201,6 +201,14 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+
com.sun.jersey
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
index d223a661f8..69d6a81729 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesAnyType extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
index db738129d0..0147a592b7 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesArray extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
index 754ff32555..89aa511c2a 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesBoolean extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index 2de7a27185..cb955d1165 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -80,6 +80,7 @@ public class AdditionalPropertiesClass {
* Get mapString
* @return mapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapString() {
return mapString;
@@ -106,6 +107,7 @@ public class AdditionalPropertiesClass {
* Get mapNumber
* @return mapNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapNumber() {
return mapNumber;
@@ -132,6 +134,7 @@ public class AdditionalPropertiesClass {
* Get mapInteger
* @return mapInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapInteger() {
return mapInteger;
@@ -158,6 +161,7 @@ public class AdditionalPropertiesClass {
* Get mapBoolean
* @return mapBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapBoolean() {
return mapBoolean;
@@ -184,6 +188,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger
* @return mapArrayInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayInteger() {
return mapArrayInteger;
@@ -210,6 +215,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayAnytype() {
return mapArrayAnytype;
@@ -236,6 +242,7 @@ public class AdditionalPropertiesClass {
* Get mapMapString
* @return mapMapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapString() {
return mapMapString;
@@ -262,6 +269,7 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype
* @return mapMapAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapAnytype() {
return mapMapAnytype;
@@ -280,6 +288,7 @@ public class AdditionalPropertiesClass {
* Get anytype1
* @return anytype1
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype1() {
return anytype1;
@@ -298,6 +307,7 @@ public class AdditionalPropertiesClass {
* Get anytype2
* @return anytype2
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype2() {
return anytype2;
@@ -316,6 +326,7 @@ public class AdditionalPropertiesClass {
* Get anytype3
* @return anytype3
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype3() {
return anytype3;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
index 1f61976466..f27ff011de 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesInteger extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
index 474d7b8f04..479696fdce 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesNumber extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
index 40ff424fe4..bd569b0da3 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesObject extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
index eeaedf3bda..27e03a2313 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesString extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java
index f210737e12..dc16717ac3 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Animal.java
@@ -67,6 +67,7 @@ public class Animal {
* Get color
* @return color
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
index f5c02b2326..b670ecb66e 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayNumber() {
return arrayArrayNumber;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
index 2dcfdf3c78..9d6997f88f 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfNumberOnly {
* Get arrayNumber
* @return arrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayNumber() {
return arrayNumber;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java
index 0778fc2d8f..7dc235f0a9 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -55,6 +55,7 @@ public class ArrayTest {
* Get arrayOfString
* @return arrayOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayOfString() {
return arrayOfString;
@@ -81,6 +82,7 @@ public class ArrayTest {
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
@@ -107,6 +109,7 @@ public class ArrayTest {
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfModel() {
return arrayArrayOfModel;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java
index cedbd8c9db..3f3df29d5d 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -53,6 +53,7 @@ public class Capitalization {
* Get smallCamel
* @return smallCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
@@ -71,6 +72,7 @@ public class Capitalization {
* Get capitalCamel
* @return capitalCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
@@ -89,6 +91,7 @@ public class Capitalization {
* Get smallSnake
* @return smallSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
@@ -107,6 +110,7 @@ public class Capitalization {
* Get capitalSnake
* @return capitalSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
@@ -125,6 +129,7 @@ public class Capitalization {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
@@ -143,6 +148,7 @@ public class Capitalization {
* Name of the pet
* @return ATT_NAME
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java
index 40f40f869e..a8108d6f15 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Cat.java
@@ -40,6 +40,7 @@ public class Cat extends Animal {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java
index 0e8a7f8fa9..42e9614610 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java
@@ -38,6 +38,7 @@ public class CatAllOf {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java
index baf44c948a..3eccd2cd92 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Category.java
@@ -41,6 +41,7 @@ public class Category {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java
index 0904f531de..2aaed27fff 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -39,6 +39,7 @@ public class ClassModel {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java
index 9ebcc7294e..458e812960 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Client.java
@@ -38,6 +38,7 @@ public class Client {
* Get client
* @return client
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java
index 3b1c570cb4..83f5cb0e27 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Dog.java
@@ -40,6 +40,7 @@ public class Dog extends Animal {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java
index cb95a6a372..d1e1402789 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java
@@ -38,6 +38,7 @@ public class DogAllOf {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java
index 03bcbcbd1f..368b481f7e 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumArrays.java
@@ -59,7 +59,7 @@ public class EnumArrays {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -97,7 +97,7 @@ public class EnumArrays {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -113,6 +113,7 @@ public class EnumArrays {
* Get justSymbol
* @return justSymbol
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
@@ -139,6 +140,7 @@ public class EnumArrays {
* Get arrayEnum
* @return arrayEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayEnum() {
return arrayEnum;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumClass.java
index 5633f02805..a4cc808868 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumClass.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumClass.java
@@ -53,7 +53,7 @@ public enum EnumClass {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java
index d7c41d3017..b365a8a56f 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -60,7 +60,7 @@ public class EnumTest {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -100,7 +100,7 @@ public class EnumTest {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -138,7 +138,7 @@ public class EnumTest {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -176,7 +176,7 @@ public class EnumTest {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -195,6 +195,7 @@ public class EnumTest {
* Get enumString
* @return enumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
@@ -231,6 +232,7 @@ public class EnumTest {
* Get enumInteger
* @return enumInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
@@ -249,6 +251,7 @@ public class EnumTest {
* Get enumNumber
* @return enumNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
@@ -267,6 +270,7 @@ public class EnumTest {
* Get outerEnum
* @return outerEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
index 326b1a90a3..ca73764280 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -43,6 +43,7 @@ public class FileSchemaTestClass {
* Get file
* @return file
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public java.io.File getFile() {
return file;
@@ -69,6 +70,7 @@ public class FileSchemaTestClass {
* Get files
* @return files
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getFiles() {
return files;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java
index dd1c2d2f58..00d132529e 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -81,6 +81,7 @@ public class FormatTest {
* maximum: 100
* @return integer
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
@@ -101,6 +102,7 @@ public class FormatTest {
* maximum: 200
* @return int32
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
@@ -119,6 +121,7 @@ public class FormatTest {
* Get int64
* @return int64
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
@@ -159,6 +162,7 @@ public class FormatTest {
* maximum: 987.6
* @return _float
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
@@ -179,6 +183,7 @@ public class FormatTest {
* maximum: 123.4
* @return _double
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
@@ -197,6 +202,7 @@ public class FormatTest {
* Get string
* @return string
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getString() {
return string;
@@ -233,6 +239,7 @@ public class FormatTest {
* Get binary
* @return binary
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public File getBinary() {
return binary;
@@ -269,6 +276,7 @@ public class FormatTest {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -287,6 +295,7 @@ public class FormatTest {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
index 4dbede6b7d..e9453bb6cc 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
@@ -36,6 +36,7 @@ public class HasOnlyReadOnly {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -45,6 +46,7 @@ public class HasOnlyReadOnly {
* Get foo
* @return foo
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java
index c47f037575..44cd694057 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java
@@ -63,7 +63,7 @@ public class MapTest {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -93,6 +93,7 @@ public class MapTest {
* Get mapMapOfString
* @return mapMapOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapOfString() {
return mapMapOfString;
@@ -119,6 +120,7 @@ public class MapTest {
* Get mapOfEnumString
* @return mapOfEnumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapOfEnumString() {
return mapOfEnumString;
@@ -145,6 +147,7 @@ public class MapTest {
* Get directMap
* @return directMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getDirectMap() {
return directMap;
@@ -171,6 +174,7 @@ public class MapTest {
* Get indirectMap
* @return indirectMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getIndirectMap() {
return indirectMap;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index 0adbe0caa7..19d808093c 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -50,6 +50,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
@@ -68,6 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -94,6 +96,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map
* @return map
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMap() {
return map;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java
index 3be60ea3ae..39fabeeb6d 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Model200Response.java
@@ -42,6 +42,7 @@ public class Model200Response {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getName() {
return name;
@@ -60,6 +61,7 @@ public class Model200Response {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java
index 6e458e38dc..bb33412951 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelApiResponse.java
@@ -44,6 +44,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
@@ -62,6 +63,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getType() {
return type;
@@ -80,6 +82,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMessage() {
return message;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java
index 62e5295212..9aafb13e04 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ModelReturn.java
@@ -39,6 +39,7 @@ public class ModelReturn {
* Get _return
* @return _return
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java
index 852a999035..9518276dd6 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Name.java
@@ -61,6 +61,7 @@ public class Name {
* Get snakeCase
* @return snakeCase
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
@@ -75,6 +76,7 @@ public class Name {
* Get property
* @return property
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getProperty() {
return property;
@@ -88,6 +90,7 @@ public class Name {
* Get _123number
* @return _123number
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer get123number() {
return _123number;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java
index 530a4d5818..0245e8e210 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/NumberOnly.java
@@ -39,6 +39,7 @@ public class NumberOnly {
* Get justNumber
* @return justNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java
index 3a7801b65b..a9e2986a2f 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Order.java
@@ -72,7 +72,7 @@ public class Order {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -91,6 +91,7 @@ public class Order {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -109,6 +110,7 @@ public class Order {
* Get petId
* @return petId
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getPetId() {
return petId;
@@ -127,6 +129,7 @@ public class Order {
* Get quantity
* @return quantity
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getQuantity() {
return quantity;
@@ -145,6 +148,7 @@ public class Order {
* Get shipDate
* @return shipDate
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getShipDate() {
return shipDate;
@@ -163,6 +167,7 @@ public class Order {
* Order Status
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() {
return status;
@@ -181,6 +186,7 @@ public class Order {
* Get complete
* @return complete
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getComplete() {
return complete;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java
index 6e71242384..c8bd99011c 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java
@@ -45,6 +45,7 @@ public class OuterComposite {
* Get myNumber
* @return myNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getMyNumber() {
return myNumber;
@@ -63,6 +64,7 @@ public class OuterComposite {
* Get myString
* @return myString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMyString() {
return myString;
@@ -81,6 +83,7 @@ public class OuterComposite {
* Get myBoolean
* @return myBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getMyBoolean() {
return myBoolean;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterEnum.java
index f83b0c9587..dacbbdfb2c 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterEnum.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterEnum.java
@@ -53,7 +53,7 @@ public enum OuterEnum {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java
index f604115ce9..a7d92129d7 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Pet.java
@@ -78,7 +78,7 @@ public class Pet {
return b;
}
}
- return null;
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@@ -94,6 +94,7 @@ public class Pet {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -112,6 +113,7 @@ public class Pet {
* Get category
* @return category
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
@@ -179,6 +181,7 @@ public class Pet {
* Get tags
* @return tags
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getTags() {
return tags;
@@ -197,6 +200,7 @@ public class Pet {
* pet status in the store
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
index 83f25c7923..1379ee09ea 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
@@ -36,6 +36,7 @@ public class ReadOnlyFirst {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -50,6 +51,7 @@ public class ReadOnlyFirst {
* Get baz
* @return baz
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java
index 5abfc132ad..869771afad 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/SpecialModelName.java
@@ -38,6 +38,7 @@ public class SpecialModelName {
* Get $specialPropertyName
* @return $specialPropertyName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long get$SpecialPropertyName() {
return $specialPropertyName;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java
index e2e947b84a..4bb498aff4 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/Tag.java
@@ -41,6 +41,7 @@ public class Tag {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -59,6 +60,7 @@ public class Tag {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java
index ee3f656a1a..73164c3ee2 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/User.java
@@ -59,6 +59,7 @@ public class User {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -77,6 +78,7 @@ public class User {
* Get username
* @return username
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getUsername() {
return username;
@@ -95,6 +97,7 @@ public class User {
* Get firstName
* @return firstName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
@@ -113,6 +116,7 @@ public class User {
* Get lastName
* @return lastName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
@@ -131,6 +135,7 @@ public class User {
* Get email
* @return email
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getEmail() {
return email;
@@ -149,6 +154,7 @@ public class User {
* Get password
* @return password
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPassword() {
return password;
@@ -167,6 +173,7 @@ public class User {
* Get phone
* @return phone
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
@@ -185,6 +192,7 @@ public class User {
* User Status
* @return userStatus
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java
index cb31157306..9032c23424 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/XmlItem.java
@@ -125,6 +125,7 @@ public class XmlItem {
* Get attributeString
* @return attributeString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
@@ -143,6 +144,7 @@ public class XmlItem {
* Get attributeNumber
* @return attributeNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
@@ -161,6 +163,7 @@ public class XmlItem {
* Get attributeInteger
* @return attributeInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
@@ -179,6 +182,7 @@ public class XmlItem {
* Get attributeBoolean
* @return attributeBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getAttributeBoolean() {
return attributeBoolean;
@@ -205,6 +209,7 @@ public class XmlItem {
* Get wrappedArray
* @return wrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getWrappedArray() {
return wrappedArray;
@@ -223,6 +228,7 @@ public class XmlItem {
* Get nameString
* @return nameString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
@@ -241,6 +247,7 @@ public class XmlItem {
* Get nameNumber
* @return nameNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
@@ -259,6 +266,7 @@ public class XmlItem {
* Get nameInteger
* @return nameInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
@@ -277,6 +285,7 @@ public class XmlItem {
* Get nameBoolean
* @return nameBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNameBoolean() {
return nameBoolean;
@@ -303,6 +312,7 @@ public class XmlItem {
* Get nameArray
* @return nameArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameArray() {
return nameArray;
@@ -329,6 +339,7 @@ public class XmlItem {
* Get nameWrappedArray
* @return nameWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameWrappedArray() {
return nameWrappedArray;
@@ -347,6 +358,7 @@ public class XmlItem {
* Get prefixString
* @return prefixString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
@@ -365,6 +377,7 @@ public class XmlItem {
* Get prefixNumber
* @return prefixNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
@@ -383,6 +396,7 @@ public class XmlItem {
* Get prefixInteger
* @return prefixInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
@@ -401,6 +415,7 @@ public class XmlItem {
* Get prefixBoolean
* @return prefixBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixBoolean() {
return prefixBoolean;
@@ -427,6 +442,7 @@ public class XmlItem {
* Get prefixArray
* @return prefixArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixArray() {
return prefixArray;
@@ -453,6 +469,7 @@ public class XmlItem {
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixWrappedArray() {
return prefixWrappedArray;
@@ -471,6 +488,7 @@ public class XmlItem {
* Get namespaceString
* @return namespaceString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
@@ -489,6 +507,7 @@ public class XmlItem {
* Get namespaceNumber
* @return namespaceNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
@@ -507,6 +526,7 @@ public class XmlItem {
* Get namespaceInteger
* @return namespaceInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
@@ -525,6 +545,7 @@ public class XmlItem {
* Get namespaceBoolean
* @return namespaceBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNamespaceBoolean() {
return namespaceBoolean;
@@ -551,6 +572,7 @@ public class XmlItem {
* Get namespaceArray
* @return namespaceArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceArray() {
return namespaceArray;
@@ -577,6 +599,7 @@ public class XmlItem {
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceWrappedArray() {
return namespaceWrappedArray;
@@ -595,6 +618,7 @@ public class XmlItem {
* Get prefixNsString
* @return prefixNsString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
@@ -613,6 +637,7 @@ public class XmlItem {
* Get prefixNsNumber
* @return prefixNsNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
@@ -631,6 +656,7 @@ public class XmlItem {
* Get prefixNsInteger
* @return prefixNsInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
@@ -649,6 +675,7 @@ public class XmlItem {
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixNsBoolean() {
return prefixNsBoolean;
@@ -675,6 +702,7 @@ public class XmlItem {
* Get prefixNsArray
* @return prefixNsArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsArray() {
return prefixNsArray;
@@ -701,6 +729,7 @@ public class XmlItem {
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
diff --git a/samples/client/petstore/java/jersey2-java6/pom.xml b/samples/client/petstore/java/jersey2-java6/pom.xml
index 8a80c6c158..7f29de9bf6 100644
--- a/samples/client/petstore/java/jersey2-java6/pom.xml
+++ b/samples/client/petstore/java/jersey2-java6/pom.xml
@@ -210,6 +210,13 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
org.glassfish.jersey.core
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
index 8a40c40388..81251713a1 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -39,6 +39,7 @@ public class AdditionalPropertiesAnyType extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
index 591e8ff0cd..bdf5c625dd 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesArray extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
index d46e61f636..eccc9e9d3c 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -39,6 +39,7 @@ public class AdditionalPropertiesBoolean extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index d33ea1ab12..9209ce67b6 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -79,6 +79,7 @@ public class AdditionalPropertiesClass {
* Get mapString
* @return mapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapString() {
return mapString;
@@ -105,6 +106,7 @@ public class AdditionalPropertiesClass {
* Get mapNumber
* @return mapNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapNumber() {
return mapNumber;
@@ -131,6 +133,7 @@ public class AdditionalPropertiesClass {
* Get mapInteger
* @return mapInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapInteger() {
return mapInteger;
@@ -157,6 +160,7 @@ public class AdditionalPropertiesClass {
* Get mapBoolean
* @return mapBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapBoolean() {
return mapBoolean;
@@ -183,6 +187,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger
* @return mapArrayInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayInteger() {
return mapArrayInteger;
@@ -209,6 +214,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayAnytype() {
return mapArrayAnytype;
@@ -235,6 +241,7 @@ public class AdditionalPropertiesClass {
* Get mapMapString
* @return mapMapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapString() {
return mapMapString;
@@ -261,6 +268,7 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype
* @return mapMapAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapAnytype() {
return mapMapAnytype;
@@ -279,6 +287,7 @@ public class AdditionalPropertiesClass {
* Get anytype1
* @return anytype1
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype1() {
return anytype1;
@@ -297,6 +306,7 @@ public class AdditionalPropertiesClass {
* Get anytype2
* @return anytype2
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype2() {
return anytype2;
@@ -315,6 +325,7 @@ public class AdditionalPropertiesClass {
* Get anytype3
* @return anytype3
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype3() {
return anytype3;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
index 455c8c3d9d..da252b12fa 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
@@ -39,6 +39,7 @@ public class AdditionalPropertiesInteger extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
index c82df7f17e..25e752c588 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesNumber extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
index af85c7f600..b5a5fed844 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
@@ -39,6 +39,7 @@ public class AdditionalPropertiesObject extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
index bffda40c98..247d3242dd 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
@@ -39,6 +39,7 @@ public class AdditionalPropertiesString extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java
index 80e1234cd7..e7f76c2f91 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Animal.java
@@ -66,6 +66,7 @@ public class Animal {
* Get color
* @return color
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
index 04da42d041..dbf11f2b6d 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -48,6 +48,7 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayNumber() {
return arrayArrayNumber;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
index 325216dcac..d35a9d2744 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -48,6 +48,7 @@ public class ArrayOfNumberOnly {
* Get arrayNumber
* @return arrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayNumber() {
return arrayNumber;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayTest.java
index a660663312..0a28291d77 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -54,6 +54,7 @@ public class ArrayTest {
* Get arrayOfString
* @return arrayOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayOfString() {
return arrayOfString;
@@ -80,6 +81,7 @@ public class ArrayTest {
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
@@ -106,6 +108,7 @@ public class ArrayTest {
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfModel() {
return arrayArrayOfModel;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Capitalization.java
index 0f17cc4a23..b8a614a204 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Capitalization.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -52,6 +52,7 @@ public class Capitalization {
* Get smallCamel
* @return smallCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
@@ -70,6 +71,7 @@ public class Capitalization {
* Get capitalCamel
* @return capitalCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
@@ -88,6 +90,7 @@ public class Capitalization {
* Get smallSnake
* @return smallSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
@@ -106,6 +109,7 @@ public class Capitalization {
* Get capitalSnake
* @return capitalSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
@@ -124,6 +128,7 @@ public class Capitalization {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
@@ -142,6 +147,7 @@ public class Capitalization {
* Name of the pet
* @return ATT_NAME
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Cat.java
index 8f877d01b0..6cc1276b4e 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Cat.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Cat.java
@@ -39,6 +39,7 @@ public class Cat extends Animal {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/CatAllOf.java
index 313bcbed99..a791dc55f9 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/CatAllOf.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/CatAllOf.java
@@ -37,6 +37,7 @@ public class CatAllOf {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Category.java
index e6713bf4eb..6fefcefbe4 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Category.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Category.java
@@ -40,6 +40,7 @@ public class Category {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ClassModel.java
index b18e6d32d1..a6bfab63ee 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ClassModel.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -38,6 +38,7 @@ public class ClassModel {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Client.java
index 57ba8c8a11..68d7f4fb55 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Client.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Client.java
@@ -37,6 +37,7 @@ public class Client {
* Get client
* @return client
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Dog.java
index 586108892c..1cbee958a0 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Dog.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Dog.java
@@ -39,6 +39,7 @@ public class Dog extends Animal {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/DogAllOf.java
index 2fe492b320..ad09ae505a 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/DogAllOf.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/DogAllOf.java
@@ -37,6 +37,7 @@ public class DogAllOf {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java
index a8d3853b59..0b8fc89b05 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumArrays.java
@@ -112,6 +112,7 @@ public class EnumArrays {
* Get justSymbol
* @return justSymbol
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
@@ -138,6 +139,7 @@ public class EnumArrays {
* Get arrayEnum
* @return arrayEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayEnum() {
return arrayEnum;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java
index 5460354919..0004515092 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -194,6 +194,7 @@ public class EnumTest {
* Get enumString
* @return enumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
@@ -230,6 +231,7 @@ public class EnumTest {
* Get enumInteger
* @return enumInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
@@ -248,6 +250,7 @@ public class EnumTest {
* Get enumNumber
* @return enumNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
@@ -266,6 +269,7 @@ public class EnumTest {
* Get outerEnum
* @return outerEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
index 30b5b41c7c..5f2b12d45c 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -42,6 +42,7 @@ public class FileSchemaTestClass {
* Get file
* @return file
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public java.io.File getFile() {
return file;
@@ -68,6 +69,7 @@ public class FileSchemaTestClass {
* Get files
* @return files
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getFiles() {
return files;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FormatTest.java
index e2bb76ca01..fee5939f4f 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -80,6 +80,7 @@ public class FormatTest {
* maximum: 100
* @return integer
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
@@ -100,6 +101,7 @@ public class FormatTest {
* maximum: 200
* @return int32
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
@@ -118,6 +120,7 @@ public class FormatTest {
* Get int64
* @return int64
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
@@ -158,6 +161,7 @@ public class FormatTest {
* maximum: 987.6
* @return _float
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
@@ -178,6 +182,7 @@ public class FormatTest {
* maximum: 123.4
* @return _double
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
@@ -196,6 +201,7 @@ public class FormatTest {
* Get string
* @return string
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getString() {
return string;
@@ -232,6 +238,7 @@ public class FormatTest {
* Get binary
* @return binary
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public File getBinary() {
return binary;
@@ -268,6 +275,7 @@ public class FormatTest {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -286,6 +294,7 @@ public class FormatTest {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
index 57c24eda70..7581f7ba56 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
@@ -35,6 +35,7 @@ public class HasOnlyReadOnly {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -44,6 +45,7 @@ public class HasOnlyReadOnly {
* Get foo
* @return foo
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java
index c140f59e87..da931e4794 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java
@@ -92,6 +92,7 @@ public class MapTest {
* Get mapMapOfString
* @return mapMapOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapOfString() {
return mapMapOfString;
@@ -118,6 +119,7 @@ public class MapTest {
* Get mapOfEnumString
* @return mapOfEnumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapOfEnumString() {
return mapOfEnumString;
@@ -144,6 +146,7 @@ public class MapTest {
* Get directMap
* @return directMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getDirectMap() {
return directMap;
@@ -170,6 +173,7 @@ public class MapTest {
* Get indirectMap
* @return indirectMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getIndirectMap() {
return indirectMap;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index 63c980543c..bb7fce8383 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -49,6 +49,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
@@ -67,6 +68,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -93,6 +95,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map
* @return map
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMap() {
return map;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Model200Response.java
index ba12138db1..2d258ffec3 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Model200Response.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Model200Response.java
@@ -41,6 +41,7 @@ public class Model200Response {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getName() {
return name;
@@ -59,6 +60,7 @@ public class Model200Response {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelApiResponse.java
index 2461cf36c4..63ccaa32f2 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelApiResponse.java
@@ -43,6 +43,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
@@ -61,6 +62,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getType() {
return type;
@@ -79,6 +81,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMessage() {
return message;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelReturn.java
index 4f2ab40fc9..ab17739908 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ModelReturn.java
@@ -38,6 +38,7 @@ public class ModelReturn {
* Get _return
* @return _return
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Name.java
index afbc512017..0774790c95 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Name.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Name.java
@@ -60,6 +60,7 @@ public class Name {
* Get snakeCase
* @return snakeCase
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
@@ -74,6 +75,7 @@ public class Name {
* Get property
* @return property
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getProperty() {
return property;
@@ -87,6 +89,7 @@ public class Name {
* Get _123number
* @return _123number
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer get123number() {
return _123number;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/NumberOnly.java
index 94a9d9105c..85268b9b7c 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/NumberOnly.java
@@ -38,6 +38,7 @@ public class NumberOnly {
* Get justNumber
* @return justNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java
index 2879cd2f5a..8be8f68b6c 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Order.java
@@ -90,6 +90,7 @@ public class Order {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -108,6 +109,7 @@ public class Order {
* Get petId
* @return petId
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getPetId() {
return petId;
@@ -126,6 +128,7 @@ public class Order {
* Get quantity
* @return quantity
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getQuantity() {
return quantity;
@@ -144,6 +147,7 @@ public class Order {
* Get shipDate
* @return shipDate
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getShipDate() {
return shipDate;
@@ -162,6 +166,7 @@ public class Order {
* Order Status
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() {
return status;
@@ -180,6 +185,7 @@ public class Order {
* Get complete
* @return complete
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isComplete() {
return complete;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java
index 6130da589d..a8dc2ee33d 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java
@@ -44,6 +44,7 @@ public class OuterComposite {
* Get myNumber
* @return myNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getMyNumber() {
return myNumber;
@@ -62,6 +63,7 @@ public class OuterComposite {
* Get myString
* @return myString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMyString() {
return myString;
@@ -80,6 +82,7 @@ public class OuterComposite {
* Get myBoolean
* @return myBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean isMyBoolean() {
return myBoolean;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java
index 2bcbda44b2..914b9b1443 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Pet.java
@@ -93,6 +93,7 @@ public class Pet {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -111,6 +112,7 @@ public class Pet {
* Get category
* @return category
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
@@ -178,6 +180,7 @@ public class Pet {
* Get tags
* @return tags
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getTags() {
return tags;
@@ -196,6 +199,7 @@ public class Pet {
* pet status in the store
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
index d05ced1a76..81e19eda7c 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
@@ -35,6 +35,7 @@ public class ReadOnlyFirst {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -49,6 +50,7 @@ public class ReadOnlyFirst {
* Get baz
* @return baz
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/SpecialModelName.java
index 0624bfbe33..e3b9f1a187 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/SpecialModelName.java
@@ -37,6 +37,7 @@ public class SpecialModelName {
* Get $specialPropertyName
* @return $specialPropertyName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long get$SpecialPropertyName() {
return $specialPropertyName;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Tag.java
index 6f6d230a7d..8eaa60d84e 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Tag.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/Tag.java
@@ -40,6 +40,7 @@ public class Tag {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -58,6 +59,7 @@ public class Tag {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/User.java
index b3619fee85..f4745a2b17 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/User.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/User.java
@@ -58,6 +58,7 @@ public class User {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -76,6 +77,7 @@ public class User {
* Get username
* @return username
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getUsername() {
return username;
@@ -94,6 +96,7 @@ public class User {
* Get firstName
* @return firstName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
@@ -112,6 +115,7 @@ public class User {
* Get lastName
* @return lastName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
@@ -130,6 +134,7 @@ public class User {
* Get email
* @return email
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getEmail() {
return email;
@@ -148,6 +153,7 @@ public class User {
* Get password
* @return password
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPassword() {
return password;
@@ -166,6 +172,7 @@ public class User {
* Get phone
* @return phone
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
@@ -184,6 +191,7 @@ public class User {
* User Status
* @return userStatus
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/XmlItem.java
index 04f3618d83..730742019f 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/XmlItem.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/XmlItem.java
@@ -124,6 +124,7 @@ public class XmlItem {
* Get attributeString
* @return attributeString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
@@ -142,6 +143,7 @@ public class XmlItem {
* Get attributeNumber
* @return attributeNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
@@ -160,6 +162,7 @@ public class XmlItem {
* Get attributeInteger
* @return attributeInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
@@ -178,6 +181,7 @@ public class XmlItem {
* Get attributeBoolean
* @return attributeBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isAttributeBoolean() {
return attributeBoolean;
@@ -204,6 +208,7 @@ public class XmlItem {
* Get wrappedArray
* @return wrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getWrappedArray() {
return wrappedArray;
@@ -222,6 +227,7 @@ public class XmlItem {
* Get nameString
* @return nameString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
@@ -240,6 +246,7 @@ public class XmlItem {
* Get nameNumber
* @return nameNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
@@ -258,6 +265,7 @@ public class XmlItem {
* Get nameInteger
* @return nameInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
@@ -276,6 +284,7 @@ public class XmlItem {
* Get nameBoolean
* @return nameBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isNameBoolean() {
return nameBoolean;
@@ -302,6 +311,7 @@ public class XmlItem {
* Get nameArray
* @return nameArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameArray() {
return nameArray;
@@ -328,6 +338,7 @@ public class XmlItem {
* Get nameWrappedArray
* @return nameWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameWrappedArray() {
return nameWrappedArray;
@@ -346,6 +357,7 @@ public class XmlItem {
* Get prefixString
* @return prefixString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
@@ -364,6 +376,7 @@ public class XmlItem {
* Get prefixNumber
* @return prefixNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
@@ -382,6 +395,7 @@ public class XmlItem {
* Get prefixInteger
* @return prefixInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
@@ -400,6 +414,7 @@ public class XmlItem {
* Get prefixBoolean
* @return prefixBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isPrefixBoolean() {
return prefixBoolean;
@@ -426,6 +441,7 @@ public class XmlItem {
* Get prefixArray
* @return prefixArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixArray() {
return prefixArray;
@@ -452,6 +468,7 @@ public class XmlItem {
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixWrappedArray() {
return prefixWrappedArray;
@@ -470,6 +487,7 @@ public class XmlItem {
* Get namespaceString
* @return namespaceString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
@@ -488,6 +506,7 @@ public class XmlItem {
* Get namespaceNumber
* @return namespaceNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
@@ -506,6 +525,7 @@ public class XmlItem {
* Get namespaceInteger
* @return namespaceInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
@@ -524,6 +544,7 @@ public class XmlItem {
* Get namespaceBoolean
* @return namespaceBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isNamespaceBoolean() {
return namespaceBoolean;
@@ -550,6 +571,7 @@ public class XmlItem {
* Get namespaceArray
* @return namespaceArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceArray() {
return namespaceArray;
@@ -576,6 +598,7 @@ public class XmlItem {
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceWrappedArray() {
return namespaceWrappedArray;
@@ -594,6 +617,7 @@ public class XmlItem {
* Get prefixNsString
* @return prefixNsString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
@@ -612,6 +636,7 @@ public class XmlItem {
* Get prefixNsNumber
* @return prefixNsNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
@@ -630,6 +655,7 @@ public class XmlItem {
* Get prefixNsInteger
* @return prefixNsInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
@@ -648,6 +674,7 @@ public class XmlItem {
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean isPrefixNsBoolean() {
return prefixNsBoolean;
@@ -674,6 +701,7 @@ public class XmlItem {
* Get prefixNsArray
* @return prefixNsArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsArray() {
return prefixNsArray;
@@ -700,6 +728,7 @@ public class XmlItem {
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
diff --git a/samples/client/petstore/java/jersey2-java8/build.gradle b/samples/client/petstore/java/jersey2-java8/build.gradle
index 5966274ea7..b3382a0779 100644
--- a/samples/client/petstore/java/jersey2-java8/build.gradle
+++ b/samples/client/petstore/java/jersey2-java8/build.gradle
@@ -103,6 +103,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml
index 75381cb9de..5d62f179fe 100644
--- a/samples/client/petstore/java/jersey2-java8/pom.xml
+++ b/samples/client/petstore/java/jersey2-java8/pom.xml
@@ -210,6 +210,13 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
org.glassfish.jersey.core
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
index d223a661f8..69d6a81729 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesAnyType extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
index db738129d0..0147a592b7 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesArray extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
index 754ff32555..89aa511c2a 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesBoolean extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index abba0b86e7..ecb4e102ea 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -80,6 +80,7 @@ public class AdditionalPropertiesClass {
* Get mapString
* @return mapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapString() {
return mapString;
@@ -106,6 +107,7 @@ public class AdditionalPropertiesClass {
* Get mapNumber
* @return mapNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapNumber() {
return mapNumber;
@@ -132,6 +134,7 @@ public class AdditionalPropertiesClass {
* Get mapInteger
* @return mapInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapInteger() {
return mapInteger;
@@ -158,6 +161,7 @@ public class AdditionalPropertiesClass {
* Get mapBoolean
* @return mapBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapBoolean() {
return mapBoolean;
@@ -184,6 +188,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger
* @return mapArrayInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayInteger() {
return mapArrayInteger;
@@ -210,6 +215,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayAnytype() {
return mapArrayAnytype;
@@ -236,6 +242,7 @@ public class AdditionalPropertiesClass {
* Get mapMapString
* @return mapMapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapString() {
return mapMapString;
@@ -262,6 +269,7 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype
* @return mapMapAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapAnytype() {
return mapMapAnytype;
@@ -280,6 +288,7 @@ public class AdditionalPropertiesClass {
* Get anytype1
* @return anytype1
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype1() {
return anytype1;
@@ -298,6 +307,7 @@ public class AdditionalPropertiesClass {
* Get anytype2
* @return anytype2
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype2() {
return anytype2;
@@ -316,6 +326,7 @@ public class AdditionalPropertiesClass {
* Get anytype3
* @return anytype3
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype3() {
return anytype3;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
index 1f61976466..f27ff011de 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesInteger extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
index 474d7b8f04..479696fdce 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesNumber extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
index 40ff424fe4..bd569b0da3 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesObject extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
index eeaedf3bda..27e03a2313 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesString extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java
index f210737e12..dc16717ac3 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Animal.java
@@ -67,6 +67,7 @@ public class Animal {
* Get color
* @return color
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
index 4f767a55cb..66e9fba5d7 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayNumber() {
return arrayArrayNumber;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
index 727da04e54..9f5b467a31 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfNumberOnly {
* Get arrayNumber
* @return arrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayNumber() {
return arrayNumber;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java
index 1c4f1195f7..7ac6788089 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -55,6 +55,7 @@ public class ArrayTest {
* Get arrayOfString
* @return arrayOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayOfString() {
return arrayOfString;
@@ -81,6 +82,7 @@ public class ArrayTest {
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
@@ -107,6 +109,7 @@ public class ArrayTest {
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfModel() {
return arrayArrayOfModel;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java
index cedbd8c9db..3f3df29d5d 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -53,6 +53,7 @@ public class Capitalization {
* Get smallCamel
* @return smallCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
@@ -71,6 +72,7 @@ public class Capitalization {
* Get capitalCamel
* @return capitalCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
@@ -89,6 +91,7 @@ public class Capitalization {
* Get smallSnake
* @return smallSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
@@ -107,6 +110,7 @@ public class Capitalization {
* Get capitalSnake
* @return capitalSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
@@ -125,6 +129,7 @@ public class Capitalization {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
@@ -143,6 +148,7 @@ public class Capitalization {
* Name of the pet
* @return ATT_NAME
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java
index 40f40f869e..a8108d6f15 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Cat.java
@@ -40,6 +40,7 @@ public class Cat extends Animal {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java
index 0e8a7f8fa9..42e9614610 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java
@@ -38,6 +38,7 @@ public class CatAllOf {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java
index baf44c948a..3eccd2cd92 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Category.java
@@ -41,6 +41,7 @@ public class Category {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java
index 0904f531de..2aaed27fff 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -39,6 +39,7 @@ public class ClassModel {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java
index 9ebcc7294e..458e812960 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Client.java
@@ -38,6 +38,7 @@ public class Client {
* Get client
* @return client
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java
index 3b1c570cb4..83f5cb0e27 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Dog.java
@@ -40,6 +40,7 @@ public class Dog extends Animal {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java
index cb95a6a372..d1e1402789 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java
@@ -38,6 +38,7 @@ public class DogAllOf {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java
index 38f41757f0..a3bd1af472 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumArrays.java
@@ -113,6 +113,7 @@ public class EnumArrays {
* Get justSymbol
* @return justSymbol
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
@@ -139,6 +140,7 @@ public class EnumArrays {
* Get arrayEnum
* @return arrayEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayEnum() {
return arrayEnum;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java
index bdf61d52c9..b365a8a56f 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -195,6 +195,7 @@ public class EnumTest {
* Get enumString
* @return enumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
@@ -231,6 +232,7 @@ public class EnumTest {
* Get enumInteger
* @return enumInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
@@ -249,6 +251,7 @@ public class EnumTest {
* Get enumNumber
* @return enumNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
@@ -267,6 +270,7 @@ public class EnumTest {
* Get outerEnum
* @return outerEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
index c8e26deafa..ad8cf751e1 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -43,6 +43,7 @@ public class FileSchemaTestClass {
* Get file
* @return file
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public java.io.File getFile() {
return file;
@@ -69,6 +70,7 @@ public class FileSchemaTestClass {
* Get files
* @return files
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getFiles() {
return files;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java
index a7ff05e63e..8d075e26ba 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -81,6 +81,7 @@ public class FormatTest {
* maximum: 100
* @return integer
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
@@ -101,6 +102,7 @@ public class FormatTest {
* maximum: 200
* @return int32
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
@@ -119,6 +121,7 @@ public class FormatTest {
* Get int64
* @return int64
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
@@ -159,6 +162,7 @@ public class FormatTest {
* maximum: 987.6
* @return _float
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
@@ -179,6 +183,7 @@ public class FormatTest {
* maximum: 123.4
* @return _double
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
@@ -197,6 +202,7 @@ public class FormatTest {
* Get string
* @return string
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getString() {
return string;
@@ -233,6 +239,7 @@ public class FormatTest {
* Get binary
* @return binary
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public File getBinary() {
return binary;
@@ -269,6 +276,7 @@ public class FormatTest {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -287,6 +295,7 @@ public class FormatTest {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
index 4dbede6b7d..e9453bb6cc 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
@@ -36,6 +36,7 @@ public class HasOnlyReadOnly {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -45,6 +46,7 @@ public class HasOnlyReadOnly {
* Get foo
* @return foo
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java
index e4c090189f..b0d3e04bb6 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java
@@ -93,6 +93,7 @@ public class MapTest {
* Get mapMapOfString
* @return mapMapOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapOfString() {
return mapMapOfString;
@@ -119,6 +120,7 @@ public class MapTest {
* Get mapOfEnumString
* @return mapOfEnumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapOfEnumString() {
return mapOfEnumString;
@@ -145,6 +147,7 @@ public class MapTest {
* Get directMap
* @return directMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getDirectMap() {
return directMap;
@@ -171,6 +174,7 @@ public class MapTest {
* Get indirectMap
* @return indirectMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getIndirectMap() {
return indirectMap;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index 3e4d20688e..fed78a2162 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -50,6 +50,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
@@ -68,6 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -94,6 +96,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map
* @return map
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMap() {
return map;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java
index 3be60ea3ae..39fabeeb6d 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Model200Response.java
@@ -42,6 +42,7 @@ public class Model200Response {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getName() {
return name;
@@ -60,6 +61,7 @@ public class Model200Response {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java
index 6e458e38dc..bb33412951 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelApiResponse.java
@@ -44,6 +44,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
@@ -62,6 +63,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getType() {
return type;
@@ -80,6 +82,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMessage() {
return message;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java
index 62e5295212..9aafb13e04 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ModelReturn.java
@@ -39,6 +39,7 @@ public class ModelReturn {
* Get _return
* @return _return
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java
index 852a999035..9518276dd6 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Name.java
@@ -61,6 +61,7 @@ public class Name {
* Get snakeCase
* @return snakeCase
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
@@ -75,6 +76,7 @@ public class Name {
* Get property
* @return property
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getProperty() {
return property;
@@ -88,6 +90,7 @@ public class Name {
* Get _123number
* @return _123number
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer get123number() {
return _123number;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java
index 530a4d5818..0245e8e210 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/NumberOnly.java
@@ -39,6 +39,7 @@ public class NumberOnly {
* Get justNumber
* @return justNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java
index 67680cd7e6..594c76e484 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Order.java
@@ -91,6 +91,7 @@ public class Order {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -109,6 +110,7 @@ public class Order {
* Get petId
* @return petId
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getPetId() {
return petId;
@@ -127,6 +129,7 @@ public class Order {
* Get quantity
* @return quantity
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getQuantity() {
return quantity;
@@ -145,6 +148,7 @@ public class Order {
* Get shipDate
* @return shipDate
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getShipDate() {
return shipDate;
@@ -163,6 +167,7 @@ public class Order {
* Order Status
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() {
return status;
@@ -181,6 +186,7 @@ public class Order {
* Get complete
* @return complete
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getComplete() {
return complete;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java
index 6e71242384..c8bd99011c 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java
@@ -45,6 +45,7 @@ public class OuterComposite {
* Get myNumber
* @return myNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getMyNumber() {
return myNumber;
@@ -63,6 +64,7 @@ public class OuterComposite {
* Get myString
* @return myString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMyString() {
return myString;
@@ -81,6 +83,7 @@ public class OuterComposite {
* Get myBoolean
* @return myBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getMyBoolean() {
return myBoolean;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java
index a2305bf1d9..08f3773756 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Pet.java
@@ -94,6 +94,7 @@ public class Pet {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -112,6 +113,7 @@ public class Pet {
* Get category
* @return category
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
@@ -179,6 +181,7 @@ public class Pet {
* Get tags
* @return tags
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getTags() {
return tags;
@@ -197,6 +200,7 @@ public class Pet {
* pet status in the store
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
index 83f25c7923..1379ee09ea 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
@@ -36,6 +36,7 @@ public class ReadOnlyFirst {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -50,6 +51,7 @@ public class ReadOnlyFirst {
* Get baz
* @return baz
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java
index 5abfc132ad..869771afad 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/SpecialModelName.java
@@ -38,6 +38,7 @@ public class SpecialModelName {
* Get $specialPropertyName
* @return $specialPropertyName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long get$SpecialPropertyName() {
return $specialPropertyName;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java
index e2e947b84a..4bb498aff4 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/Tag.java
@@ -41,6 +41,7 @@ public class Tag {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -59,6 +60,7 @@ public class Tag {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java
index ee3f656a1a..73164c3ee2 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/User.java
@@ -59,6 +59,7 @@ public class User {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -77,6 +78,7 @@ public class User {
* Get username
* @return username
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getUsername() {
return username;
@@ -95,6 +97,7 @@ public class User {
* Get firstName
* @return firstName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
@@ -113,6 +116,7 @@ public class User {
* Get lastName
* @return lastName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
@@ -131,6 +135,7 @@ public class User {
* Get email
* @return email
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getEmail() {
return email;
@@ -149,6 +154,7 @@ public class User {
* Get password
* @return password
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPassword() {
return password;
@@ -167,6 +173,7 @@ public class User {
* Get phone
* @return phone
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
@@ -185,6 +192,7 @@ public class User {
* User Status
* @return userStatus
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/XmlItem.java
index 7cb8000561..aa7ff22ccd 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/XmlItem.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/XmlItem.java
@@ -125,6 +125,7 @@ public class XmlItem {
* Get attributeString
* @return attributeString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
@@ -143,6 +144,7 @@ public class XmlItem {
* Get attributeNumber
* @return attributeNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
@@ -161,6 +163,7 @@ public class XmlItem {
* Get attributeInteger
* @return attributeInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
@@ -179,6 +182,7 @@ public class XmlItem {
* Get attributeBoolean
* @return attributeBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getAttributeBoolean() {
return attributeBoolean;
@@ -205,6 +209,7 @@ public class XmlItem {
* Get wrappedArray
* @return wrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getWrappedArray() {
return wrappedArray;
@@ -223,6 +228,7 @@ public class XmlItem {
* Get nameString
* @return nameString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
@@ -241,6 +247,7 @@ public class XmlItem {
* Get nameNumber
* @return nameNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
@@ -259,6 +266,7 @@ public class XmlItem {
* Get nameInteger
* @return nameInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
@@ -277,6 +285,7 @@ public class XmlItem {
* Get nameBoolean
* @return nameBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNameBoolean() {
return nameBoolean;
@@ -303,6 +312,7 @@ public class XmlItem {
* Get nameArray
* @return nameArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameArray() {
return nameArray;
@@ -329,6 +339,7 @@ public class XmlItem {
* Get nameWrappedArray
* @return nameWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameWrappedArray() {
return nameWrappedArray;
@@ -347,6 +358,7 @@ public class XmlItem {
* Get prefixString
* @return prefixString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
@@ -365,6 +377,7 @@ public class XmlItem {
* Get prefixNumber
* @return prefixNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
@@ -383,6 +396,7 @@ public class XmlItem {
* Get prefixInteger
* @return prefixInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
@@ -401,6 +415,7 @@ public class XmlItem {
* Get prefixBoolean
* @return prefixBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixBoolean() {
return prefixBoolean;
@@ -427,6 +442,7 @@ public class XmlItem {
* Get prefixArray
* @return prefixArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixArray() {
return prefixArray;
@@ -453,6 +469,7 @@ public class XmlItem {
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixWrappedArray() {
return prefixWrappedArray;
@@ -471,6 +488,7 @@ public class XmlItem {
* Get namespaceString
* @return namespaceString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
@@ -489,6 +507,7 @@ public class XmlItem {
* Get namespaceNumber
* @return namespaceNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
@@ -507,6 +526,7 @@ public class XmlItem {
* Get namespaceInteger
* @return namespaceInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
@@ -525,6 +545,7 @@ public class XmlItem {
* Get namespaceBoolean
* @return namespaceBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNamespaceBoolean() {
return namespaceBoolean;
@@ -551,6 +572,7 @@ public class XmlItem {
* Get namespaceArray
* @return namespaceArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceArray() {
return namespaceArray;
@@ -577,6 +599,7 @@ public class XmlItem {
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceWrappedArray() {
return namespaceWrappedArray;
@@ -595,6 +618,7 @@ public class XmlItem {
* Get prefixNsString
* @return prefixNsString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
@@ -613,6 +637,7 @@ public class XmlItem {
* Get prefixNsNumber
* @return prefixNsNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
@@ -631,6 +656,7 @@ public class XmlItem {
* Get prefixNsInteger
* @return prefixNsInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
@@ -649,6 +675,7 @@ public class XmlItem {
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixNsBoolean() {
return prefixNsBoolean;
@@ -675,6 +702,7 @@ public class XmlItem {
* Get prefixNsArray
* @return prefixNsArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsArray() {
return prefixNsArray;
@@ -701,6 +729,7 @@ public class XmlItem {
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle
index 22f7fde908..0c9c756cdc 100644
--- a/samples/client/petstore/java/jersey2/build.gradle
+++ b/samples/client/petstore/java/jersey2/build.gradle
@@ -104,6 +104,7 @@ ext {
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml
index 51899df37e..d162686c0c 100644
--- a/samples/client/petstore/java/jersey2/pom.xml
+++ b/samples/client/petstore/java/jersey2/pom.xml
@@ -210,6 +210,13 @@
${swagger-annotations-version}
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
org.glassfish.jersey.core
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
index d223a661f8..69d6a81729 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesAnyType extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
index db738129d0..0147a592b7 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesArray extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
index 754ff32555..89aa511c2a 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesBoolean extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
index 2de7a27185..cb955d1165 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -80,6 +80,7 @@ public class AdditionalPropertiesClass {
* Get mapString
* @return mapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapString() {
return mapString;
@@ -106,6 +107,7 @@ public class AdditionalPropertiesClass {
* Get mapNumber
* @return mapNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapNumber() {
return mapNumber;
@@ -132,6 +134,7 @@ public class AdditionalPropertiesClass {
* Get mapInteger
* @return mapInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapInteger() {
return mapInteger;
@@ -158,6 +161,7 @@ public class AdditionalPropertiesClass {
* Get mapBoolean
* @return mapBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapBoolean() {
return mapBoolean;
@@ -184,6 +188,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger
* @return mapArrayInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayInteger() {
return mapArrayInteger;
@@ -210,6 +215,7 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapArrayAnytype() {
return mapArrayAnytype;
@@ -236,6 +242,7 @@ public class AdditionalPropertiesClass {
* Get mapMapString
* @return mapMapString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapString() {
return mapMapString;
@@ -262,6 +269,7 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype
* @return mapMapAnytype
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapAnytype() {
return mapMapAnytype;
@@ -280,6 +288,7 @@ public class AdditionalPropertiesClass {
* Get anytype1
* @return anytype1
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype1() {
return anytype1;
@@ -298,6 +307,7 @@ public class AdditionalPropertiesClass {
* Get anytype2
* @return anytype2
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype2() {
return anytype2;
@@ -316,6 +326,7 @@ public class AdditionalPropertiesClass {
* Get anytype3
* @return anytype3
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Object getAnytype3() {
return anytype3;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
index 1f61976466..f27ff011de 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesInteger extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
index 474d7b8f04..479696fdce 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
@@ -41,6 +41,7 @@ public class AdditionalPropertiesNumber extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
index 40ff424fe4..bd569b0da3 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesObject extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
index eeaedf3bda..27e03a2313 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
@@ -40,6 +40,7 @@ public class AdditionalPropertiesString extends HashMap {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java
index f210737e12..dc16717ac3 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Animal.java
@@ -67,6 +67,7 @@ public class Animal {
* Get color
* @return color
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
index f5c02b2326..b670ecb66e 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayNumber() {
return arrayArrayNumber;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
index 2dcfdf3c78..9d6997f88f 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -49,6 +49,7 @@ public class ArrayOfNumberOnly {
* Get arrayNumber
* @return arrayNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayNumber() {
return arrayNumber;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayTest.java
index 0778fc2d8f..7dc235f0a9 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayTest.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -55,6 +55,7 @@ public class ArrayTest {
* Get arrayOfString
* @return arrayOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayOfString() {
return arrayOfString;
@@ -81,6 +82,7 @@ public class ArrayTest {
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
@@ -107,6 +109,7 @@ public class ArrayTest {
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List> getArrayArrayOfModel() {
return arrayArrayOfModel;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Capitalization.java
index cedbd8c9db..3f3df29d5d 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Capitalization.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -53,6 +53,7 @@ public class Capitalization {
* Get smallCamel
* @return smallCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
@@ -71,6 +72,7 @@ public class Capitalization {
* Get capitalCamel
* @return capitalCamel
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
@@ -89,6 +91,7 @@ public class Capitalization {
* Get smallSnake
* @return smallSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
@@ -107,6 +110,7 @@ public class Capitalization {
* Get capitalSnake
* @return capitalSnake
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
@@ -125,6 +129,7 @@ public class Capitalization {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
@@ -143,6 +148,7 @@ public class Capitalization {
* Name of the pet
* @return ATT_NAME
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Cat.java
index 40f40f869e..a8108d6f15 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Cat.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Cat.java
@@ -40,6 +40,7 @@ public class Cat extends Animal {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/CatAllOf.java
index 0e8a7f8fa9..42e9614610 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/CatAllOf.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/CatAllOf.java
@@ -38,6 +38,7 @@ public class CatAllOf {
* Get declawed
* @return declawed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Category.java
index baf44c948a..3eccd2cd92 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Category.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Category.java
@@ -41,6 +41,7 @@ public class Category {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ClassModel.java
index 0904f531de..2aaed27fff 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ClassModel.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -39,6 +39,7 @@ public class ClassModel {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Client.java
index 9ebcc7294e..458e812960 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Client.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Client.java
@@ -38,6 +38,7 @@ public class Client {
* Get client
* @return client
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Dog.java
index 3b1c570cb4..83f5cb0e27 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Dog.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Dog.java
@@ -40,6 +40,7 @@ public class Dog extends Animal {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/DogAllOf.java
index cb95a6a372..d1e1402789 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/DogAllOf.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/DogAllOf.java
@@ -38,6 +38,7 @@ public class DogAllOf {
* Get breed
* @return breed
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java
index cb8d45860a..368b481f7e 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumArrays.java
@@ -113,6 +113,7 @@ public class EnumArrays {
* Get justSymbol
* @return justSymbol
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
@@ -139,6 +140,7 @@ public class EnumArrays {
* Get arrayEnum
* @return arrayEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getArrayEnum() {
return arrayEnum;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java
index bdf61d52c9..b365a8a56f 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -195,6 +195,7 @@ public class EnumTest {
* Get enumString
* @return enumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
@@ -231,6 +232,7 @@ public class EnumTest {
* Get enumInteger
* @return enumInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
@@ -249,6 +251,7 @@ public class EnumTest {
* Get enumNumber
* @return enumNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
@@ -267,6 +270,7 @@ public class EnumTest {
* Get outerEnum
* @return outerEnum
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
index 326b1a90a3..ca73764280 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -43,6 +43,7 @@ public class FileSchemaTestClass {
* Get file
* @return file
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public java.io.File getFile() {
return file;
@@ -69,6 +70,7 @@ public class FileSchemaTestClass {
* Get files
* @return files
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getFiles() {
return files;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FormatTest.java
index dd1c2d2f58..00d132529e 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -81,6 +81,7 @@ public class FormatTest {
* maximum: 100
* @return integer
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
@@ -101,6 +102,7 @@ public class FormatTest {
* maximum: 200
* @return int32
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
@@ -119,6 +121,7 @@ public class FormatTest {
* Get int64
* @return int64
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
@@ -159,6 +162,7 @@ public class FormatTest {
* maximum: 987.6
* @return _float
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
@@ -179,6 +183,7 @@ public class FormatTest {
* maximum: 123.4
* @return _double
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
@@ -197,6 +202,7 @@ public class FormatTest {
* Get string
* @return string
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getString() {
return string;
@@ -233,6 +239,7 @@ public class FormatTest {
* Get binary
* @return binary
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public File getBinary() {
return binary;
@@ -269,6 +276,7 @@ public class FormatTest {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -287,6 +295,7 @@ public class FormatTest {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
index 4dbede6b7d..e9453bb6cc 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
@@ -36,6 +36,7 @@ public class HasOnlyReadOnly {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -45,6 +46,7 @@ public class HasOnlyReadOnly {
* Get foo
* @return foo
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java
index 625b6be97d..44cd694057 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java
@@ -93,6 +93,7 @@ public class MapTest {
* Get mapMapOfString
* @return mapMapOfString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map> getMapMapOfString() {
return mapMapOfString;
@@ -119,6 +120,7 @@ public class MapTest {
* Get mapOfEnumString
* @return mapOfEnumString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMapOfEnumString() {
return mapOfEnumString;
@@ -145,6 +147,7 @@ public class MapTest {
* Get directMap
* @return directMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getDirectMap() {
return directMap;
@@ -171,6 +174,7 @@ public class MapTest {
* Get indirectMap
* @return indirectMap
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getIndirectMap() {
return indirectMap;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
index 0adbe0caa7..19d808093c 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -50,6 +50,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid
* @return uuid
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
@@ -68,6 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime
* @return dateTime
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getDateTime() {
return dateTime;
@@ -94,6 +96,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map
* @return map
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMap() {
return map;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Model200Response.java
index 3be60ea3ae..39fabeeb6d 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Model200Response.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Model200Response.java
@@ -42,6 +42,7 @@ public class Model200Response {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getName() {
return name;
@@ -60,6 +61,7 @@ public class Model200Response {
* Get propertyClass
* @return propertyClass
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelApiResponse.java
index 6e458e38dc..bb33412951 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelApiResponse.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelApiResponse.java
@@ -44,6 +44,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
@@ -62,6 +63,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getType() {
return type;
@@ -80,6 +82,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMessage() {
return message;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelReturn.java
index 62e5295212..9aafb13e04 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelReturn.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ModelReturn.java
@@ -39,6 +39,7 @@ public class ModelReturn {
* Get _return
* @return _return
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Name.java
index 852a999035..9518276dd6 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Name.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Name.java
@@ -61,6 +61,7 @@ public class Name {
* Get snakeCase
* @return snakeCase
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
@@ -75,6 +76,7 @@ public class Name {
* Get property
* @return property
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getProperty() {
return property;
@@ -88,6 +90,7 @@ public class Name {
* Get _123number
* @return _123number
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer get123number() {
return _123number;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/NumberOnly.java
index 530a4d5818..0245e8e210 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/NumberOnly.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/NumberOnly.java
@@ -39,6 +39,7 @@ public class NumberOnly {
* Get justNumber
* @return justNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java
index c6cee16a58..a9e2986a2f 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Order.java
@@ -91,6 +91,7 @@ public class Order {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -109,6 +110,7 @@ public class Order {
* Get petId
* @return petId
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getPetId() {
return petId;
@@ -127,6 +129,7 @@ public class Order {
* Get quantity
* @return quantity
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getQuantity() {
return quantity;
@@ -145,6 +148,7 @@ public class Order {
* Get shipDate
* @return shipDate
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getShipDate() {
return shipDate;
@@ -163,6 +167,7 @@ public class Order {
* Order Status
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() {
return status;
@@ -181,6 +186,7 @@ public class Order {
* Get complete
* @return complete
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getComplete() {
return complete;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java
index 6e71242384..c8bd99011c 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java
@@ -45,6 +45,7 @@ public class OuterComposite {
* Get myNumber
* @return myNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getMyNumber() {
return myNumber;
@@ -63,6 +64,7 @@ public class OuterComposite {
* Get myString
* @return myString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMyString() {
return myString;
@@ -81,6 +83,7 @@ public class OuterComposite {
* Get myBoolean
* @return myBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getMyBoolean() {
return myBoolean;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java
index 8a2408a296..a7d92129d7 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Pet.java
@@ -94,6 +94,7 @@ public class Pet {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -112,6 +113,7 @@ public class Pet {
* Get category
* @return category
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
@@ -179,6 +181,7 @@ public class Pet {
* Get tags
* @return tags
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getTags() {
return tags;
@@ -197,6 +200,7 @@ public class Pet {
* pet status in the store
* @return status
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
index 83f25c7923..1379ee09ea 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
@@ -36,6 +36,7 @@ public class ReadOnlyFirst {
* Get bar
* @return bar
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
@@ -50,6 +51,7 @@ public class ReadOnlyFirst {
* Get baz
* @return baz
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/SpecialModelName.java
index 5abfc132ad..869771afad 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/SpecialModelName.java
@@ -38,6 +38,7 @@ public class SpecialModelName {
* Get $specialPropertyName
* @return $specialPropertyName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long get$SpecialPropertyName() {
return $specialPropertyName;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Tag.java
index e2e947b84a..4bb498aff4 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Tag.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/Tag.java
@@ -41,6 +41,7 @@ public class Tag {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -59,6 +60,7 @@ public class Tag {
* Get name
* @return name
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getName() {
return name;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/User.java
index ee3f656a1a..73164c3ee2 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/User.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/User.java
@@ -59,6 +59,7 @@ public class User {
* Get id
* @return id
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
@@ -77,6 +78,7 @@ public class User {
* Get username
* @return username
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getUsername() {
return username;
@@ -95,6 +97,7 @@ public class User {
* Get firstName
* @return firstName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
@@ -113,6 +116,7 @@ public class User {
* Get lastName
* @return lastName
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
@@ -131,6 +135,7 @@ public class User {
* Get email
* @return email
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getEmail() {
return email;
@@ -149,6 +154,7 @@ public class User {
* Get password
* @return password
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPassword() {
return password;
@@ -167,6 +173,7 @@ public class User {
* Get phone
* @return phone
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
@@ -185,6 +192,7 @@ public class User {
* User Status
* @return userStatus
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/XmlItem.java
index cb31157306..9032c23424 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/XmlItem.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/XmlItem.java
@@ -125,6 +125,7 @@ public class XmlItem {
* Get attributeString
* @return attributeString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
@@ -143,6 +144,7 @@ public class XmlItem {
* Get attributeNumber
* @return attributeNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
@@ -161,6 +163,7 @@ public class XmlItem {
* Get attributeInteger
* @return attributeInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
@@ -179,6 +182,7 @@ public class XmlItem {
* Get attributeBoolean
* @return attributeBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getAttributeBoolean() {
return attributeBoolean;
@@ -205,6 +209,7 @@ public class XmlItem {
* Get wrappedArray
* @return wrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getWrappedArray() {
return wrappedArray;
@@ -223,6 +228,7 @@ public class XmlItem {
* Get nameString
* @return nameString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
@@ -241,6 +247,7 @@ public class XmlItem {
* Get nameNumber
* @return nameNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
@@ -259,6 +266,7 @@ public class XmlItem {
* Get nameInteger
* @return nameInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
@@ -277,6 +285,7 @@ public class XmlItem {
* Get nameBoolean
* @return nameBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNameBoolean() {
return nameBoolean;
@@ -303,6 +312,7 @@ public class XmlItem {
* Get nameArray
* @return nameArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameArray() {
return nameArray;
@@ -329,6 +339,7 @@ public class XmlItem {
* Get nameWrappedArray
* @return nameWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNameWrappedArray() {
return nameWrappedArray;
@@ -347,6 +358,7 @@ public class XmlItem {
* Get prefixString
* @return prefixString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
@@ -365,6 +377,7 @@ public class XmlItem {
* Get prefixNumber
* @return prefixNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
@@ -383,6 +396,7 @@ public class XmlItem {
* Get prefixInteger
* @return prefixInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
@@ -401,6 +415,7 @@ public class XmlItem {
* Get prefixBoolean
* @return prefixBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixBoolean() {
return prefixBoolean;
@@ -427,6 +442,7 @@ public class XmlItem {
* Get prefixArray
* @return prefixArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixArray() {
return prefixArray;
@@ -453,6 +469,7 @@ public class XmlItem {
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixWrappedArray() {
return prefixWrappedArray;
@@ -471,6 +488,7 @@ public class XmlItem {
* Get namespaceString
* @return namespaceString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
@@ -489,6 +507,7 @@ public class XmlItem {
* Get namespaceNumber
* @return namespaceNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
@@ -507,6 +526,7 @@ public class XmlItem {
* Get namespaceInteger
* @return namespaceInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
@@ -525,6 +545,7 @@ public class XmlItem {
* Get namespaceBoolean
* @return namespaceBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNamespaceBoolean() {
return namespaceBoolean;
@@ -551,6 +572,7 @@ public class XmlItem {
* Get namespaceArray
* @return namespaceArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceArray() {
return namespaceArray;
@@ -577,6 +599,7 @@ public class XmlItem {
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getNamespaceWrappedArray() {
return namespaceWrappedArray;
@@ -595,6 +618,7 @@ public class XmlItem {
* Get prefixNsString
* @return prefixNsString
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
@@ -613,6 +637,7 @@ public class XmlItem {
* Get prefixNsNumber
* @return prefixNsNumber
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
@@ -631,6 +656,7 @@ public class XmlItem {
* Get prefixNsInteger
* @return prefixNsInteger
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
@@ -649,6 +675,7 @@ public class XmlItem {
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
+ @javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixNsBoolean() {
return prefixNsBoolean;
@@ -675,6 +702,7 @@ public class XmlItem {
* Get prefixNsArray
* @return prefixNsArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsArray() {
return prefixNsArray;
@@ -701,6 +729,7 @@ public class XmlItem {
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
+ @javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
diff --git a/samples/client/petstore/java/native/.gitignore b/samples/client/petstore/java/native/.gitignore
new file mode 100644
index 0000000000..a530464afa
--- /dev/null
+++ b/samples/client/petstore/java/native/.gitignore
@@ -0,0 +1,21 @@
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# exclude jar for gradle wrapper
+!gradle/wrapper/*.jar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+# build files
+**/target
+target
+.gradle
+build
diff --git a/samples/client/petstore/java/native/.openapi-generator-ignore b/samples/client/petstore/java/native/.openapi-generator-ignore
new file mode 100644
index 0000000000..7484ee590a
--- /dev/null
+++ b/samples/client/petstore/java/native/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/client/petstore/java/native/.openapi-generator/VERSION b/samples/client/petstore/java/native/.openapi-generator/VERSION
new file mode 100644
index 0000000000..83a328a922
--- /dev/null
+++ b/samples/client/petstore/java/native/.openapi-generator/VERSION
@@ -0,0 +1 @@
+4.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/native/.travis.yml b/samples/client/petstore/java/native/.travis.yml
new file mode 100644
index 0000000000..d489da682e
--- /dev/null
+++ b/samples/client/petstore/java/native/.travis.yml
@@ -0,0 +1,16 @@
+#
+# Generated by: https://openapi-generator.tech
+#
+language: java
+jdk:
+ - oraclejdk11
+before_install:
+ # ensure gradlew has proper permission
+ - chmod a+x ./gradlew
+script:
+ # test using maven
+ - mvn test
+ # uncomment below to test using gradle
+ # - gradle test
+ # uncomment below to test using sbt
+ # - sbt test
diff --git a/samples/client/petstore/java/native/README.md b/samples/client/petstore/java/native/README.md
new file mode 100644
index 0000000000..6c5f47c0eb
--- /dev/null
+++ b/samples/client/petstore/java/native/README.md
@@ -0,0 +1,235 @@
+# petstore-native
+
+OpenAPI Petstore
+
+- API version: 1.0.0
+
+This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+
+*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
+
+## Requirements
+
+Building the API client library requires:
+
+1. Java 11+
+2. Maven/Gradle
+
+## Installation
+
+To install the API client library to your local Maven repository, simply execute:
+
+```shell
+mvn clean install
+```
+
+To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
+
+```shell
+mvn clean deploy
+```
+
+Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
+
+### Maven users
+
+Add this dependency to your project's POM:
+
+```xml
+
+ org.openapitools
+ petstore-native
+ 1.0.0
+ compile
+
+```
+
+### Gradle users
+
+Add this dependency to your project's build file:
+
+```groovy
+compile "org.openapitools:petstore-native:1.0.0"
+```
+
+### Others
+
+At first generate the JAR by executing:
+
+```shell
+mvn clean package
+```
+
+Then manually install the following JARs:
+
+- `target/petstore-native-1.0.0.jar`
+- `target/lib/*.jar`
+
+## Getting Started
+
+Please follow the [installation](#installation) instruction and execute the following Java code:
+
+```java
+
+import org.openapitools.client.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.AnotherFakeApi;
+
+public class AnotherFakeApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ // Configure clients using the `defaultClient` object, such as
+ // overriding the host and port, timeout, etc.
+ 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();
+ }
+ }
+}
+
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
+*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
+*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
+*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
+*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
+*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
+*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
+*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
+*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
+*FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
+*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
+*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
+*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
+*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
+*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
+*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
+*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
+*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
+*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
+*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
+*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
+*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
+*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
+*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
+*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
+*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
+*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
+*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
+
+
+## Documentation for Models
+
+ - [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)
+ - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
+ - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
+ - [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)
+ - [FileSchemaTestClass](docs/FileSchemaTestClass.md)
+ - [FormatTest](docs/FormatTest.md)
+ - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
+ - [MapTest](docs/MapTest.md)
+ - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
+ - [Model200Response](docs/Model200Response.md)
+ - [ModelApiResponse](docs/ModelApiResponse.md)
+ - [ModelReturn](docs/ModelReturn.md)
+ - [Name](docs/Name.md)
+ - [NumberOnly](docs/NumberOnly.md)
+ - [Order](docs/Order.md)
+ - [OuterComposite](docs/OuterComposite.md)
+ - [OuterEnum](docs/OuterEnum.md)
+ - [Pet](docs/Pet.md)
+ - [ReadOnlyFirst](docs/ReadOnlyFirst.md)
+ - [SpecialModelName](docs/SpecialModelName.md)
+ - [Tag](docs/Tag.md)
+ - [TypeHolderDefault](docs/TypeHolderDefault.md)
+ - [TypeHolderExample](docs/TypeHolderExample.md)
+ - [User](docs/User.md)
+ - [XmlItem](docs/XmlItem.md)
+
+
+## Documentation for Authorization
+
+Authentication schemes defined for the API:
+### api_key
+
+
+- **Type**: API key
+- **API key parameter name**: api_key
+- **Location**: HTTP header
+
+### api_key_query
+
+
+- **Type**: API key
+- **API key parameter name**: api_key_query
+- **Location**: URL query string
+
+### http_basic_test
+
+
+- **Type**: HTTP basic authentication
+
+### petstore_auth
+
+
+- **Type**: OAuth
+- **Flow**: implicit
+- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
+- **Scopes**:
+ - write:pets: modify pets in your account
+ - read:pets: read your pets
+
+
+## Recommendation
+
+It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
+However, the instances of the api clients created from the `ApiClient` are thread-safe and can be re-used.
+
+## Author
+
+
+
diff --git a/samples/client/petstore/java/native/build.gradle b/samples/client/petstore/java/native/build.gradle
new file mode 100644
index 0000000000..70f87373f8
--- /dev/null
+++ b/samples/client/petstore/java/native/build.gradle
@@ -0,0 +1,66 @@
+apply plugin: 'idea'
+apply plugin: 'eclipse'
+
+group = 'org.openapitools'
+version = '1.0.0'
+
+buildscript {
+ repositories {
+ mavenCentral()
+ jcenter()
+ }
+}
+
+repositories {
+ mavenCentral()
+ jcenter()
+}
+
+apply plugin: 'java'
+apply plugin: 'maven'
+
+sourceCompatibility = JavaVersion.VERSION_11
+targetCompatibility = JavaVersion.VERSION_11
+
+install {
+ repositories.mavenInstaller {
+ pom.artifactId = 'petstore-native'
+ }
+}
+
+task execute(type:JavaExec) {
+ main = System.getProperty('mainClass')
+ classpath = sourceSets.main.runtimeClasspath
+}
+
+task sourcesJar(type: Jar, dependsOn: classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+
+artifacts {
+ archives sourcesJar
+ archives javadocJar
+}
+
+
+ext {
+ swagger_annotations_version = "1.5.22"
+ jackson_version = "2.9.9"
+ junit_version = "4.12"
+}
+
+dependencies {
+ compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
+ compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
+ compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
+ compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
+ compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
+ testCompile "junit:junit:$junit_version"
+}
diff --git a/samples/client/petstore/java/native/build.sbt b/samples/client/petstore/java/native/build.sbt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesAnyType.md
new file mode 100644
index 0000000000..87b468bb7c
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesAnyType.md
@@ -0,0 +1,12 @@
+
+
+# AdditionalPropertiesAnyType
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesArray.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesArray.md
new file mode 100644
index 0000000000..cb7fe9b390
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesArray.md
@@ -0,0 +1,12 @@
+
+
+# AdditionalPropertiesArray
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesBoolean.md
new file mode 100644
index 0000000000..6b53e7ba73
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesBoolean.md
@@ -0,0 +1,12 @@
+
+
+# AdditionalPropertiesBoolean
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md
new file mode 100644
index 0000000000..36e1816200
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md
@@ -0,0 +1,22 @@
+
+
+# AdditionalPropertiesClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mapString** | **Map<String, String>** | | [optional]
+**mapNumber** | [**Map<String, BigDecimal>**](BigDecimal.md) | | [optional]
+**mapInteger** | **Map<String, Integer>** | | [optional]
+**mapBoolean** | **Map<String, Boolean>** | | [optional]
+**mapArrayInteger** | [**Map<String, List<Integer>>**](List.md) | | [optional]
+**mapArrayAnytype** | [**Map<String, List<Object>>**](List.md) | | [optional]
+**mapMapString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
+**mapMapAnytype** | [**Map<String, Map<String, Object>>**](Map.md) | | [optional]
+**anytype1** | [**Object**](.md) | | [optional]
+**anytype2** | [**Object**](.md) | | [optional]
+**anytype3** | [**Object**](.md) | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesInteger.md
new file mode 100644
index 0000000000..d2ed7fb1a4
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesInteger.md
@@ -0,0 +1,12 @@
+
+
+# AdditionalPropertiesInteger
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesNumber.md
new file mode 100644
index 0000000000..53f6e81e71
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesNumber.md
@@ -0,0 +1,12 @@
+
+
+# AdditionalPropertiesNumber
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesObject.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesObject.md
new file mode 100644
index 0000000000..98ac8d2e5f
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesObject.md
@@ -0,0 +1,12 @@
+
+
+# AdditionalPropertiesObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesString.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesString.md
new file mode 100644
index 0000000000..d7970cdfe1
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesString.md
@@ -0,0 +1,12 @@
+
+
+# AdditionalPropertiesString
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Animal.md b/samples/client/petstore/java/native/docs/Animal.md
new file mode 100644
index 0000000000..c8e18ae55e
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Animal.md
@@ -0,0 +1,13 @@
+
+
+# Animal
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**className** | **String** | |
+**color** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/AnotherFakeApi.md b/samples/client/petstore/java/native/docs/AnotherFakeApi.md
new file mode 100644
index 0000000000..059616ec6b
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/AnotherFakeApi.md
@@ -0,0 +1,74 @@
+# AnotherFakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+
+
+
+## call123testSpecialTags
+
+> Client call123testSpecialTags(body)
+
+To test special tags
+
+To test special tags and operation ID starting with number
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.AnotherFakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/native/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/native/docs/ArrayOfArrayOfNumberOnly.md
new file mode 100644
index 0000000000..a48aa23e78
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/ArrayOfArrayOfNumberOnly.md
@@ -0,0 +1,12 @@
+
+
+# ArrayOfArrayOfNumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arrayArrayNumber** | [**List<List<BigDecimal>>**](List.md) | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/native/docs/ArrayOfNumberOnly.md
new file mode 100644
index 0000000000..fa2909211a
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/ArrayOfNumberOnly.md
@@ -0,0 +1,12 @@
+
+
+# ArrayOfNumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arrayNumber** | [**List<BigDecimal>**](BigDecimal.md) | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/ArrayTest.md b/samples/client/petstore/java/native/docs/ArrayTest.md
new file mode 100644
index 0000000000..9ad1c9814a
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/ArrayTest.md
@@ -0,0 +1,14 @@
+
+
+# ArrayTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arrayOfString** | **List<String>** | | [optional]
+**arrayArrayOfInteger** | [**List<List<Long>>**](List.md) | | [optional]
+**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Capitalization.md b/samples/client/petstore/java/native/docs/Capitalization.md
new file mode 100644
index 0000000000..7b73c40b55
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Capitalization.md
@@ -0,0 +1,17 @@
+
+
+# Capitalization
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**smallCamel** | **String** | | [optional]
+**capitalCamel** | **String** | | [optional]
+**smallSnake** | **String** | | [optional]
+**capitalSnake** | **String** | | [optional]
+**scAETHFlowPoints** | **String** | | [optional]
+**ATT_NAME** | **String** | Name of the pet | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Cat.md b/samples/client/petstore/java/native/docs/Cat.md
new file mode 100644
index 0000000000..39c2f864df
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Cat.md
@@ -0,0 +1,12 @@
+
+
+# Cat
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**declawed** | **Boolean** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/CatAllOf.md b/samples/client/petstore/java/native/docs/CatAllOf.md
new file mode 100644
index 0000000000..1098fd900c
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/CatAllOf.md
@@ -0,0 +1,12 @@
+
+
+# CatAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**declawed** | **Boolean** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Category.md b/samples/client/petstore/java/native/docs/Category.md
new file mode 100644
index 0000000000..613ea9f7ee
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Category.md
@@ -0,0 +1,13 @@
+
+
+# Category
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**name** | **String** | |
+
+
+
diff --git a/samples/client/petstore/java/native/docs/ClassModel.md b/samples/client/petstore/java/native/docs/ClassModel.md
new file mode 100644
index 0000000000..fa6c9b6e3e
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/ClassModel.md
@@ -0,0 +1,12 @@
+
+
+# ClassModel
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**propertyClass** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Client.md b/samples/client/petstore/java/native/docs/Client.md
new file mode 100644
index 0000000000..228df49238
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Client.md
@@ -0,0 +1,12 @@
+
+
+# Client
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Dog.md b/samples/client/petstore/java/native/docs/Dog.md
new file mode 100644
index 0000000000..73cedf2bc9
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Dog.md
@@ -0,0 +1,12 @@
+
+
+# Dog
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**breed** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/DogAllOf.md b/samples/client/petstore/java/native/docs/DogAllOf.md
new file mode 100644
index 0000000000..cbeb9e9a22
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/DogAllOf.md
@@ -0,0 +1,12 @@
+
+
+# DogAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**breed** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/EnumArrays.md b/samples/client/petstore/java/native/docs/EnumArrays.md
new file mode 100644
index 0000000000..869b7a6c06
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/EnumArrays.md
@@ -0,0 +1,31 @@
+
+
+# EnumArrays
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional]
+**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional]
+
+
+
+## Enum: JustSymbolEnum
+
+Name | Value
+---- | -----
+GREATER_THAN_OR_EQUAL_TO | ">="
+DOLLAR | "$"
+
+
+
+## Enum: List<ArrayEnumEnum>
+
+Name | Value
+---- | -----
+FISH | "fish"
+CRAB | "crab"
+
+
+
diff --git a/samples/client/petstore/java/native/docs/EnumClass.md b/samples/client/petstore/java/native/docs/EnumClass.md
new file mode 100644
index 0000000000..b314590a75
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/EnumClass.md
@@ -0,0 +1,15 @@
+
+
+# EnumClass
+
+## Enum
+
+
+* `_ABC` (value: `"_abc"`)
+
+* `_EFG` (value: `"-efg"`)
+
+* `_XYZ_` (value: `"(xyz)"`)
+
+
+
diff --git a/samples/client/petstore/java/native/docs/EnumTest.md b/samples/client/petstore/java/native/docs/EnumTest.md
new file mode 100644
index 0000000000..61eb95f22f
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/EnumTest.md
@@ -0,0 +1,54 @@
+
+
+# EnumTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
+**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | |
+**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
+**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
+**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
+
+
+
+## Enum: EnumStringEnum
+
+Name | Value
+---- | -----
+UPPER | "UPPER"
+LOWER | "lower"
+EMPTY | ""
+
+
+
+## Enum: EnumStringRequiredEnum
+
+Name | Value
+---- | -----
+UPPER | "UPPER"
+LOWER | "lower"
+EMPTY | ""
+
+
+
+## Enum: EnumIntegerEnum
+
+Name | Value
+---- | -----
+NUMBER_1 | 1
+NUMBER_MINUS_1 | -1
+
+
+
+## Enum: EnumNumberEnum
+
+Name | Value
+---- | -----
+NUMBER_1_DOT_1 | 1.1
+NUMBER_MINUS_1_DOT_2 | -1.2
+
+
+
diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md
new file mode 100644
index 0000000000..9a2e477020
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/FakeApi.md
@@ -0,0 +1,914 @@
+# FakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
+[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
+[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
+[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
+[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
+[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
+[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
+[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
+[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
+
+
+
+## createXmlItem
+
+> createXmlItem(xmlItem)
+
+creates an XmlItem
+
+this route creates an XmlItem
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+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
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## fakeOuterBooleanSerialize
+
+> Boolean fakeOuterBooleanSerialize(body)
+
+
+
+Test serialization of outer boolean types
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **Boolean**| Input boolean as post body | [optional]
+
+### Return type
+
+**Boolean**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: */*
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output boolean | - |
+
+
+## fakeOuterCompositeSerialize
+
+> OuterComposite fakeOuterCompositeSerialize(body)
+
+
+
+Test serialization of object with outer number type
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+
+### Return type
+
+[**OuterComposite**](OuterComposite.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: */*
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output composite | - |
+
+
+## fakeOuterNumberSerialize
+
+> BigDecimal fakeOuterNumberSerialize(body)
+
+
+
+Test serialization of outer number types
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **BigDecimal**| Input number as post body | [optional]
+
+### Return type
+
+[**BigDecimal**](BigDecimal.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: */*
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output number | - |
+
+
+## fakeOuterStringSerialize
+
+> String fakeOuterStringSerialize(body)
+
+
+
+Test serialization of outer string types
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **String**| Input string as post body | [optional]
+
+### Return type
+
+**String**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: */*
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output string | - |
+
+
+## testBodyWithFileSchema
+
+> testBodyWithFileSchema(body)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+
+## testBodyWithQueryParams
+
+> testBodyWithQueryParams(query, body)
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query** | **String**| |
+ **body** | [**User**](User.md)| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+
+## testClientModel
+
+> Client testClientModel(body)
+
+To test \"client\" model
+
+To test \"client\" model
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## testEndpointParameters
+
+> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **number** | **BigDecimal**| None |
+ **_double** | **Double**| None |
+ **patternWithoutDelimiter** | **String**| None |
+ **_byte** | **byte[]**| None |
+ **integer** | **Integer**| None | [optional]
+ **int32** | **Integer**| None | [optional]
+ **int64** | **Long**| None | [optional]
+ **_float** | **Float**| None | [optional]
+ **string** | **String**| None | [optional]
+ **binary** | **File**| None | [optional]
+ **date** | **LocalDate**| None | [optional]
+ **dateTime** | **OffsetDateTime**| None | [optional]
+ **password** | **String**| None | [optional]
+ **paramCallback** | **String**| None | [optional]
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[http_basic_test](../README.md#http_basic_test)
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+
+## testEnumParameters
+
+> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
+
+To test enum parameters
+
+To test enum parameters
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
+ **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
+ **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
+ **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
+ **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2]
+ **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
+ **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
+ **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid request | - |
+| **404** | Not found | - |
+
+
+## testGroupParameters
+
+> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
+
+Fake endpoint to test group parameters (optional)
+
+Fake endpoint to test group parameters (optional)
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **requiredStringGroup** | **Integer**| Required String in group parameters |
+ **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters |
+ **requiredInt64Group** | **Long**| Required Integer in group parameters |
+ **stringGroup** | **Integer**| String in group parameters | [optional]
+ **booleanGroup** | **Boolean**| Boolean in group parameters | [optional]
+ **int64Group** | **Long**| Integer in group parameters | [optional]
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Someting wrong | - |
+
+
+## testInlineAdditionalProperties
+
+> testInlineAdditionalProperties(param)
+
+test inline additionalProperties
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **param** | [**Map<String, String>**](String.md)| request body |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## testJsonFormData
+
+> testJsonFormData(param, param2)
+
+test json serialization of form data
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **param** | **String**| field1 |
+ **param2** | **String**| field2 |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md
new file mode 100644
index 0000000000..14a74a37a4
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md
@@ -0,0 +1,81 @@
+# FakeClassnameTags123Api
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+
+## testClassname
+
+> Client testClassname(body)
+
+To test class name in snake case
+
+To test class name in snake case
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeClassnameTags123Api;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+[api_key_query](../README.md#api_key_query)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/native/docs/FileSchemaTestClass.md b/samples/client/petstore/java/native/docs/FileSchemaTestClass.md
new file mode 100644
index 0000000000..3a95e27d7c
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/FileSchemaTestClass.md
@@ -0,0 +1,13 @@
+
+
+# FileSchemaTestClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | [**java.io.File**](java.io.File.md) | | [optional]
+**files** | [**List<java.io.File>**](java.io.File.md) | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/FormatTest.md b/samples/client/petstore/java/native/docs/FormatTest.md
new file mode 100644
index 0000000000..29f68d18ec
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/FormatTest.md
@@ -0,0 +1,24 @@
+
+
+# FormatTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**integer** | **Integer** | | [optional]
+**int32** | **Integer** | | [optional]
+**int64** | **Long** | | [optional]
+**number** | [**BigDecimal**](BigDecimal.md) | |
+**_float** | **Float** | | [optional]
+**_double** | **Double** | | [optional]
+**string** | **String** | | [optional]
+**_byte** | **byte[]** | |
+**binary** | [**File**](File.md) | | [optional]
+**date** | [**LocalDate**](LocalDate.md) | |
+**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
+**uuid** | [**UUID**](UUID.md) | | [optional]
+**password** | **String** | |
+
+
+
diff --git a/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md
new file mode 100644
index 0000000000..3abb662c38
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/HasOnlyReadOnly.md
@@ -0,0 +1,13 @@
+
+
+# HasOnlyReadOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **String** | | [optional]
+**foo** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/MapTest.md b/samples/client/petstore/java/native/docs/MapTest.md
new file mode 100644
index 0000000000..c35c3cf2c0
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/MapTest.md
@@ -0,0 +1,24 @@
+
+
+# MapTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
+**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
+**directMap** | **Map<String, Boolean>** | | [optional]
+**indirectMap** | **Map<String, Boolean>** | | [optional]
+
+
+
+## Enum: Map<String, InnerEnum>
+
+Name | Value
+---- | -----
+UPPER | "UPPER"
+LOWER | "lower"
+
+
+
diff --git a/samples/client/petstore/java/native/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/native/docs/MixedPropertiesAndAdditionalPropertiesClass.md
new file mode 100644
index 0000000000..3dc283ae49
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -0,0 +1,14 @@
+
+
+# MixedPropertiesAndAdditionalPropertiesClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uuid** | [**UUID**](UUID.md) | | [optional]
+**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
+**map** | [**Map<String, Animal>**](Animal.md) | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Model200Response.md b/samples/client/petstore/java/native/docs/Model200Response.md
new file mode 100644
index 0000000000..e2b5738a69
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Model200Response.md
@@ -0,0 +1,13 @@
+
+
+# Model200Response
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **Integer** | | [optional]
+**propertyClass** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/ModelApiResponse.md b/samples/client/petstore/java/native/docs/ModelApiResponse.md
new file mode 100644
index 0000000000..14fb7f1ed2
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/ModelApiResponse.md
@@ -0,0 +1,14 @@
+
+
+# ModelApiResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **Integer** | | [optional]
+**type** | **String** | | [optional]
+**message** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/ModelReturn.md b/samples/client/petstore/java/native/docs/ModelReturn.md
new file mode 100644
index 0000000000..44dc3c0a35
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/ModelReturn.md
@@ -0,0 +1,12 @@
+
+
+# ModelReturn
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_return** | **Integer** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Name.md b/samples/client/petstore/java/native/docs/Name.md
new file mode 100644
index 0000000000..cde0ebd7f2
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Name.md
@@ -0,0 +1,15 @@
+
+
+# Name
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **Integer** | |
+**snakeCase** | **Integer** | | [optional]
+**property** | **String** | | [optional]
+**_123number** | **Integer** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/NumberOnly.md b/samples/client/petstore/java/native/docs/NumberOnly.md
new file mode 100644
index 0000000000..1c12b6adf3
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/NumberOnly.md
@@ -0,0 +1,12 @@
+
+
+# NumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Order.md b/samples/client/petstore/java/native/docs/Order.md
new file mode 100644
index 0000000000..409fc4cc96
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Order.md
@@ -0,0 +1,27 @@
+
+
+# Order
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**petId** | **Long** | | [optional]
+**quantity** | **Integer** | | [optional]
+**shipDate** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
+**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional]
+**complete** | **Boolean** | | [optional]
+
+
+
+## Enum: StatusEnum
+
+Name | Value
+---- | -----
+PLACED | "placed"
+APPROVED | "approved"
+DELIVERED | "delivered"
+
+
+
diff --git a/samples/client/petstore/java/native/docs/OuterComposite.md b/samples/client/petstore/java/native/docs/OuterComposite.md
new file mode 100644
index 0000000000..e062922188
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/OuterComposite.md
@@ -0,0 +1,14 @@
+
+
+# OuterComposite
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**myNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
+**myString** | **String** | | [optional]
+**myBoolean** | **Boolean** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/OuterEnum.md b/samples/client/petstore/java/native/docs/OuterEnum.md
new file mode 100644
index 0000000000..1f9b723eb8
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/OuterEnum.md
@@ -0,0 +1,15 @@
+
+
+# OuterEnum
+
+## Enum
+
+
+* `PLACED` (value: `"placed"`)
+
+* `APPROVED` (value: `"approved"`)
+
+* `DELIVERED` (value: `"delivered"`)
+
+
+
diff --git a/samples/client/petstore/java/native/docs/Pet.md b/samples/client/petstore/java/native/docs/Pet.md
new file mode 100644
index 0000000000..37ac007b79
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Pet.md
@@ -0,0 +1,27 @@
+
+
+# Pet
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**category** | [**Category**](Category.md) | | [optional]
+**name** | **String** | |
+**photoUrls** | **List<String>** | |
+**tags** | [**List<Tag>**](Tag.md) | | [optional]
+**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
+
+
+
+## Enum: StatusEnum
+
+Name | Value
+---- | -----
+AVAILABLE | "available"
+PENDING | "pending"
+SOLD | "sold"
+
+
+
diff --git a/samples/client/petstore/java/native/docs/PetApi.md b/samples/client/petstore/java/native/docs/PetApi.md
new file mode 100644
index 0000000000..875a8e6783
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/PetApi.md
@@ -0,0 +1,656 @@
+# PetApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
+[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
+[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
+[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
+[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
+[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
+[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
+[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+
+
+
+## addPet
+
+> addPet(body)
+
+Add a new pet to the store
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json, application/xml
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **405** | Invalid input | - |
+
+
+## deletePet
+
+> deletePet(petId, apiKey)
+
+Deletes a pet
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| Pet id to delete |
+ **apiKey** | **String**| | [optional]
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid pet value | - |
+
+
+## findPetsByStatus
+
+> List<Pet> findPetsByStatus(status)
+
+Finds Pets by status
+
+Multiple status values can be provided with comma separated strings
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+
+
+## findPetsByTags
+
+> List<Pet> findPetsByTags(tags)
+
+Finds Pets by tags
+
+Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **tags** | [**List<String>**](String.md)| Tags to filter by |
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid tag value | - |
+
+
+## getPetById
+
+> Pet getPetById(petId)
+
+Find pet by ID
+
+Returns a single pet
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| ID of pet to return |
+
+### Return type
+
+[**Pet**](Pet.md)
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+
+
+## updatePet
+
+> updatePet(body)
+
+Update an existing pet
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **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
+
+> updatePetWithForm(petId, name, status)
+
+Updates a pet in the store with form data
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| ID of pet that needs to be updated |
+ **name** | **String**| Updated name of the pet | [optional]
+ **status** | **String**| Updated status of the pet | [optional]
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
+
+## uploadFile
+
+> ModelApiResponse uploadFile(petId, additionalMetadata, file)
+
+uploads an image
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| ID of pet to update |
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional]
+ **file** | **File**| file to upload | [optional]
+
+### Return type
+
+[**ModelApiResponse**](ModelApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## uploadFileWithRequiredFile
+
+> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
+
+uploads an image (required)
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Long**| ID of pet to update |
+ **requiredFile** | **File**| file to upload |
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional]
+
+### Return type
+
+[**ModelApiResponse**](ModelApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/native/docs/ReadOnlyFirst.md b/samples/client/petstore/java/native/docs/ReadOnlyFirst.md
new file mode 100644
index 0000000000..c38ed3bae4
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/ReadOnlyFirst.md
@@ -0,0 +1,13 @@
+
+
+# ReadOnlyFirst
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **String** | | [optional]
+**baz** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/SpecialModelName.md b/samples/client/petstore/java/native/docs/SpecialModelName.md
new file mode 100644
index 0000000000..934b8f0f25
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/SpecialModelName.md
@@ -0,0 +1,12 @@
+
+
+# SpecialModelName
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**$specialPropertyName** | **Long** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/StoreApi.md b/samples/client/petstore/java/native/docs/StoreApi.md
new file mode 100644
index 0000000000..352399ea51
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/StoreApi.md
@@ -0,0 +1,276 @@
+# StoreApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
+[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
+[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
+
+
+
+## deleteOrder
+
+> deleteOrder(orderId)
+
+Delete purchase order by ID
+
+For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **orderId** | **String**| ID of the order that needs to be deleted |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+
+## getInventory
+
+> Map<String, Integer> getInventory()
+
+Returns pet inventories by status
+
+Returns a map of status codes to quantities
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+
+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");
+
+ 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();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+**Map<String, Integer>**
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## getOrderById
+
+> Order getOrderById(orderId)
+
+Find purchase order by ID
+
+For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **orderId** | **Long**| ID of pet that needs to be fetched |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+
+## placeOrder
+
+> Order placeOrder(body)
+
+Place an order for a pet
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid Order | - |
+
diff --git a/samples/client/petstore/java/native/docs/Tag.md b/samples/client/petstore/java/native/docs/Tag.md
new file mode 100644
index 0000000000..f24eba7d22
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/Tag.md
@@ -0,0 +1,13 @@
+
+
+# Tag
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**name** | **String** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/TypeHolderDefault.md b/samples/client/petstore/java/native/docs/TypeHolderDefault.md
new file mode 100644
index 0000000000..a338fc900c
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/TypeHolderDefault.md
@@ -0,0 +1,16 @@
+
+
+# TypeHolderDefault
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**stringItem** | **String** | |
+**numberItem** | [**BigDecimal**](BigDecimal.md) | |
+**integerItem** | **Integer** | |
+**boolItem** | **Boolean** | |
+**arrayItem** | **List<Integer>** | |
+
+
+
diff --git a/samples/client/petstore/java/native/docs/TypeHolderExample.md b/samples/client/petstore/java/native/docs/TypeHolderExample.md
new file mode 100644
index 0000000000..16b91b0152
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/TypeHolderExample.md
@@ -0,0 +1,16 @@
+
+
+# TypeHolderExample
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**stringItem** | **String** | |
+**numberItem** | [**BigDecimal**](BigDecimal.md) | |
+**integerItem** | **Integer** | |
+**boolItem** | **Boolean** | |
+**arrayItem** | **List<Integer>** | |
+
+
+
diff --git a/samples/client/petstore/java/native/docs/User.md b/samples/client/petstore/java/native/docs/User.md
new file mode 100644
index 0000000000..c4ea94b7fc
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/User.md
@@ -0,0 +1,19 @@
+
+
+# User
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **Long** | | [optional]
+**username** | **String** | | [optional]
+**firstName** | **String** | | [optional]
+**lastName** | **String** | | [optional]
+**email** | **String** | | [optional]
+**password** | **String** | | [optional]
+**phone** | **String** | | [optional]
+**userStatus** | **Integer** | User Status | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/docs/UserApi.md b/samples/client/petstore/java/native/docs/UserApi.md
new file mode 100644
index 0000000000..4154aba4f1
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/UserApi.md
@@ -0,0 +1,525 @@
+# UserApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
+[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
+[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
+[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
+[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
+[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
+[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
+[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
+
+
+
+## createUser
+
+> createUser(body)
+
+Create user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**User**](User.md)| Created user object |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## createUsersWithArrayInput
+
+> createUsersWithArrayInput(body)
+
+Creates list of users with given input array
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**List<User>**](User.md)| List of user object |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## createUsersWithListInput
+
+> createUsersWithListInput(body)
+
+Creates list of users with given input array
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**List<User>**](User.md)| List of user object |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## deleteUser
+
+> deleteUser(username)
+
+Delete user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The name that needs to be deleted |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+
+## getUserByName
+
+> User getUserByName(username)
+
+Get user by user name
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The name that needs to be fetched. Use user1 for testing. |
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+
+## loginUser
+
+> String loginUser(username, password)
+
+Logs user into the system
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The user name for login |
+ **password** | **String**| The password for login in clear text |
+
+### Return type
+
+**String**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * 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
+
+> logoutUser()
+
+Logs out current logged in user session
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## updateUser
+
+> updateUser(username, body)
+
+Updated user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.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(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();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| name that need to be deleted |
+ **body** | [**User**](User.md)| Updated user object |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid user supplied | - |
+| **404** | User not found | - |
+
diff --git a/samples/client/petstore/java/native/docs/XmlItem.md b/samples/client/petstore/java/native/docs/XmlItem.md
new file mode 100644
index 0000000000..6065fd1f4e
--- /dev/null
+++ b/samples/client/petstore/java/native/docs/XmlItem.md
@@ -0,0 +1,40 @@
+
+
+# XmlItem
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**attributeString** | **String** | | [optional]
+**attributeNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
+**attributeInteger** | **Integer** | | [optional]
+**attributeBoolean** | **Boolean** | | [optional]
+**wrappedArray** | **List<Integer>** | | [optional]
+**nameString** | **String** | | [optional]
+**nameNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
+**nameInteger** | **Integer** | | [optional]
+**nameBoolean** | **Boolean** | | [optional]
+**nameArray** | **List<Integer>** | | [optional]
+**nameWrappedArray** | **List<Integer>** | | [optional]
+**prefixString** | **String** | | [optional]
+**prefixNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
+**prefixInteger** | **Integer** | | [optional]
+**prefixBoolean** | **Boolean** | | [optional]
+**prefixArray** | **List<Integer>** | | [optional]
+**prefixWrappedArray** | **List<Integer>** | | [optional]
+**namespaceString** | **String** | | [optional]
+**namespaceNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
+**namespaceInteger** | **Integer** | | [optional]
+**namespaceBoolean** | **Boolean** | | [optional]
+**namespaceArray** | **List<Integer>** | | [optional]
+**namespaceWrappedArray** | **List<Integer>** | | [optional]
+**prefixNsString** | **String** | | [optional]
+**prefixNsNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
+**prefixNsInteger** | **Integer** | | [optional]
+**prefixNsBoolean** | **Boolean** | | [optional]
+**prefixNsArray** | **List<Integer>** | | [optional]
+**prefixNsWrappedArray** | **List<Integer>** | | [optional]
+
+
+
diff --git a/samples/client/petstore/java/native/git_push.sh b/samples/client/petstore/java/native/git_push.sh
new file mode 100644
index 0000000000..8442b80bb4
--- /dev/null
+++ b/samples/client/petstore/java/native/git_push.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="GIT_USER_ID"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="GIT_REPO_ID"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=`git remote`
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/samples/client/petstore/java/native/gradle.properties b/samples/client/petstore/java/native/gradle.properties
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/samples/client/petstore/java/native/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/native/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000000..5c2d1cf016
Binary files /dev/null and b/samples/client/petstore/java/native/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/samples/client/petstore/java/native/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/native/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000..b0acbdcd73
--- /dev/null
+++ b/samples/client/petstore/java/native/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/samples/client/petstore/java/native/gradlew b/samples/client/petstore/java/native/gradlew
new file mode 100644
index 0000000000..8e25e6c19d
--- /dev/null
+++ b/samples/client/petstore/java/native/gradlew
@@ -0,0 +1,188 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/samples/client/petstore/java/native/gradlew.bat b/samples/client/petstore/java/native/gradlew.bat
new file mode 100644
index 0000000000..9618d8d960
--- /dev/null
+++ b/samples/client/petstore/java/native/gradlew.bat
@@ -0,0 +1,100 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/samples/client/petstore/java/native/pom.xml b/samples/client/petstore/java/native/pom.xml
new file mode 100644
index 0000000000..522945ca75
--- /dev/null
+++ b/samples/client/petstore/java/native/pom.xml
@@ -0,0 +1,208 @@
+
+ 4.0.0
+ org.openapitools
+ petstore-native
+ jar
+ petstore-native
+ 1.0.0
+ https://github.com/openapitools/openapi-generator
+ OpenAPI Java
+
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ https://github.com/openapitools/openapi-generator
+
+
+
+
+ Unlicense
+ http://www.apache.org/licenses/LICENSE-2.0.html
+ repo
+
+
+
+
+
+ OpenAPI-Generator Contributors
+ team@openapitools.org
+ OpenAPITools.org
+ http://openapitools.org
+
+
+
+
+
+
+ maven-enforcer-plugin
+ 3.0.0-M1
+
+
+ enforce-maven
+
+ enforce
+
+
+
+
+ 3
+
+
+ 11
+
+
+
+
+
+
+
+ maven-surefire-plugin
+ 3.0.0-M3
+
+
+ conf/log4j.properties
+
+ -Xms512m -Xmx1500m
+ methods
+ 10
+
+
+
+ maven-dependency-plugin
+ 3.1.1
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/lib
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.1.2
+
+
+
+ test-jar
+
+
+
+
+
+
+
+ maven-compiler-plugin
+ 3.8.1
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.1.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ maven-source-plugin
+ 3.1.0
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ maven-gpg-plugin
+ 1.6
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
+
+
+ io.swagger
+ swagger-annotations
+ ${swagger-annotations-version}
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ ${jackson-version}
+
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+
+
+ junit
+ junit
+ ${junit-version}
+ test
+
+
+
+ UTF-8
+ 1.5.22
+ 11
+ 11
+ 2.9.9
+ 4.12
+
+
diff --git a/samples/client/petstore/java/native/settings.gradle b/samples/client/petstore/java/native/settings.gradle
new file mode 100644
index 0000000000..b8b464b291
--- /dev/null
+++ b/samples/client/petstore/java/native/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = "petstore-native"
\ No newline at end of file
diff --git a/samples/client/petstore/java/native/src/main/AndroidManifest.xml b/samples/client/petstore/java/native/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..54fbcb3da1
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/AndroidManifest.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java
new file mode 100644
index 0000000000..d09776ee9f
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java
@@ -0,0 +1,317 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.nio.charset.Charset;
+import java.time.Duration;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.StringJoiner;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+
+/**
+ * Configuration and utility class for API clients.
+ *
+ * This class can be constructed and modified, then used to instantiate the
+ * various API classes. The API classes use the settings in this class to
+ * configure themselves, but otherwise do not store a link to this class.
+ *
+ * This class is mutable and not synchronized, so it is not thread-safe.
+ * The API classes generated from this are immutable and thread-safe.
+ *
+ * The setter methods of this class return the current object to facilitate
+ * a fluent style of configuration.
+ */
+
+public class ApiClient {
+
+ private static final Charset UTF_8 = Charset.forName("UTF-8");
+
+ private HttpClient.Builder builder;
+ private ObjectMapper mapper;
+ private String scheme;
+ private String host;
+ private int port;
+ private String basePath;
+ private Consumer interceptor;
+ private Duration readTimeout;
+
+ private static String valueToString(Object value) {
+ if (value == null) {
+ return "";
+ }
+ return value.toString();
+ }
+
+ /**
+ * URL encode a string in the UTF-8 encoding.
+ *
+ * @param s String to encode.
+ * @return URL-encoded representation of the input string.
+ */
+ public static String urlEncode(String s) {
+ return URLEncoder.encode(s, UTF_8);
+ }
+
+ /**
+ * Convert a URL query name/value parameter to a list of encoded {@link Pair}
+ * objects.
+ *
+ * The value can be null, in which case an empty list is returned.
+ *
+ * @param name The query name parameter.
+ * @param value The query value, which may not be a collection but may be
+ * null.
+ * @return A singleton list of the {@link Pair} objects representing the input
+ * parameters, which is encoded for use in a URL. If the value is null, an
+ * empty list is returned.
+ */
+ public static List parameterToPairs(String name, Object value) {
+ if (name == null || name.isEmpty() || value == null) {
+ return Collections.emptyList();
+ }
+ return Collections.singletonList(new Pair(urlEncode(name), urlEncode(value.toString())));
+ }
+
+ /**
+ * Convert a URL query name/collection parameter to a list of encoded
+ * {@link Pair} objects.
+ *
+ * @param collectionFormat The swagger collectionFormat string (csv, tsv, etc).
+ * @param name The query name parameter.
+ * @param values A collection of values for the given query name, which may be
+ * null.
+ * @return A list of {@link Pair} objects representing the input parameters,
+ * which is encoded for use in a URL. If the values collection is null, an
+ * empty list is returned.
+ */
+ public static List parameterToPairs(
+ String collectionFormat, String name, Collection> values) {
+ if (name == null || name.isEmpty() || values == null || values.isEmpty()) {
+ return Collections.emptyList();
+ }
+
+ // get the collection format (default: csv)
+ String format = collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat;
+
+ // create the params based on the collection format
+ if ("multi".equals(format)) {
+ return values.stream()
+ .map(value -> new Pair(urlEncode(name), urlEncode(valueToString(value))))
+ .collect(Collectors.toList());
+ }
+
+ String delimiter;
+ switch(format) {
+ case "csv":
+ delimiter = urlEncode(",");
+ break;
+ case "ssv":
+ delimiter = urlEncode(" ");
+ break;
+ case "tsv":
+ delimiter = urlEncode("\t");
+ break;
+ case "pipes":
+ delimiter = urlEncode("|");
+ break;
+ default:
+ throw new IllegalArgumentException("Illegal collection format: " + collectionFormat);
+ }
+
+ StringJoiner joiner = new StringJoiner(delimiter);
+ for (Object value : values) {
+ joiner.add(urlEncode(valueToString(value)));
+ }
+
+ return Collections.singletonList(new Pair(urlEncode(name), joiner.toString()));
+ }
+
+ /**
+ * Ctor.
+ */
+ public ApiClient() {
+ builder = HttpClient.newBuilder();
+ mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
+ mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+ mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
+ mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
+ mapper.registerModule(new JavaTimeModule());
+ URI baseURI = URI.create("http://petstore.swagger.io:80/v2");
+ scheme = baseURI.getScheme();
+ host = baseURI.getHost();
+ port = baseURI.getPort();
+ basePath = baseURI.getRawPath();
+ interceptor = null;
+ readTimeout = null;
+ }
+
+ /**
+ * Set a custom {@link HttpClient.Builder} object to use when creating the
+ * {@link HttpClient} that is used by the API client.
+ *
+ * @param builder Custom client builder.
+ * @return This object.
+ */
+ public ApiClient setHttpClientBuilder(HttpClient.Builder builder) {
+ this.builder = builder;
+ return this;
+ }
+
+ /**
+ * Get an {@link HttpClient} based on the current {@link HttpClient.Builder}.
+ *
+ * The returned object is immutable and thread-safe.
+ *
+ * @return The HTTP client.
+ */
+ public HttpClient getHttpClient() {
+ return builder.build();
+ }
+
+ /**
+ * Set a custom {@link ObjectMapper} to serialize and deserialize the request
+ * and response bodies.
+ *
+ * @param mapper Custom object mapper.
+ * @return This object.
+ */
+ public ApiClient setObjectMapper(ObjectMapper mapper) {
+ this.mapper = mapper;
+ return this;
+ }
+
+ /**
+ * Get a copy of the current {@link ObjectMapper}.
+ *
+ * @return A copy of the current object mapper.
+ */
+ public ObjectMapper getObjectMapper() {
+ return mapper.copy();
+ }
+
+ /**
+ * Set a custom host name for the target service.
+ *
+ * @param host The host name of the target service.
+ * @return This object.
+ */
+ public ApiClient setHost(String host) {
+ this.host = host;
+ return this;
+ }
+
+ /**
+ * Set a custom port number for the target service.
+ *
+ * @param port The port of the target service. Set this to -1 to reset the
+ * value to the default for the scheme.
+ * @return This object.
+ */
+ public ApiClient setPort(int port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * Set a custom base path for the target service, for example '/v2'.
+ *
+ * @param basePath The base path against which the rest of the path is
+ * resolved.
+ * @return This object.
+ */
+ public ApiClient setBasePath(String basePath) {
+ this.basePath = basePath;
+ return this;
+ }
+
+ /**
+ * Get the base URI to resolve the endpoint paths against.
+ *
+ * @return The complete base URI that the rest of the API parameters are
+ * resolved against.
+ */
+ public String getBaseUri() {
+ return scheme + "://" + host + (port == -1 ? "" : ":" + port) + basePath;
+ }
+
+ /**
+ * Set a custom request interceptor.
+ *
+ * A request interceptor is a mechanism for altering each request before it
+ * is sent. After the request has been fully configured but not yet built, the
+ * request builder is passed into this function for further modification,
+ * after which it is sent out.
+ *
+ * This is useful for altering the requests in a custom manner, such as
+ * adding headers. It could also be used for logging and monitoring.
+ *
+ * @param interceptor A function invoked before creating each request. A value
+ * of null resets the interceptor to a no-op.
+ * @return This object.
+ */
+ public ApiClient setRequestInterceptor(Consumer interceptor) {
+ this.interceptor = interceptor;
+ return this;
+ }
+
+ /**
+ * Get the custom interceptor.
+ *
+ * @return The custom interceptor that was set, or null if there isn't any.
+ */
+ public Consumer getRequestInterceptor() {
+ return interceptor;
+ }
+
+ /**
+ * Set the read timeout for the http client.
+ *
+ * This is the value used by default for each request, though it can be
+ * overridden on a per-request basis with a request interceptor.
+ *
+ * @param readTimeout The read timeout used by default by the http client.
+ * Setting this value to null resets the timeout to an
+ * effectively infinite value.
+ * @return This object.
+ */
+ public ApiClient setReadTimeout(Duration readTimeout) {
+ this.readTimeout = readTimeout;
+ return this;
+ }
+
+ /**
+ * Get the read timeout that was set.
+ *
+ * @return The read timeout, or null if no timeout was set. Null represents
+ * an infinite wait time.
+ */
+ public Duration getReadTimeout() {
+ return readTimeout;
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiException.java
new file mode 100644
index 0000000000..f5427482e3
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiException.java
@@ -0,0 +1,90 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client;
+
+import java.net.http.HttpHeaders;
+
+
+public class ApiException extends Exception {
+ private int code = 0;
+ private HttpHeaders responseHeaders = null;
+ private String responseBody = null;
+
+ public ApiException() {}
+
+ public ApiException(Throwable throwable) {
+ super(throwable);
+ }
+
+ public ApiException(String message) {
+ super(message);
+ }
+
+ public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders, String responseBody) {
+ super(message, throwable);
+ this.code = code;
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ public ApiException(String message, int code, HttpHeaders responseHeaders, String responseBody) {
+ this(message, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders) {
+ this(message, throwable, code, responseHeaders, null);
+ }
+
+ public ApiException(int code, HttpHeaders responseHeaders, String responseBody) {
+ this((String) null, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ public ApiException(int code, String message) {
+ super(message);
+ this.code = code;
+ }
+
+ public ApiException(int code, String message, HttpHeaders responseHeaders, String responseBody) {
+ this(code, message);
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Get the HTTP status code.
+ *
+ * @return HTTP status code
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Get the HTTP response headers.
+ *
+ * @return Headers as an HttpHeaders object
+ */
+ public HttpHeaders getResponseHeaders() {
+ return responseHeaders;
+ }
+
+ /**
+ * Get the HTTP response body.
+ *
+ * @return Response body in the form of string
+ */
+ public String getResponseBody() {
+ return responseBody;
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Configuration.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Configuration.java
new file mode 100644
index 0000000000..acbecda489
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Configuration.java
@@ -0,0 +1,39 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client;
+
+
+public class Configuration {
+ private static ApiClient defaultApiClient = new ApiClient();
+
+ /**
+ * Get the default API client, which would be used when creating API
+ * instances without providing an API client.
+ *
+ * @return Default API client
+ */
+ public static ApiClient getDefaultApiClient() {
+ return defaultApiClient;
+ }
+
+ /**
+ * Set the default API client, which would be used when creating API
+ * instances without providing an API client.
+ *
+ * @param apiClient API client
+ */
+ public static void setDefaultApiClient(ApiClient apiClient) {
+ defaultApiClient = apiClient;
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java
new file mode 100644
index 0000000000..ae89aa6145
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java
@@ -0,0 +1,61 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client;
+
+
+public class Pair {
+ private String name = "";
+ private String value = "";
+
+ public Pair (String name, String value) {
+ setName(name);
+ setValue(value);
+ }
+
+ private void setName(String name) {
+ if (!isValidString(name)) {
+ return;
+ }
+
+ this.name = name;
+ }
+
+ private void setValue(String value) {
+ if (!isValidString(value)) {
+ return;
+ }
+
+ this.value = value;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ private boolean isValidString(String arg) {
+ if (arg == null) {
+ return false;
+ }
+
+ if (arg.trim().isEmpty()) {
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
new file mode 100644
index 0000000000..baa5f332f9
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
@@ -0,0 +1,105 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Pair;
+
+import org.openapitools.client.model.Client;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.util.function.Consumer;
+
+import java.util.ArrayList;
+import java.util.StringJoiner;
+import java.util.List;
+import java.util.Map;
+
+
+public class AnotherFakeApi {
+ private final HttpClient memberVarHttpClient;
+ private final ObjectMapper memberVarObjectMapper;
+ private final String memberVarBaseUri;
+ private final Consumer memberVarInterceptor;
+ private final Duration memberVarReadTimeout;
+
+ public AnotherFakeApi() {
+ this(new ApiClient());
+ }
+
+ public AnotherFakeApi(ApiClient apiClient) {
+ memberVarHttpClient = apiClient.getHttpClient();
+ memberVarObjectMapper = apiClient.getObjectMapper();
+ memberVarBaseUri = apiClient.getBaseUri();
+ memberVarInterceptor = apiClient.getRequestInterceptor();
+ memberVarReadTimeout = apiClient.getReadTimeout();
+ }
+
+ /**
+ * To test special tags
+ * To test special tags and operation ID starting with number
+ * @param body client model (required)
+ * @return Client
+ * @throws ApiException if fails to make API call
+ */
+ public Client call123testSpecialTags(Client body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/another-fake/dummy";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "call123testSpecialTags call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java
new file mode 100644
index 0000000000..740a9719ca
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java
@@ -0,0 +1,733 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Pair;
+
+import java.math.BigDecimal;
+import org.openapitools.client.model.Client;
+import java.io.File;
+import org.openapitools.client.model.FileSchemaTestClass;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import org.openapitools.client.model.OuterComposite;
+import org.openapitools.client.model.User;
+import org.openapitools.client.model.XmlItem;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.util.function.Consumer;
+
+import java.util.ArrayList;
+import java.util.StringJoiner;
+import java.util.List;
+import java.util.Map;
+
+
+public class FakeApi {
+ private final HttpClient memberVarHttpClient;
+ private final ObjectMapper memberVarObjectMapper;
+ private final String memberVarBaseUri;
+ private final Consumer memberVarInterceptor;
+ private final Duration memberVarReadTimeout;
+
+ public FakeApi() {
+ this(new ApiClient());
+ }
+
+ public FakeApi(ApiClient apiClient) {
+ memberVarHttpClient = apiClient.getHttpClient();
+ memberVarObjectMapper = apiClient.getObjectMapper();
+ memberVarBaseUri = apiClient.getBaseUri();
+ memberVarInterceptor = apiClient.getRequestInterceptor();
+ memberVarReadTimeout = apiClient.getReadTimeout();
+ }
+
+ /**
+ * creates an XmlItem
+ * this route creates an XmlItem
+ * @param xmlItem XmlItem Body (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void createXmlItem(XmlItem xmlItem) throws ApiException {
+ // verify the required parameter 'xmlItem' is set
+ if (xmlItem == null) {
+ throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/create_xml_item";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(xmlItem);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "createXmlItem call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ *
+ * Test serialization of outer boolean types
+ * @param body Input boolean as post body (optional)
+ * @return Boolean
+ * @throws ApiException if fails to make API call
+ */
+ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/outer/boolean";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "fakeOuterBooleanSerialize call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ *
+ * Test serialization of object with outer number type
+ * @param body Input composite as post body (optional)
+ * @return OuterComposite
+ * @throws ApiException if fails to make API call
+ */
+ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/outer/composite";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "fakeOuterCompositeSerialize call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ *
+ * Test serialization of outer number types
+ * @param body Input number as post body (optional)
+ * @return BigDecimal
+ * @throws ApiException if fails to make API call
+ */
+ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/outer/number";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "fakeOuterNumberSerialize call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ *
+ * Test serialization of outer string types
+ * @param body Input string as post body (optional)
+ * @return String
+ * @throws ApiException if fails to make API call
+ */
+ public String fakeOuterStringSerialize(String body) throws ApiException {
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/outer/string";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "fakeOuterStringSerialize call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ *
+ * For this test, the body for this request much reference a schema named `File`.
+ * @param body (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/body-with-file-schema";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testBodyWithFileSchema call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ *
+ *
+ * @param query (required)
+ * @param body (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void testBodyWithQueryParams(String query, User body) throws ApiException {
+ // verify the required parameter 'query' is set
+ if (query == null) {
+ throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
+ }
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/body-with-query-params";
+
+ List localVarQueryParams = new ArrayList<>();
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("query", query));
+
+ if (!localVarQueryParams.isEmpty()) {
+ StringJoiner queryJoiner = new StringJoiner("&");
+ localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
+ } else {
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ }
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testBodyWithQueryParams call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * To test \"client\" model
+ * To test \"client\" model
+ * @param body client model (required)
+ * @return Client
+ * @throws ApiException if fails to make API call
+ */
+ public Client testClientModel(Client body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testClientModel call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @throws ApiException if fails to make API call
+ */
+ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
+ // verify the required parameter 'number' is set
+ if (number == null) {
+ throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
+ }
+ // verify the required parameter '_double' is set
+ if (_double == null) {
+ throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
+ }
+ // verify the required parameter 'patternWithoutDelimiter' is set
+ if (patternWithoutDelimiter == null) {
+ throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
+ }
+ // verify the required parameter '_byte' is set
+ if (_byte == null) {
+ throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testEndpointParameters call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * To test enum parameters
+ * To test enum parameters
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @throws ApiException if fails to make API call
+ */
+ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException {
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake";
+
+ List localVarQueryParams = new ArrayList<>();
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_string", enumQueryString));
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_integer", enumQueryInteger));
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_double", enumQueryDouble));
+
+ if (!localVarQueryParams.isEmpty()) {
+ StringJoiner queryJoiner = new StringJoiner("&");
+ localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
+ } else {
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ }
+
+ if (enumHeaderStringArray != null) {
+ localVarRequestBuilder.header("enum_header_string_array", enumHeaderStringArray.toString());
+ }
+ if (enumHeaderString != null) {
+ localVarRequestBuilder.header("enum_header_string", enumHeaderString.toString());
+ }
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testEnumParameters call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Fake endpoint to test group parameters (optional)
+ * Fake endpoint to test group parameters (optional)
+ * @param requiredStringGroup Required String in group parameters (required)
+ * @param requiredBooleanGroup Required Boolean in group parameters (required)
+ * @param requiredInt64Group Required Integer in group parameters (required)
+ * @param stringGroup String in group parameters (optional)
+ * @param booleanGroup Boolean in group parameters (optional)
+ * @param int64Group Integer in group parameters (optional)
+ * @throws ApiException if fails to make API call
+ */
+ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
+ // verify the required parameter 'requiredStringGroup' is set
+ if (requiredStringGroup == null) {
+ throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
+ }
+ // verify the required parameter 'requiredBooleanGroup' is set
+ if (requiredBooleanGroup == null) {
+ throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
+ }
+ // verify the required parameter 'requiredInt64Group' is set
+ if (requiredInt64Group == null) {
+ throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake";
+
+ List localVarQueryParams = new ArrayList<>();
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("required_string_group", requiredStringGroup));
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("required_int64_group", requiredInt64Group));
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("string_group", stringGroup));
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("int64_group", int64Group));
+
+ if (!localVarQueryParams.isEmpty()) {
+ StringJoiner queryJoiner = new StringJoiner("&");
+ localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
+ } else {
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ }
+
+ if (requiredBooleanGroup != null) {
+ localVarRequestBuilder.header("required_boolean_group", requiredBooleanGroup.toString());
+ }
+ if (booleanGroup != null) {
+ localVarRequestBuilder.header("boolean_group", booleanGroup.toString());
+ }
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testGroupParameters call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * test inline additionalProperties
+ *
+ * @param param request body (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void testInlineAdditionalProperties(Map param) throws ApiException {
+ // verify the required parameter 'param' is set
+ if (param == null) {
+ throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/inline-additionalProperties";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(param);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testInlineAdditionalProperties call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * test json serialization of form data
+ *
+ * @param param field1 (required)
+ * @param param2 field2 (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void testJsonFormData(String param, String param2) throws ApiException {
+ // verify the required parameter 'param' is set
+ if (param == null) {
+ throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData");
+ }
+ // verify the required parameter 'param2' is set
+ if (param2 == null) {
+ throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/jsonFormData";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testJsonFormData call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
new file mode 100644
index 0000000000..d347fc4777
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
@@ -0,0 +1,105 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Pair;
+
+import org.openapitools.client.model.Client;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.util.function.Consumer;
+
+import java.util.ArrayList;
+import java.util.StringJoiner;
+import java.util.List;
+import java.util.Map;
+
+
+public class FakeClassnameTags123Api {
+ private final HttpClient memberVarHttpClient;
+ private final ObjectMapper memberVarObjectMapper;
+ private final String memberVarBaseUri;
+ private final Consumer memberVarInterceptor;
+ private final Duration memberVarReadTimeout;
+
+ public FakeClassnameTags123Api() {
+ this(new ApiClient());
+ }
+
+ public FakeClassnameTags123Api(ApiClient apiClient) {
+ memberVarHttpClient = apiClient.getHttpClient();
+ memberVarObjectMapper = apiClient.getObjectMapper();
+ memberVarBaseUri = apiClient.getBaseUri();
+ memberVarInterceptor = apiClient.getRequestInterceptor();
+ memberVarReadTimeout = apiClient.getReadTimeout();
+ }
+
+ /**
+ * To test class name in snake case
+ * To test class name in snake case
+ * @param body client model (required)
+ * @return Client
+ * @throws ApiException if fails to make API call
+ */
+ public Client testClassname(Client body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake_classname_test";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "testClassname call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java
new file mode 100644
index 0000000000..7eacabd955
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java
@@ -0,0 +1,500 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Pair;
+
+import java.io.File;
+import org.openapitools.client.model.ModelApiResponse;
+import org.openapitools.client.model.Pet;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.util.function.Consumer;
+
+import java.util.ArrayList;
+import java.util.StringJoiner;
+import java.util.List;
+import java.util.Map;
+
+
+public class PetApi {
+ private final HttpClient memberVarHttpClient;
+ private final ObjectMapper memberVarObjectMapper;
+ private final String memberVarBaseUri;
+ private final Consumer memberVarInterceptor;
+ private final Duration memberVarReadTimeout;
+
+ public PetApi() {
+ this(new ApiClient());
+ }
+
+ public PetApi(ApiClient apiClient) {
+ memberVarHttpClient = apiClient.getHttpClient();
+ memberVarObjectMapper = apiClient.getObjectMapper();
+ memberVarBaseUri = apiClient.getBaseUri();
+ memberVarInterceptor = apiClient.getRequestInterceptor();
+ memberVarReadTimeout = apiClient.getReadTimeout();
+ }
+
+ /**
+ * Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void addPet(Pet body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/pet";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "addPet call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @throws ApiException if fails to make API call
+ */
+ public void deletePet(Long petId, String apiKey) throws ApiException {
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/pet/{petId}"
+ .replace("{petId}", ApiClient.urlEncode(petId.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ if (apiKey != null) {
+ localVarRequestBuilder.header("api_key", apiKey.toString());
+ }
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "deletePet call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ * @param status Status values that need to be considered for filter (required)
+ * @return List<Pet>
+ * @throws ApiException if fails to make API call
+ */
+ public List findPetsByStatus(List status) throws ApiException {
+ // verify the required parameter 'status' is set
+ if (status == null) {
+ throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/pet/findByStatus";
+
+ List localVarQueryParams = new ArrayList<>();
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "status", status));
+
+ if (!localVarQueryParams.isEmpty()) {
+ StringJoiner queryJoiner = new StringJoiner("&");
+ localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
+ } else {
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ }
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "findPetsByStatus call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * @param tags Tags to filter by (required)
+ * @return List<Pet>
+ * @throws ApiException if fails to make API call
+ * @deprecated
+ */
+ @Deprecated
+ public List findPetsByTags(List tags) throws ApiException {
+ // verify the required parameter 'tags' is set
+ if (tags == null) {
+ throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/pet/findByTags";
+
+ List localVarQueryParams = new ArrayList<>();
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "tags", tags));
+
+ if (!localVarQueryParams.isEmpty()) {
+ StringJoiner queryJoiner = new StringJoiner("&");
+ localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
+ } else {
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ }
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "findPetsByTags call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Find pet by ID
+ * Returns a single pet
+ * @param petId ID of pet to return (required)
+ * @return Pet
+ * @throws ApiException if fails to make API call
+ */
+ public Pet getPetById(Long petId) throws ApiException {
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/pet/{petId}"
+ .replace("{petId}", ApiClient.urlEncode(petId.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "getPetById call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void updatePet(Pet body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/pet";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "updatePet call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @throws ApiException if fails to make API call
+ */
+ public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/pet/{petId}"
+ .replace("{petId}", ApiClient.urlEncode(petId.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "updatePetWithForm call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return ModelApiResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/pet/{petId}/uploadImage"
+ .replace("{petId}", ApiClient.urlEncode(petId.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "uploadFile call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * uploads an image (required)
+ *
+ * @param petId ID of pet to update (required)
+ * @param requiredFile file to upload (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @return ModelApiResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
+ // verify the required parameter 'petId' is set
+ if (petId == null) {
+ throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+ }
+ // verify the required parameter 'requiredFile' is set
+ if (requiredFile == null) {
+ throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
+ .replace("{petId}", ApiClient.urlEncode(petId.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "uploadFileWithRequiredFile call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java
new file mode 100644
index 0000000000..414389f3f6
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java
@@ -0,0 +1,235 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Pair;
+
+import org.openapitools.client.model.Order;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.util.function.Consumer;
+
+import java.util.ArrayList;
+import java.util.StringJoiner;
+import java.util.List;
+import java.util.Map;
+
+
+public class StoreApi {
+ private final HttpClient memberVarHttpClient;
+ private final ObjectMapper memberVarObjectMapper;
+ private final String memberVarBaseUri;
+ private final Consumer memberVarInterceptor;
+ private final Duration memberVarReadTimeout;
+
+ public StoreApi() {
+ this(new ApiClient());
+ }
+
+ public StoreApi(ApiClient apiClient) {
+ memberVarHttpClient = apiClient.getHttpClient();
+ memberVarObjectMapper = apiClient.getObjectMapper();
+ memberVarBaseUri = apiClient.getBaseUri();
+ memberVarInterceptor = apiClient.getRequestInterceptor();
+ memberVarReadTimeout = apiClient.getReadTimeout();
+ }
+
+ /**
+ * Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteOrder(String orderId) throws ApiException {
+ // verify the required parameter 'orderId' is set
+ if (orderId == null) {
+ throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/store/order/{order_id}"
+ .replace("{order_id}", ApiClient.urlEncode(orderId.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "deleteOrder call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ * @return Map<String, Integer>
+ * @throws ApiException if fails to make API call
+ */
+ public Map getInventory() throws ApiException {
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/store/inventory";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "getInventory call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * @param orderId ID of pet that needs to be fetched (required)
+ * @return Order
+ * @throws ApiException if fails to make API call
+ */
+ public Order getOrderById(Long orderId) throws ApiException {
+ // verify the required parameter 'orderId' is set
+ if (orderId == null) {
+ throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/store/order/{order_id}"
+ .replace("{order_id}", ApiClient.urlEncode(orderId.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "getOrderById call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Place an order for a pet
+ *
+ * @param body order placed for purchasing the pet (required)
+ * @return Order
+ * @throws ApiException if fails to make API call
+ */
+ public Order placeOrder(Order body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/store/order";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "placeOrder call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java
new file mode 100644
index 0000000000..6dd1913469
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java
@@ -0,0 +1,432 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Pair;
+
+import org.openapitools.client.model.User;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.util.function.Consumer;
+
+import java.util.ArrayList;
+import java.util.StringJoiner;
+import java.util.List;
+import java.util.Map;
+
+
+public class UserApi {
+ private final HttpClient memberVarHttpClient;
+ private final ObjectMapper memberVarObjectMapper;
+ private final String memberVarBaseUri;
+ private final Consumer memberVarInterceptor;
+ private final Duration memberVarReadTimeout;
+
+ public UserApi() {
+ this(new ApiClient());
+ }
+
+ public UserApi(ApiClient apiClient) {
+ memberVarHttpClient = apiClient.getHttpClient();
+ memberVarObjectMapper = apiClient.getObjectMapper();
+ memberVarBaseUri = apiClient.getBaseUri();
+ memberVarInterceptor = apiClient.getRequestInterceptor();
+ memberVarReadTimeout = apiClient.getReadTimeout();
+ }
+
+ /**
+ * Create user
+ * This can only be done by the logged in user.
+ * @param body Created user object (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void createUser(User body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/user";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "createUser call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void createUsersWithArrayInput(List body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/user/createWithArray";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "createUsersWithArrayInput call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void createUsersWithListInput(List body) throws ApiException {
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/user/createWithList";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "createUsersWithListInput call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Delete user
+ * This can only be done by the logged in user.
+ * @param username The name that needs to be deleted (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteUser(String username) throws ApiException {
+ // verify the required parameter 'username' is set
+ if (username == null) {
+ throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/user/{username}"
+ .replace("{username}", ApiClient.urlEncode(username.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "deleteUser call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Get user by user name
+ *
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @return User
+ * @throws ApiException if fails to make API call
+ */
+ public User getUserByName(String username) throws ApiException {
+ // verify the required parameter 'username' is set
+ if (username == null) {
+ throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/user/{username}"
+ .replace("{username}", ApiClient.urlEncode(username.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "getUserByName call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Logs user into the system
+ *
+ * @param username The user name for login (required)
+ * @param password The password for login in clear text (required)
+ * @return String
+ * @throws ApiException if fails to make API call
+ */
+ public String loginUser(String username, String password) throws ApiException {
+ // verify the required parameter 'username' is set
+ if (username == null) {
+ throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
+ }
+ // verify the required parameter 'password' is set
+ if (password == null) {
+ throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/user/login";
+
+ List localVarQueryParams = new ArrayList<>();
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("username", username));
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("password", password));
+
+ if (!localVarQueryParams.isEmpty()) {
+ StringJoiner queryJoiner = new StringJoiner("&");
+ localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
+ } else {
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ }
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "loginUser call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ return memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {});
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Logs out current logged in user session
+ *
+ * @throws ApiException if fails to make API call
+ */
+ public void logoutUser() throws ApiException {
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/user/logout";
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "logoutUser call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+ /**
+ * Updated user
+ * This can only be done by the logged in user.
+ * @param username name that need to be deleted (required)
+ * @param body Updated user object (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void updateUser(String username, User body) throws ApiException {
+ // verify the required parameter 'username' is set
+ if (username == null) {
+ throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
+ }
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
+ }
+
+ HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
+
+ String localVarPath = "/user/{username}"
+ .replace("{username}", ApiClient.urlEncode(username.toString()));
+
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+
+ localVarRequestBuilder.header("Content-Type", "application/json");
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ try {
+ byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
+ localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+
+ HttpResponse localVarResponse = memberVarHttpClient.send(
+ localVarRequestBuilder.build(),
+ HttpResponse.BodyHandlers.ofInputStream());
+ if (localVarResponse.statusCode()/ 100 != 2) {
+ throw new ApiException(localVarResponse.statusCode(),
+ "updateUser call received non-success response",
+ localVarResponse.headers(),
+ localVarResponse.body() == null ? null : new String(localVarResponse.body().readAllBytes()));
+ }
+
+ } catch (IOException | InterruptedException e) {
+ throw new ApiException(e);
+ }
+ }
+}
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
new file mode 100644
index 0000000000..69d6a81729
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
@@ -0,0 +1,95 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * AdditionalPropertiesAnyType
+ */
+
+public class AdditionalPropertiesAnyType extends HashMap {
+ @JsonProperty("name")
+ private String name;
+
+ public AdditionalPropertiesAnyType name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
+ return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesAnyType {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
new file mode 100644
index 0000000000..0147a592b7
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
@@ -0,0 +1,96 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AdditionalPropertiesArray
+ */
+
+public class AdditionalPropertiesArray extends HashMap {
+ @JsonProperty("name")
+ private String name;
+
+ public AdditionalPropertiesArray name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
+ return Objects.equals(this.name, additionalPropertiesArray.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesArray {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
new file mode 100644
index 0000000000..89aa511c2a
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
@@ -0,0 +1,95 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * AdditionalPropertiesBoolean
+ */
+
+public class AdditionalPropertiesBoolean extends HashMap {
+ @JsonProperty("name")
+ private String name;
+
+ public AdditionalPropertiesBoolean name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
+ return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesBoolean {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
new file mode 100644
index 0000000000..ecb4e102ea
--- /dev/null
+++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -0,0 +1,399 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AdditionalPropertiesClass
+ */
+
+public class AdditionalPropertiesClass {
+ @JsonProperty("map_string")
+ private Map mapString = new HashMap<>();
+
+ @JsonProperty("map_number")
+ private Map mapNumber = new HashMap<>();
+
+ @JsonProperty("map_integer")
+ private Map mapInteger = new HashMap<>();
+
+ @JsonProperty("map_boolean")
+ private Map mapBoolean = new HashMap<>();
+
+ @JsonProperty("map_array_integer")
+ private Map