diff --git a/README.md b/README.md index 2117ebd0d2d..862b783c473 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.3.1`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.3.2`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator) [![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) @@ -47,7 +47,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | |-|-| -**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, 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 - 6.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node) +**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, 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) **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **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), **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), Scalatra) **API documentation generators** | **HTML**, **Confluence Wiki** **Configuration files** | [**Apache2**](https://httpd.apache.org/) @@ -65,6 +65,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se - [1.4 - Build Projects](#14---build-projects) - [1.5 - Homebrew](#15---homebrew) - [1.6 - Docker](#16---docker) + - [1.7 - NPM](#17---npm) - [2 - Getting Started](#2---getting-started) - [3 - Usage](#3---usage) - [3.1 - Customization](#31---customization) @@ -89,8 +90,8 @@ OpenAPI Generator Version | Release Date | Notes ---------------------------- | ------------ | ----- 4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | Major release with breaking changes (no fallback) 3.4.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.4.0-SNAPSHOT/)| 01.11.2018 | Minor release (breaking changes with fallbacks) -3.3.2 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.3.2-SNAPSHOT/) | 29.10.2018 | Bugfix release -[3.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.3.1) (latest stable release) | 15.10.2018 | Bugfix release +3.3.3 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.3.3-SNAPSHOT/) | 15.11.2018 | Bugfix release +[3.3.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.3.2) (latest stable release) | 31.10.2018 | Bugfix release OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 @@ -146,16 +147,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.1/openapi-generator-cli-3.3.1.jar` +JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.2/openapi-generator-cli-3.3.2.jar` For **Mac/Linux** users: ```sh -wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.1/openapi-generator-cli-3.3.1.jar -O openapi-generator-cli.jar +wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.2/openapi-generator-cli-3.3.2.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.1/openapi-generator-cli-3.3.1.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.2/openapi-generator-cli-3.3.2.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -346,6 +347,24 @@ cd /vagrant ./run-in-docker.sh mvn package ``` +### [1.7 - NPM](#table-of-contents) + +There is also an [NPM package wrapper](https://github.com/HarmoWatch/openapi-generator-cli), available. +Please see the [docs](https://github.com/HarmoWatch/openapi-generator-cli) there for more information. + +Install it globally to get the CLI available on the command line: + +```sh +npm install @harmowatch/openapi-generator-cli -g +openapi-generator version +``` + +Or you install it as dev-dependency like this: + +```sh +npm install @harmowatch/openapi-generator-cli -D +``` + ## [2 - Getting Started](#table-of-contents) To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml), please run the following @@ -482,6 +501,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Boxever](https://www.boxever.com/) - [GMO Pepabo](https://pepabo.com/en/) - [JustStar](https://www.juststarinfo.com) +- [Klarna](https://www.klarna.com/) - [Myworkout](https://myworkout.com) - [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch) - [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development) @@ -501,6 +521,9 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2018/06/27 - [Lessons Learned from Leading an Open-Source Project Supporting 30+ Programming Languages](https://speakerdeck.com/wing328/lessons-learned-from-leading-an-open-source-project-supporting-30-plus-programming-languages) - [William Cheng](https://github.com/wing328) at [LinuxCon + ContainerCon + CloudOpen China 2018](http://bit.ly/2waDKKX) - 2018/07/19 - [OpenAPI Generator Contribution Quickstart - RingCentral Go SDK](https://medium.com/ringcentral-developers/openapi-generator-for-go-contribution-quickstart-8cc72bf37b53) by [John Wang](https://github.com/grokify) - 2018/08/22 - [OpenAPI Generatorのプロジェクト構成などのメモ](https://yinm.info/20180822/) by [Yusuke Iinuma](https://github.com/yinm) +- 2018/10/31 - [A node package wrapper for openapi-generator](https://github.com/HarmoWatch/openapi-generator-cli) +- 2018/11/03 - [OpenAPI Generator + golang + Flutter でアプリ開発](http://ryuichi111std.hatenablog.com/entry/2018/11/03/214005) by [Ryuichi Daigo](https://github.com/ryuichi111) + ## [6 - About Us](#table-of-contents) @@ -537,6 +560,7 @@ Here is a list of template creators: * Elm: @trenneman * Eiffel: @jvelilla * Erlang: @tsloughter + * Erlang (PropEr): @jfacorro @robertoaloi * Groovy: @victorgit * Go: @wing328 * Go (rewritten in 2.3.0): @antihax @@ -568,8 +592,10 @@ Here is a list of template creators: * Swift: @tkqubo * Swift 3: @hexelon * Swift 4: @ehyche - * TypeScript (Angular1): @mhardorf + * TypeScript (Angular1): @mhardorf * TypeScript (Angular2): @roni-frantchi + * TypeScript (Angular6): @akehir + * TypeScript (Angular7): @topce * TypeScript (Axios): @nicokoenig * TypeScript (Fetch): @leonyu * TypeScript (jQuery): @bherila @@ -656,7 +682,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Eiffel | @jvelilla (2017/09) | | Elixir | | | Elm | @trenneman (2018/09) | -| Erlang | @tsloughter (2017/11) | +| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) | | Go | @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09 | | Groovy | | | Haskell | | @@ -674,7 +700,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) | | Scala | @clasnake (2017/07) @jimschubert (2017/09) @shijinkui (2018/01) @ramzimaalej (2018/03) | | Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @d-date (2018/03) | -| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) | +| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) | ### [6.3 - History of OpenAPI Generator](#table-of-contents) diff --git a/bin/erlang-petstore-proper.sh b/bin/erlang-petstore-proper.sh new file mode 100755 index 00000000000..cb6c9b27f05 --- /dev/null +++ b/bin/erlang-petstore-proper.sh @@ -0,0 +1,32 @@ +#!/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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/erlang-proper -DpackageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/mysql-schema-petstore.sh b/bin/mysql-schema-petstore.sh old mode 100644 new mode 100755 diff --git a/bin/springboot-virtualan-petstore-server.sh b/bin/springboot-virtualan-petstore-server.sh old mode 100644 new mode 100755 diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 2411f06e42a..19d9003d1a0 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -10,34 +10,43 @@ echo "Please press CTRL+C to stop or the script will continue in 5 seconds." sleep 5 # LIST OF SCRIPTS: -./bin/openapi3/ruby-client-petstore.sh > /dev/null 2>&1 -./bin/java-petstore-all.sh > /dev/null 2>&1 -./bin/java-jaxrs-petstore-server-all.sh > /dev/null 2>&1 -./bin/openapi3/jaxrs-jersey-petstore.sh > /dev/null 2>&1 -./bin/spring-all-pestore.sh > /dev/null 2>&1 -./bin/kotlin-client-petstore.sh > /dev/null 2>&1 -./bin/kotlin-client-string.sh > /dev/null 2>&1 -./bin/kotlin-client-threetenbp.sh > /dev/null 2>&1 -./bin/kotlin-server-petstore.sh > /dev/null 2>&1 -./bin/mysql-schema-petstore.sh > /dev/null 2>&1 -./bin/php-petstore.sh > /dev/null 2>&1 -./bin/php-silex-petstore-server.sh > /dev/null 2>&1 -./bin/php-symfony-petstore.sh > /dev/null 2>&1 -./bin/php-lumen-petstore-server.sh > /dev/null 2>&1 -./bin/php-slim-server-petstore.sh > /dev/null 2>&1 -./bin/php-ze-ph-petstore-server.sh > /dev/null 2>&1 -./bin/openapi3/php-petstore.sh > /dev/null 2>&1 -./bin/typescript-angular-petstore-all.sh > /dev/null 2>&1 -./bin/typescript-fetch-petstore-all.sh > /dev/null 2>&1 -./bin/typescript-node-petstore-all.sh > /dev/null 2>&1 -./bin/typescript-inversify-petstore.sh > /dev/null 2>&1 -./bin/rust-server-petstore.sh > /dev/null 2>&1 -./bin/haskell-http-client-petstore.sh > /dev/null 2>&1 -./bin/csharp-petstore.sh > /dev/null 2>&1 -./bin/meta-codegen.sh > /dev/null 2>&1 -./bin/utils/export_docs_generators.sh > /dev/null 2>&1 -./bin/go-petstore.sh > /dev/null 2>&1 -./bin/go-gin-petstore-server.sh > /dev/null 2>&1 +declare -a scripts=("./bin/openapi3/ruby-client-petstore.sh" +"./bin/java-petstore-all.sh" +"./bin/java-jaxrs-petstore-server-all.sh" +"./bin/openapi3/jaxrs-jersey-petstore.sh" +"./bin/spring-all-pestore.sh" +"./bin/kotlin-client-petstore.sh" +"./bin/kotlin-client-string.sh" +"./bin/kotlin-client-threetenbp.sh" +"./bin/kotlin-server-petstore.sh" +"./bin/mysql-schema-petstore.sh" +"./bin/php-petstore.sh" +"./bin/php-silex-petstore-server.sh" +"./bin/php-symfony-petstore.sh" +"./bin/php-lumen-petstore-server.sh" +"./bin/php-slim-server-petstore.sh" +"./bin/php-ze-ph-petstore-server.sh" +"./bin/openapi3/php-petstore.sh" +"./bin/typescript-angular-petstore-all.sh" +"./bin/typescript-fetch-petstore-all.sh" +"./bin/typescript-node-petstore-all.sh" +"./bin/typescript-inversify-petstore.sh" +"./bin/rust-server-petstore.sh" +"./bin/haskell-http-client-petstore.sh" +"./bin/csharp-petstore.sh" +"./bin/meta-codegen.sh" +"./bin/utils/export_docs_generators.sh" +"./bin/go-petstore.sh" +"./bin/go-gin-petstore-server.sh") + +for script in "${scripts[@]}"; do + if eval $script > /dev/null 2>&1; then + echo "Executed $script successfully!" + else + echo "ERROR: Failed to run $script" + exit 1 + fi +done # Check: if [ -n "$(git status --porcelain)" ]; then diff --git a/bin/utils/openapi-generator-cli.sh b/bin/utils/openapi-generator-cli.sh index 0f1016f9aed..a21e08a0d1f 100644 --- a/bin/utils/openapi-generator-cli.sh +++ b/bin/utils/openapi-generator-cli.sh @@ -41,7 +41,7 @@ jar=${artifactid}-${ver}.jar DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ ! -f ${DIR}/${jar} ]; then - repo="central::default::https://repo1.maven.apache.org/maven2" + repo="central::default::https://repo1.maven.org/maven2/" if [[ ${ver} =~ ^.*-SNAPSHOT$ ]]; then repo="central::default::https://oss.sonatype.org/content/repositories/snapshots" fi diff --git a/bin/utils/release_version_update.sh b/bin/utils/release_version_update.sh index 72df433aa65..c7a41c0d12c 100755 --- a/bin/utils/release_version_update.sh +++ b/bin/utils/release_version_update.sh @@ -33,11 +33,7 @@ fi echo "Release preparation: replacing $FROM with $TO in different files" -declare -a files=("CI/pom.xml.bash" - "CI/pom.xml.circleci" - "CI/pom.xml.circleci.java7" - "CI/pom.xml.ios" - "modules/openapi-generator-cli/pom.xml" +declare -a files=("modules/openapi-generator-cli/pom.xml" "modules/openapi-generator-gradle-plugin/gradle.properties" "modules/openapi-generator-gradle-plugin/pom.xml" "modules/openapi-generator-maven-plugin/pom.xml" diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index f0bac844c16..8be0e99e1ce 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -5,6 +5,6 @@ CONFIG OPTIONS for rust-server Rust crate name (convention: snake_case). (Default: openapi_client) packageVersion - Rust crate version. (Default: 1.0.0) + Rust crate version. Back to the [generators list](README.md) diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index ebe411abb59..2ad4d3300a6 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -48,7 +48,7 @@ buildscript { mavenCentral() } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.1" + classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.2" } } @@ -278,6 +278,32 @@ in others being disabled. That is, OpenAPI Generator considers any one of these For more control over generation of individual files, configure an ignore file and refer to it via `ignoreFileOverride`. ==== +[NOTE] +==== +When configuring `systemProperties` in order to perform selective generation you can disable generation of some parts by providing `"false"` value: +[source,groovy] +---- +openApiGenerate { + // other settings omitted + systemProperties = [ + modelDocs: "false", + apis: "false" + ] +} +---- +When enabling generation of only specific parts you either have to provide CSV list of what you particularly are generating or provide an empty string `""` to generate everything. If you provide `"true"` it will be treated as a specific name of model or api you want to generate. +[source,groovy] +---- +openApiGenerate { + // other settings omitted + systemProperties = [ + apis: "", + models: "User,Pet" + ] +} +---- +==== + === openApiValidate .Options diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index f05264d9b5d..13ff3f21216 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -17,5 +17,5 @@ gradle generateGoWithInvalidSpec The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example: ```bash -gradle -PopenApiGeneratorVersion=3.3.1 openApiValidate +gradle -PopenApiGeneratorVersion=3.3.2 openApiValidate ``` diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index b4627afc3cc..409dcc65ff7 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1 +1 @@ -openApiGeneratorVersion=3.3.1 +openApiGeneratorVersion=3.3.2 diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index 18055978fc4..378ecf8b687 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase) org.openapitools openapi-generator-maven-plugin - 3.3.1 + 3.3.2 diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 878382a5ad6..f7e8d52f95f 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 3.3.1 + 3.3.2 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index fdc8a4bf901..315e08ef00e 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 3.3.1 + 3.3.2 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 880f2be04d9..689cfdab2d6 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 3.3.1 + 3.3.2 diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 87deb4f0594..74f177834a0 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -15,6 +15,11 @@ UTF-8 + + org.sonatype.plexus + plexus-build-api + 0.0.7 + org.apache.maven maven-core diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index a46e58849d7..2c213bb4a89 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -42,6 +42,7 @@ import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.Component; import org.apache.maven.project.MavenProject; import org.openapitools.codegen.CliOption; @@ -50,6 +51,8 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.DefaultGenerator; import org.openapitools.codegen.config.CodegenConfigurator; +import org.sonatype.plexus.build.incremental.BuildContext; +import org.sonatype.plexus.build.incremental.DefaultBuildContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -61,6 +64,13 @@ public class CodeGenMojo extends AbstractMojo { private static final Logger LOGGER = LoggerFactory.getLogger(CodeGenMojo.class); + /** + * The build context is only avail when running from within eclipse. + * It is used to update the eclipse-m2e-layer when the plugin is executed inside the IDE. + */ + @Component + private BuildContext buildContext = new DefaultBuildContext(); + @Parameter(name="validateSpec", required = false, defaultValue = "true") private Boolean validateSpec; @@ -329,274 +339,300 @@ public class CodeGenMojo extends AbstractMojo { @Parameter(readonly = true, required = true, defaultValue = "${project}") private MavenProject project; - + public void setBuildContext(BuildContext buildContext) { + this.buildContext = buildContext; + } @Override public void execute() throws MojoExecutionException { + File inputSpecFile = new File(inputSpec); + addCompileSourceRootIfConfigured(); - if (skip) { - getLog().info("Code generation is skipped."); - // Even when no new sources are generated, the existing ones should - // still be compiled if needed. - addCompileSourceRootIfConfigured(); - return; - } - - // attempt to read from config file - CodegenConfigurator configurator = CodegenConfigurator.fromFile(configurationFile); - - // if a config file wasn't specified or we were unable to read it - if (configurator == null) { - configurator = new CodegenConfigurator(); - } - - configurator.setVerbose(verbose); - - // now override with any specified parameters - if (validateSpec != null) { - configurator.setValidateSpec(validateSpec); - } - - if (skipOverwrite != null) { - configurator.setSkipOverwrite(skipOverwrite); - } - - if (removeOperationIdPrefix != null) { - configurator.setRemoveOperationIdPrefix(removeOperationIdPrefix); - } - - if (isNotEmpty(inputSpec)) { - configurator.setInputSpec(inputSpec); - } - - if (isNotEmpty(gitUserId)) { - configurator.setGitUserId(gitUserId); - } - - if (isNotEmpty(gitRepoId)) { - configurator.setGitRepoId(gitRepoId); - } - - if (isNotEmpty(ignoreFileOverride)) { - configurator.setIgnoreFileOverride(ignoreFileOverride); - } - - // TODO: After 3.0.0 release (maybe for 3.1.0): Fully deprecate lang. - if (isNotEmpty(generatorName)) { - configurator.setGeneratorName(generatorName); - - // check if generatorName & language are set together, inform user this needs to be updated to prevent future issues. - if (isNotEmpty(language)) { - LOGGER.warn("The 'language' option is deprecated and was replaced by 'generatorName'. Both can not be set together"); - throw new MojoExecutionException("Illegal configuration: 'language' and 'generatorName' can not be set both, remove 'language' from your configuration"); - } - } else if (isNotEmpty(language)) { - LOGGER.warn("The 'language' option is deprecated and may reference language names only in the next major release (4.0). Please use 'generatorName' instead."); - configurator.setGeneratorName(language); - } else { - LOGGER.error("A generator name (generatorName) is required."); - throw new MojoExecutionException("The generator requires 'generatorName'. Refer to documentation for a list of options."); - } - - - configurator.setOutputDir(output.getAbsolutePath()); - - if (isNotEmpty(auth)) { - configurator.setAuth(auth); - } - - if (isNotEmpty(apiPackage)) { - configurator.setApiPackage(apiPackage); - } - - if (isNotEmpty(modelPackage)) { - configurator.setModelPackage(modelPackage); - } - - if (isNotEmpty(invokerPackage)) { - configurator.setInvokerPackage(invokerPackage); - } - - if (isNotEmpty(groupId)) { - configurator.setGroupId(groupId); - } - - if (isNotEmpty(artifactId)) { - configurator.setArtifactId(artifactId); - } - - if (isNotEmpty(artifactVersion)) { - configurator.setArtifactVersion(artifactVersion); - } - - if (isNotEmpty(library)) { - configurator.setLibrary(library); - } - - if (isNotEmpty(modelNamePrefix)) { - configurator.setModelNamePrefix(modelNamePrefix); - } - - if (isNotEmpty(modelNameSuffix)) { - configurator.setModelNameSuffix(modelNameSuffix); - } - - if (null != templateDirectory) { - configurator.setTemplateDir(templateDirectory.getAbsolutePath()); - } - - // Set generation options - if (null != generateApis && generateApis) { - System.setProperty(CodegenConstants.APIS, ""); - } else { - System.clearProperty(CodegenConstants.APIS); - } - - if (null != generateModels && generateModels) { - System.setProperty(CodegenConstants.MODELS, modelsToGenerate); - } else { - System.clearProperty(CodegenConstants.MODELS); - } - - if (null != generateSupportingFiles && generateSupportingFiles) { - System.setProperty(CodegenConstants.SUPPORTING_FILES, supportingFilesToGenerate); - } else { - System.clearProperty(CodegenConstants.SUPPORTING_FILES); - } - - System.setProperty(CodegenConstants.MODEL_TESTS, generateModelTests.toString()); - System.setProperty(CodegenConstants.MODEL_DOCS, generateModelDocumentation.toString()); - System.setProperty(CodegenConstants.API_TESTS, generateApiTests.toString()); - System.setProperty(CodegenConstants.API_DOCS, generateApiDocumentation.toString()); - System.setProperty(CodegenConstants.WITH_XML, withXml.toString()); - - if (configOptions != null) { - // Retained for backwards-compataibility with configOptions -> instantiation-types - if (instantiationTypes == null && configOptions.containsKey("instantiation-types")) { - applyInstantiationTypesKvp(configOptions.get("instantiation-types").toString(), - configurator); - } - - // Retained for backwards-compataibility with configOptions -> import-mappings - if (importMappings == null && configOptions.containsKey("import-mappings")) { - applyImportMappingsKvp(configOptions.get("import-mappings").toString(), - configurator); - } - - // Retained for backwards-compataibility with configOptions -> type-mappings - if (typeMappings == null && configOptions.containsKey("type-mappings")) { - applyTypeMappingsKvp(configOptions.get("type-mappings").toString(), configurator); - } - - // Retained for backwards-compataibility with configOptions -> language-specific-primitives - if (languageSpecificPrimitives == null && configOptions.containsKey("language-specific-primitives")) { - applyLanguageSpecificPrimitivesCsv(configOptions - .get("language-specific-primitives").toString(), configurator); - } - - // Retained for backwards-compataibility with configOptions -> additional-properties - if (additionalProperties == null && configOptions.containsKey("additional-properties")) { - applyAdditionalPropertiesKvp(configOptions.get("additional-properties").toString(), - configurator); - } - - // Retained for backwards-compataibility with configOptions -> reserved-words-mappings - if (reservedWordsMappings == null && configOptions.containsKey("reserved-words-mappings")) { - applyReservedWordsMappingsKvp(configOptions.get("reserved-words-mappings") - .toString(), configurator); - } - } - - //Apply Instantiation Types - if (instantiationTypes != null && (configOptions == null || !configOptions.containsKey("instantiation-types"))) { - applyInstantiationTypesKvpList(instantiationTypes, configurator); - } - - //Apply Import Mappings - if (importMappings != null && (configOptions == null || !configOptions.containsKey("import-mappings"))) { - applyImportMappingsKvpList(importMappings, configurator); - } - - //Apply Type Mappings - if (typeMappings != null && (configOptions == null || !configOptions.containsKey("type-mappings"))) { - applyTypeMappingsKvpList(typeMappings, configurator); - } - - //Apply Language Specific Primitives - if (languageSpecificPrimitives != null && (configOptions == null || !configOptions.containsKey("language-specific-primitives"))) { - applyLanguageSpecificPrimitivesCsvList(languageSpecificPrimitives, configurator); - } - - //Apply Additional Properties - if (additionalProperties != null && (configOptions == null || !configOptions.containsKey("additional-properties"))) { - applyAdditionalPropertiesKvpList(additionalProperties, configurator); - } - - //Apply Reserved Words Mappings - if (reservedWordsMappings != null && (configOptions == null || !configOptions.containsKey("reserved-words-mappings"))) { - applyReservedWordsMappingsKvpList(reservedWordsMappings, configurator); - } - - if (environmentVariables != null) { - - for (String key : environmentVariables.keySet()) { - originalEnvironmentVariables.put(key, System.getProperty(key)); - String value = environmentVariables.get(key); - if (value == null) { - // don't put null values - value = ""; - } - System.setProperty(key, value); - configurator.addSystemProperty(key, value); - } - } - - final ClientOptInput input = configurator.toClientOptInput(); - final CodegenConfig config = input.getConfig(); - - if (configOptions != null) { - for (CliOption langCliOption : config.cliOptions()) { - if (configOptions.containsKey(langCliOption.getOpt())) { - input.getConfig().additionalProperties() - .put(langCliOption.getOpt(), configOptions.get(langCliOption.getOpt())); - } - } - } - - if (configHelp) { - for (CliOption langCliOption : config.cliOptions()) { - System.out.println("\t" + langCliOption.getOpt()); - System.out.println("\t " - + langCliOption.getOptionHelp().replaceAll("\n", "\n\t ")); - System.out.println(); - } - return; - } - adjustAdditionalProperties(config); try { + if (skip) { + getLog().info("Code generation is skipped."); + return; + } + + if (buildContext != null) { + if (buildContext.isIncremental()) { + if (inputSpec != null) { + if (inputSpecFile.exists()) { + if (!buildContext.hasDelta(inputSpecFile)) { + getLog().info( + "Code generation is skipped in delta-build because source-json was not modified."); + return; + } + } + } + } + } + + // attempt to read from config file + CodegenConfigurator configurator = CodegenConfigurator.fromFile(configurationFile); + + // if a config file wasn't specified or we were unable to read it + if (configurator == null) { + configurator = new CodegenConfigurator(); + } + + configurator.setVerbose(verbose); + + // now override with any specified parameters + if (validateSpec != null) { + configurator.setValidateSpec(validateSpec); + } + + if (skipOverwrite != null) { + configurator.setSkipOverwrite(skipOverwrite); + } + + if (removeOperationIdPrefix != null) { + configurator.setRemoveOperationIdPrefix(removeOperationIdPrefix); + } + + if (isNotEmpty(inputSpec)) { + configurator.setInputSpec(inputSpec); + } + + if (isNotEmpty(gitUserId)) { + configurator.setGitUserId(gitUserId); + } + + if (isNotEmpty(gitRepoId)) { + configurator.setGitRepoId(gitRepoId); + } + + if (isNotEmpty(ignoreFileOverride)) { + configurator.setIgnoreFileOverride(ignoreFileOverride); + } + + // TODO: After 3.0.0 release (maybe for 3.1.0): Fully deprecate lang. + if (isNotEmpty(generatorName)) { + configurator.setGeneratorName(generatorName); + + // check if generatorName & language are set together, inform user this needs to be updated to prevent future issues. + if (isNotEmpty(language)) { + LOGGER.warn("The 'language' option is deprecated and was replaced by 'generatorName'. Both can not be set together"); + throw new MojoExecutionException( + "Illegal configuration: 'language' and 'generatorName' can not be set both, remove 'language' from your configuration"); + } + } else if (isNotEmpty(language)) { + LOGGER.warn( + "The 'language' option is deprecated and may reference language names only in the next major release (4.0). Please use 'generatorName' instead."); + configurator.setGeneratorName(language); + } else { + LOGGER.error("A generator name (generatorName) is required."); + throw new MojoExecutionException("The generator requires 'generatorName'. Refer to documentation for a list of options."); + } + + configurator.setOutputDir(output.getAbsolutePath()); + + if (isNotEmpty(auth)) { + configurator.setAuth(auth); + } + + if (isNotEmpty(apiPackage)) { + configurator.setApiPackage(apiPackage); + } + + if (isNotEmpty(modelPackage)) { + configurator.setModelPackage(modelPackage); + } + + if (isNotEmpty(invokerPackage)) { + configurator.setInvokerPackage(invokerPackage); + } + + if (isNotEmpty(groupId)) { + configurator.setGroupId(groupId); + } + + if (isNotEmpty(artifactId)) { + configurator.setArtifactId(artifactId); + } + + if (isNotEmpty(artifactVersion)) { + configurator.setArtifactVersion(artifactVersion); + } + + if (isNotEmpty(library)) { + configurator.setLibrary(library); + } + + if (isNotEmpty(modelNamePrefix)) { + configurator.setModelNamePrefix(modelNamePrefix); + } + + if (isNotEmpty(modelNameSuffix)) { + configurator.setModelNameSuffix(modelNameSuffix); + } + + if (null != templateDirectory) { + configurator.setTemplateDir(templateDirectory.getAbsolutePath()); + } + + // Set generation options + if (null != generateApis && generateApis) { + System.setProperty(CodegenConstants.APIS, ""); + } else { + System.clearProperty(CodegenConstants.APIS); + } + + if (null != generateModels && generateModels) { + System.setProperty(CodegenConstants.MODELS, modelsToGenerate); + } else { + System.clearProperty(CodegenConstants.MODELS); + } + + if (null != generateSupportingFiles && generateSupportingFiles) { + System.setProperty(CodegenConstants.SUPPORTING_FILES, supportingFilesToGenerate); + } else { + System.clearProperty(CodegenConstants.SUPPORTING_FILES); + } + + System.setProperty(CodegenConstants.MODEL_TESTS, generateModelTests.toString()); + System.setProperty(CodegenConstants.MODEL_DOCS, generateModelDocumentation.toString()); + System.setProperty(CodegenConstants.API_TESTS, generateApiTests.toString()); + System.setProperty(CodegenConstants.API_DOCS, generateApiDocumentation.toString()); + System.setProperty(CodegenConstants.WITH_XML, withXml.toString()); + + if (configOptions != null) { + // Retained for backwards-compataibility with configOptions -> instantiation-types + if (instantiationTypes == null && configOptions.containsKey("instantiation-types")) { + applyInstantiationTypesKvp(configOptions.get("instantiation-types").toString(), + configurator); + } + + // Retained for backwards-compataibility with configOptions -> import-mappings + if (importMappings == null && configOptions.containsKey("import-mappings")) { + applyImportMappingsKvp(configOptions.get("import-mappings").toString(), + configurator); + } + + // Retained for backwards-compataibility with configOptions -> type-mappings + if (typeMappings == null && configOptions.containsKey("type-mappings")) { + applyTypeMappingsKvp(configOptions.get("type-mappings").toString(), configurator); + } + + // Retained for backwards-compataibility with configOptions -> language-specific-primitives + if (languageSpecificPrimitives == null && configOptions.containsKey("language-specific-primitives")) { + applyLanguageSpecificPrimitivesCsv(configOptions + .get("language-specific-primitives").toString(), configurator); + } + + // Retained for backwards-compataibility with configOptions -> additional-properties + if (additionalProperties == null && configOptions.containsKey("additional-properties")) { + applyAdditionalPropertiesKvp(configOptions.get("additional-properties").toString(), + configurator); + } + + // Retained for backwards-compataibility with configOptions -> reserved-words-mappings + if (reservedWordsMappings == null && configOptions.containsKey("reserved-words-mappings")) { + applyReservedWordsMappingsKvp(configOptions.get("reserved-words-mappings") + .toString(), configurator); + } + } + + // Apply Instantiation Types + if (instantiationTypes != null && (configOptions == null || !configOptions.containsKey("instantiation-types"))) { + applyInstantiationTypesKvpList(instantiationTypes, configurator); + } + + // Apply Import Mappings + if (importMappings != null && (configOptions == null || !configOptions.containsKey("import-mappings"))) { + applyImportMappingsKvpList(importMappings, configurator); + } + + // Apply Type Mappings + if (typeMappings != null && (configOptions == null || !configOptions.containsKey("type-mappings"))) { + applyTypeMappingsKvpList(typeMappings, configurator); + } + + // Apply Language Specific Primitives + if (languageSpecificPrimitives != null + && (configOptions == null || !configOptions.containsKey("language-specific-primitives"))) { + applyLanguageSpecificPrimitivesCsvList(languageSpecificPrimitives, configurator); + } + + // Apply Additional Properties + if (additionalProperties != null && (configOptions == null || !configOptions.containsKey("additional-properties"))) { + applyAdditionalPropertiesKvpList(additionalProperties, configurator); + } + + // Apply Reserved Words Mappings + if (reservedWordsMappings != null && (configOptions == null || !configOptions.containsKey("reserved-words-mappings"))) { + applyReservedWordsMappingsKvpList(reservedWordsMappings, configurator); + } + + if (environmentVariables != null) { + + for (String key : environmentVariables.keySet()) { + originalEnvironmentVariables.put(key, System.getProperty(key)); + String value = environmentVariables.get(key); + if (value == null) { + // don't put null values + value = ""; + } + System.setProperty(key, value); + configurator.addSystemProperty(key, value); + } + } + + final ClientOptInput input = configurator.toClientOptInput(); + final CodegenConfig config = input.getConfig(); + + if (configOptions != null) { + for (CliOption langCliOption : config.cliOptions()) { + if (configOptions.containsKey(langCliOption.getOpt())) { + input.getConfig().additionalProperties() + .put(langCliOption.getOpt(), configOptions.get(langCliOption.getOpt())); + } + } + } + + if (configHelp) { + for (CliOption langCliOption : config.cliOptions()) { + System.out.println("\t" + langCliOption.getOpt()); + System.out.println("\t " + + langCliOption.getOptionHelp().replaceAll("\n", "\n\t ")); + System.out.println(); + } + return; + } + adjustAdditionalProperties(config); new DefaultGenerator().opts(input).generate(); + + if (buildContext != null) { + buildContext.refresh(new File(getCompileSourceRoot())); + } } catch (Exception e) { // Maven logs exceptions thrown by plugins only if invoked with -e // I find it annoying to jump through hoops to get basic diagnostic information, // so let's log it in any case: + if (buildContext != null) { + buildContext.addError(inputSpecFile, 0, 0, "unexpected error in Open-API generation", e); + } getLog().error(e); throw new MojoExecutionException( "Code generation failed. See above for the full exception."); } + } + + private String getCompileSourceRoot() { + final Object sourceFolderObject = + configOptions == null ? null : configOptions + .get(CodegenConstants.SOURCE_FOLDER); + final String sourceFolder = + sourceFolderObject == null ? "src/main/java" : sourceFolderObject.toString(); - addCompileSourceRootIfConfigured(); + String sourceJavaFolder = output.toString() + "/" + sourceFolder; + return sourceJavaFolder; } private void addCompileSourceRootIfConfigured() { if (addCompileSourceRoot) { - final Object sourceFolderObject = - configOptions == null ? null : configOptions - .get(CodegenConstants.SOURCE_FOLDER); - final String sourceFolder = - sourceFolderObject == null ? "src/main/java" : sourceFolderObject.toString(); - - String sourceJavaFolder = output.toString() + "/" + sourceFolder; - project.addCompileSourceRoot(sourceJavaFolder); + project.addCompileSourceRoot(getCompileSourceRoot()); } // Reset all environment variables to their original value. This prevents unexpected diff --git a/modules/openapi-generator-maven-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/modules/openapi-generator-maven-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml new file mode 100644 index 00000000000..bbb0518d4f5 --- /dev/null +++ b/modules/openapi-generator-maven-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml @@ -0,0 +1,17 @@ + + + + + + generate + + + + + true + true + + + + + \ No newline at end of file diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index 54abf6168e4..17febd23680 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -18,6 +18,7 @@ package org.openapitools.codegen.languages; import java.util.*; + import com.google.common.base.Strings; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenConfig; @@ -35,8 +36,6 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - - public abstract class AbstractApexCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractApexCodegen.class); @@ -325,7 +324,7 @@ public abstract class AbstractApexCodegen extends DefaultCodegen implements Code if (example.isEmpty()) { example = "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu"; } - ((ByteArraySchema) p).setExample(example); + p.setExample(example); example = "EncodingUtil.base64Decode('" + example + "')"; } else if (ModelUtils.isDateSchema(p)) { if (example.matches("^\\d{4}(-\\d{2}){2}")) { 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 c119400dbbc..03e31cc18cf 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 @@ -1397,7 +1397,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code return; // skip if JAVA_POST_PROCESS_FILE env variable is not defined } - // only process files with hs extension + // only process files with java extension if ("java".equals(FilenameUtils.getExtension(file.toString()))) { String command = javaPostProcessFile + " " + file.toString(); try { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index e59d72cd589..c73670278c5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -19,6 +19,7 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; +import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConfig; @@ -308,6 +309,11 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co public void processOpts() { super.processOpts(); + if (StringUtils.isEmpty(System.getenv("KOTLIN_POST_PROCESS_FILE"))) { + LOGGER.info("Environment variable KOTLIN_POST_PROCESS_FILE not defined so the Kotlin code may not be properly formatted. To define it, try 'export KOTLIN_POST_PROCESS_FILE=\"/usr/local/bin/ktlint -F\"' (Linux/Mac)"); + LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); + } + if (additionalProperties.containsKey(CodegenConstants.ENUM_PROPERTY_NAMING)) { setEnumPropertyNaming((String) additionalProperties.get(CodegenConstants.ENUM_PROPERTY_NAMING)); } @@ -684,4 +690,33 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co } return startsWithTwoUppercaseLetters; } + + @Override + public void postProcessFile(File file, String fileType) { + if (file == null) { + return; + } + + String kotlinPostProcessFile = System.getenv("KOTLIN_POST_PROCESS_FILE"); + if (StringUtils.isEmpty(kotlinPostProcessFile)) { + return; // skip if KOTLIN_POST_PROCESS_FILE env variable is not defined + } + + // only process files with kt extension + if ("kt".equals(FilenameUtils.getExtension(file.toString()))) { + String command = kotlinPostProcessFile + " " + file.toString(); + try { + Process p = Runtime.getRuntime().exec(command); + p.waitFor(); + int exitValue = p.exitValue(); + if (exitValue != 0) { + LOGGER.error("Error running the command ({}). Exit value: {}", command, exitValue); + } else { + LOGGER.info("Successfully executed: " + command); + } + } catch (Exception e) { + LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); + } + } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java index 42f5d8a54ba..754d825016b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java @@ -146,6 +146,23 @@ abstract class AbstractRubyCodegen extends DefaultCodegen implements CodegenConf return name; } + public String toRegularExpression(String pattern) { + if (StringUtils.isEmpty(pattern)) { + return pattern; + } + + // We don't escape \ in string since Ruby doesn't like \ escaped in regex literal + String regexString = pattern; + if (!regexString.startsWith("/")) { + regexString = "/" + regexString; + } + if (StringUtils.countMatches(regexString, '/') == 1) { + // we only have forward slash inserted at start... adding one to end + regexString = regexString + "/"; + } + return regexString; + } + @Override public String toParamName(String name) { // should be the same as variable name diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index 65e0299062c..cb52abd1cad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java @@ -26,6 +26,7 @@ import io.swagger.v3.oas.models.info.*; import io.swagger.v3.oas.models.OpenAPI; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import java.io.File; import java.util.*; @@ -224,7 +225,7 @@ public class ApexClientCodegen extends AbstractApexCodegen { ); } else if (ModelUtils.isBooleanSchema(p)) { // true => "true", false => "false", null => "null" - out = String.valueOf(((BooleanSchema) p).getDefault()); + out = String.valueOf(p.getDefault()); } else if (ModelUtils.isLongSchema(p)) { Long def = (Long) p.getDefault(); out = def == null ? out : def.toString() + "L"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index fe873112901..cd9466e208b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -251,4 +251,9 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { // To avoid unexpected behaviors when options are passed programmatically such as { "useCollection": "" } return super.processCompiler(compiler).emptyStringIsFalse(true); } + + @Override + public String toRegularExpression(String pattern) { + return escapeText(pattern); + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 55221e3a226..cb6e20705cb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -313,6 +313,9 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig { } if (schema.getDefault() != null) { + if (ModelUtils.isStringSchema(schema)) { + return "\"" + schema.getDefault().toString().replaceAll("\"", "\\\"") + "\""; + } return schema.getDefault().toString(); } else { return "null"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index 94cd4bb5c19..230100673c7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -30,7 +30,6 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.jws.WebParam; import java.io.File; import java.io.IOException; import java.io.Writer; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java new file mode 100644 index 00000000000..f580ea60952 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java @@ -0,0 +1,542 @@ +/* + * 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.languages; + +import com.samskivert.mustache.Mustache; +import com.samskivert.mustache.Template; +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.Schema; +import org.openapitools.codegen.*; +import org.openapitools.codegen.utils.ModelUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; +import java.io.Writer; +import java.math.BigDecimal; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig { + private static final Logger LOGGER = LoggerFactory.getLogger(ErlangProperCodegen.class); + + protected String packageName = "openapi"; + protected String packageVersion = "1.0.0"; + protected String sourceFolder = "src"; + protected String modelFolder = "model"; + + public CodegenType getTag() { + return CodegenType.CLIENT; + } + + public String getName() { + return "erlang-proper"; + } + + public String getHelp() { + return "Generates an Erlang library with PropEr generators (beta)."; + } + + public ErlangProperCodegen() { + super(); + outputFolder = "generated-code/erlang"; + modelTemplateFiles.put("model.mustache", ".erl"); + apiTemplateFiles.put("api.mustache", "_api.erl"); + apiTemplateFiles.put("statem.mustache", "_statem.erl"); + + embeddedTemplateDir = templateDir = "erlang-proper"; + + setReservedWordsLowerCase( + Arrays.asList( + "after", "and", "andalso", "band", "begin", "bnot", "bor", "bsl", "bsr", "bxor", "case", + "catch", "cond", "div", "end", "fun", "if", "let", "not", "of", "or", "orelse", "receive", + "rem", "try", "when", "xor" + ) + ); + + instantiationTypes.clear(); + + typeMapping.clear(); + typeMapping.put("enum", "binary()"); + typeMapping.put("date", "date()"); + typeMapping.put("datetime", "datetime()"); + typeMapping.put("DateTime", "datetime()"); + typeMapping.put("boolean", "boolean()"); + typeMapping.put("string", "binary()"); + typeMapping.put("integer", "integer()"); + typeMapping.put("int", "integer()"); + typeMapping.put("float", "integer()"); + typeMapping.put("long", "integer()"); + typeMapping.put("double", "float()"); + typeMapping.put("array", "list()"); + typeMapping.put("map", "map()"); + typeMapping.put("number", "integer()"); + typeMapping.put("bigdecimal", "float()"); + typeMapping.put("List", "list()"); + typeMapping.put("object", "map()"); + typeMapping.put("file", "binary()"); + typeMapping.put("binary", "binary()"); + typeMapping.put("bytearray", "binary()"); + typeMapping.put("byte", "binary()"); + typeMapping.put("uuid", "binary()"); + typeMapping.put("password", "binary()"); + + cliOptions.clear(); + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application name (convention: lowercase).") + .defaultValue(this.packageName)); + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application version") + .defaultValue(this.packageVersion)); + } + + @Override + public CodegenModel fromModel(String name, Schema model, Map allDefinitions) { + CodegenModel cm = super.fromModel(name, model, allDefinitions); + if(ModelUtils.isArraySchema(model)) { + return new CodegenArrayModel(cm, (ArraySchema) model); + } else { + return cm; + } + } + + @Override + public String getTypeDeclaration(String name) { + return name + ":" + name + "()"; + } + + @Override + public String getTypeDeclaration(Schema schema) { + String typeDeclaration = super.getSchemaType(schema); + if(ModelUtils.isArraySchema(schema)) { + ArraySchema arraySchema = (ArraySchema) schema; + String complexType = getSchemaType(arraySchema.getItems()); + + StringBuilder sb = new StringBuilder("list("); + sb.append(complexType); + + return sb.append(")").toString(); + } else if (typeMapping.containsKey(typeDeclaration)) { + return typeMapping.get(typeDeclaration); + } else { + return getTypeDeclaration(toModelName(snakeCase(typeDeclaration))); + } + } + + @Override + public String getSchemaType(Schema schema) { + String schemaType = super.getSchemaType(schema); + if(ModelUtils.isArraySchema(schema)) { + ArraySchema arraySchema = (ArraySchema) schema; + String complexType = getSchemaType(arraySchema.getItems()); + + StringBuilder sb = new StringBuilder("list("); + sb.append(complexType); + + Integer minItems = schema.getMinItems(); + Integer maxItems = schema.getMaxItems(); + if(minItems != null) sb.append(", ").append(minItems); + if(minItems != null && maxItems != null) sb.append(", ").append(maxItems); + + return sb.append(")").toString(); + } else if(ModelUtils.isIntegerSchema(schema)) { + StringBuilder sb = new StringBuilder("integer("); + + BigDecimal min = schema.getMinimum(); + BigDecimal max = schema.getMaximum(); + if(min != null) sb.append(min); + if(min != null && max != null) sb.append(", ").append(max); + + return sb.append(")").toString(); + } else if(ModelUtils.isDateSchema(schema) || ModelUtils.isDateTimeSchema(schema)) { + return typeMapping.get(schemaType); + } else if(ModelUtils.isStringSchema(schema)) { + StringBuilder sb = new StringBuilder("binary("); + Integer min = schema.getMinLength(); + Integer max = schema.getMaxLength(); + if(min != null) sb.append(min); + if(min != null && max != null) sb.append(", ").append(max); + + return sb.append(")").toString(); + } else if (typeMapping.containsKey(schemaType)) { + return typeMapping.get(schemaType); + } else { + return getTypeDeclaration(toModelName(snakeCase(schemaType))); + } + } + + @Override + public void processOpts() { + super.processOpts(); + + if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { + setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME)); + } else { + setPackageName("openapi"); + } + + if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { + setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION)); + } else { + setPackageVersion("1.0.0"); + } + + additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); + additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion); + + additionalProperties.put("length", new Mustache.Lambda() { + @Override + public void execute(Template.Fragment fragment, Writer writer) throws IOException { + writer.write(length(fragment.context())); + } + }); + + additionalProperties.put("qsEncode", new Mustache.Lambda() { + @Override + public void execute(Template.Fragment fragment, Writer writer) throws IOException { + writer.write(qsEncode(fragment.context())); + } + }); + + modelPackage = packageName; + apiPackage = packageName; + + supportingFiles.add(new SupportingFile("rebar.config.mustache", "", "rebar.config")); + supportingFiles.add(new SupportingFile("app.src.mustache", "", "src" + File.separator + + this.packageName + ".app.src")); + supportingFiles.add(new SupportingFile("utils.mustache", "", "src" + File.separator + + this.packageName + "_utils.erl")); + supportingFiles.add(new SupportingFile("gen.mustache", "", "src" + File.separator + this + .packageName + "_gen.erl")); + supportingFiles.add(new SupportingFile("include.mustache", "", "src" + File.separator + + this.packageName + ".hrl")); + supportingFiles.add(new SupportingFile("statem.hrl.mustache", "", "src" + File.separator + + this.packageName + "_statem.hrl")); + supportingFiles.add(new SupportingFile("test.mustache", "", "test" + File.separator + + "prop_" + this.packageName + ".erl")); + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + } + + private String qsEncode(Object o) { + String r = ""; + CodegenParameter q = (CodegenParameter) o; + if (q.required) { + if (q.isListContainer) { + r += "[{<<\"" + q.baseName + "\">>, X} || X <- " + q.paramName + "]"; + } else { + r += "{<<\"" + q.baseName + "\">>, " + q.paramName + "}"; + } + } + return r; + } + + @Override + public String escapeReservedWord(String name) { + // Can't start with an underscore, as our fields need to start with an + // UppercaseLetter so that Go treats them as public/visible. + + // Options? + // - MyName + // - AName + // - TheName + // - XName + // - X_Name + // ... or maybe a suffix? + // - Name_ ... think this will work. + if (this.reservedWordsMappings().containsKey(name)) { + return this.reservedWordsMappings().get(name); + } + return camelize(name) + '_'; + } + + @Override + public String apiFileFolder() { + return outputFolder + File.separator + sourceFolder + File.separator; + } + + @Override + public String modelFileFolder() { + return outputFolder + File.separator + + sourceFolder + File.separator + + modelFolder + File.separator; + } + + @Override + public String toVarName(String name) { + // replace - with _ e.g. created-at => created_at + name = sanitizeName(name.replaceAll("-", "_")); + // for reserved word or word starting with number, append _ + if (isReservedWord(name)) + name = escapeReservedWord(name); + + return name; + } + + @Override + public String toParamName(String name) { + return camelize(toVarName(name)); + } + + @Override + public String toArrayModelParamName(String name) { + if (name == null) { + LOGGER.warn("parameter name for array model is null. Default to 'array_model'."); + name = "array_model"; + } + + if (name.indexOf(":") > 0) { + name = name.substring(0, name.indexOf(":")) + "_array"; + } + + return toParamName(name); + } + + @Override + public String toModelName(String name) { + return this.packageName + "_" + underscore(name.replaceAll("-", "_").replaceAll("\\.", "_")); + } + + @Override + public String toApiName(String name) { + return this.packageName; + } + + @Override + public String toModelFilename(String name) { + return this.packageName + "_" + underscore(name.replaceAll("\\.", "_")); + } + + @Override + public String toApiFilename(String name) { + return toApiName(name); + } + + @Override + public String toOperationId(String operationId) { + // method name cannot use reserved keyword, e.g. return + if (isReservedWord(operationId)) { + LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId)).replaceAll("\\.", "_")); + operationId = "call_" + operationId; + } + + return underscore(operationId.replaceAll("\\.", "_")); + } + + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + Map operations = (Map) objs.get("operations"); + List os = (List) operations.get("operation"); + List newOs = new ArrayList<>(); + Pattern pattern = Pattern.compile("\\{([^\\}]+)\\}"); + for (CodegenOperation o : os) { + // force http method to lower case + o.httpMethod = o.httpMethod.toLowerCase(Locale.ROOT); + + if (o.isListContainer) { + o.returnType = "[" + o.returnBaseType + "]"; + } + + Matcher matcher = pattern.matcher(o.path); + StringBuffer buffer = new StringBuffer(); + while (matcher.find()) { + String pathTemplateName = matcher.group(1); + matcher.appendReplacement(buffer, "\", " + camelize(pathTemplateName) + ", \""); + } + matcher.appendTail(buffer); + + ExtendedCodegenOperation eco = new ExtendedCodegenOperation(o); + if (buffer.length() == 0) { + eco.setReplacedPathName(o.path); + } else { + eco.setReplacedPathName(buffer.toString()); + } + newOs.add(eco); + } + operations.put("operation", newOs); + return objs; + } + + public void setPackageName(String packageName) { + this.packageName = packageName; + } + + public void setPackageVersion(String packageVersion) { + this.packageVersion = packageVersion; + } + + String length(Object os) { + int l = 1; + for (CodegenParameter o : ((ExtendedCodegenOperation) os).allParams) { + if (o.required) + l++; + } + + return Integer.toString(l); + } + + private int lengthRequired(List allParams) { + int l = 0; + for (CodegenParameter o : allParams) { + if (o.required || o.isBodyParam) + l++; + } + + return l; + } + + @Override + public String escapeQuotationMark(String input) { + // remove " to avoid code injection + return input.replace("\"", ""); + } + + @Override + public String escapeUnsafeCharacters(String input) { + return input.replace("*/", "*_/").replace("/*", "/_*"); + } + + class CodegenArrayModel extends CodegenModel { + Integer minItems; + Integer maxItems; + + public CodegenArrayModel(CodegenModel cm, ArraySchema schema) { + super(); + + // Copy all fields of CodegenModel + this.parent = cm.parent; + this.parentSchema = cm.parentSchema; + this.parentModel = cm.parentModel; + this.interfaceModels = cm.interfaceModels; + this.children = cm.children; + this.name = cm.name; + this.classname = cm.classname; + this.title = cm.title; + this.description = cm.description; + this.classVarName = cm.classVarName; + this.modelJson = cm.modelJson; + this.dataType = cm.dataType; + this.xmlPrefix = cm.xmlPrefix; + this.xmlNamespace = cm.xmlNamespace; + this.xmlName = cm.xmlName; + this.classFilename = cm.classFilename; + this.unescapedDescription = cm.unescapedDescription; + this.discriminator = cm.discriminator; + this.defaultValue = cm.defaultValue; + this.arrayModelType = cm.arrayModelType; + this.isAlias = cm.isAlias; + this.vars = cm.vars; + this.requiredVars = cm.requiredVars; + this.optionalVars = cm.optionalVars; + this.readOnlyVars = cm.readOnlyVars; + this.readWriteVars = cm.readWriteVars; + this.allVars = cm.allVars; + this.parentVars = cm.parentVars; + this.allowableValues = cm.allowableValues; + this.mandatory = cm.mandatory; + this.allMandatory = cm.allMandatory; + this.imports = cm.imports; + this.hasVars = cm.hasVars; + this.emptyVars = cm.emptyVars; + this.hasMoreModels = cm.hasMoreModels; + this.hasEnums = cm.hasEnums; + this.isEnum = cm.isEnum; + this.hasRequired = cm.hasRequired; + this.hasOptional = cm.hasOptional; + this.isArrayModel = cm.isArrayModel; + this.hasChildren = cm.hasChildren; + this.hasOnlyReadOnly = cm.hasOnlyReadOnly; + this.externalDocumentation = cm.externalDocumentation; + this.vendorExtensions = cm.vendorExtensions; + this.additionalPropertiesType = cm.additionalPropertiesType; + + this.minItems = schema.getMinItems(); + this.maxItems = schema.getMaxItems(); + } + } + + class ExtendedCodegenOperation extends CodegenOperation { + private String replacedPathName; + String arity; + + 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.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.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.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.bodyParam = o.bodyParam; + this.allParams = o.allParams; + this.arity = Integer.toString(lengthRequired(o.allParams)); + this.bodyParams = o.bodyParams; + this.pathParams = o.pathParams; + this.queryParams = o.queryParams; + this.headerParams = o.headerParams; + this.formParams = o.formParams; + this.authMethods = o.authMethods; + this.tags = o.tags; + this.responses = o.responses; + this.imports = o.imports; + this.examples = o.examples; + this.externalDocs = o.externalDocs; + this.vendorExtensions = o.vendorExtensions; + this.nickname = o.nickname; + this.operationIdLowerCase = o.operationIdLowerCase; + this.operationIdCamelCase = o.operationIdCamelCase; + } + + public String getReplacedPathName() { + return replacedPathName; + } + + public void setReplacedPathName(String replacedPathName) { + this.replacedPathName = replacedPathName; + } + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java index d0354468ae3..c80d917a6b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java @@ -30,7 +30,7 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen { protected static final String LIBRARY_JERSEY2 = "jersey2"; /** - * Default library template to use. (Default:{@value #DEFAULT_JERSEY_LIBRARY}) + * Default library template to use. (Default: jersey2) */ public static final String DEFAULT_JERSEY_LIBRARY = LIBRARY_JERSEY2; public static final String USE_TAGS = "useTags"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 70c4fe4c343..575c983cbad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -18,6 +18,8 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.examples.Example; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.slf4j.Logger; @@ -536,6 +538,34 @@ public class RubyClientCodegen extends AbstractRubyCodegen { p.example = example; } + /** + * Return the example value of the parameter. Overrides the + * setParameterExampleValue(CodegenParameter, Parameter) method in + * DefaultCodegen to always call setParameterExampleValue(CodegenParameter) + * in this class, which adds single quotes around strings from the + * x-example property. + * + * @param codegenParameter Codegen parameter + * @param parameter Parameter + */ + public void setParameterExampleValue(CodegenParameter codegenParameter, Parameter parameter) { + if (parameter.getExample() != null) { + codegenParameter.example = parameter.getExample().toString(); + } else if (parameter.getExamples() != null && !parameter.getExamples().isEmpty()) { + Example example = parameter.getExamples().values().iterator().next(); + if (example.getValue() != null) { + codegenParameter.example = example.getValue().toString(); + } + } else { + Schema schema = parameter.getSchema(); + if (schema != null && schema.getExample() != null) { + codegenParameter.example = schema.getExample().toString(); + } + } + + setParameterExampleValue(codegenParameter); + } + public void setGemName(String gemName) { this.gemName = gemName; } 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 c7cc86038cf..1fcc570dd60 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 @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import com.google.common.base.Strings; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; import org.openapitools.codegen.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.StringUtils; @@ -310,9 +311,17 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; Schema inner = ap.getItems(); + if (inner == null) { + LOGGER.warn(ap.getName() + "(array property) does not have a proper inner type defined.Default to string"); + inner = new StringSchema().description("TODO default missing array inner type to string"); + } return "Vec<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { Schema inner = ModelUtils.getAdditionalProperties(p); + if (inner == null) { + LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); + inner = new StringSchema().description("TODO default missing map inner type to string"); + } return "::std::collections::HashMap"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index a1980ebb871..01dc433229c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -177,8 +177,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { "Rust crate name (convention: snake_case).") .defaultValue("openapi_client")); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, - "Rust crate version.") - .defaultValue("1.0.0")); + "Rust crate version.")); /* * Additional Properties. These values can be passed to the templates and @@ -224,8 +223,6 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION)); - } else { - setPackageVersion("1.0.0"); } additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); @@ -477,6 +474,10 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { return mimetype.toLowerCase(Locale.ROOT).startsWith("text/plain"); } + boolean isMimetypeHtmlText(String mimetype) { + return mimetype.toLowerCase(Locale.ROOT).startsWith("text/html"); + } + boolean isMimetypeWwwFormUrlEncoded(String mimetype) { return mimetype.toLowerCase(Locale.ROOT).startsWith("application/x-www-form-urlencoded"); } @@ -547,6 +548,8 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { consumesXml = true; } else if (isMimetypePlainText(mimeType)) { consumesPlainText = true; + } else if (isMimetypeHtmlText(mimeType)) { + consumesPlainText = true; } else if (isMimetypeWwwFormUrlEncoded(mimeType)) { additionalProperties.put("usesUrlEncodedForm", true); } @@ -573,6 +576,8 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { producesXml = true; } else if (isMimetypePlainText(mimeType)) { producesPlainText = true; + } else if (isMimetypeHtmlText(mimeType)) { + producesPlainText = true; } mediaType.put("mediaType", mimeType); @@ -665,7 +670,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { if (isMimetypeXml(mediaType)) { additionalProperties.put("usesXml", true); consumesXml = true; - } else if (isMimetypePlainText(mediaType)) { + } else if (isMimetypePlainText(mediaType) || isMimetypeHtmlText(mediaType)) { consumesPlainText = true; } else if (isMimetypeWwwFormUrlEncoded(mediaType)) { additionalProperties.put("usesUrlEncodedForm", true); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index 5704ce5fbd1..aef963eb8a9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -472,7 +472,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode @Override public String toModelFilename(String name) { - return this.sanitizeName(this.convertUsingFileNamingConvention(name) + modelFileSuffix); + return this.convertUsingFileNamingConvention(this.sanitizeName(name) + modelFileSuffix); } @Override 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 9775e5b323d..f3639393cc2 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 @@ -80,7 +80,7 @@ public class ApiClient { private HttpLoggingInterceptor loggingInterceptor; /* - * Constructor for ApiClient + * Basic constructor for ApiClient */ public ApiClient() { init(); @@ -94,13 +94,23 @@ public class ApiClient { } {{#authMethods}}{{#isOAuth}} /* - * Constructor for ApiClient to support access token retry on 401/403 + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID */ - public ApiClient( - String clientId, - String clientSecret, - Map parameters - ) { + public ApiClient(String clientId) { + this(clientId, null, null); + } + + /* + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID and additional parameters + */ + public ApiClient(String clientId, Map parameters) { + this(clientId, null, parameters); + } + + /* + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID, secret, and additional parameters + */ + public ApiClient(String clientId, String clientSecret, Map parameters) { init(); RetryingOAuth retryingOAuth = new RetryingOAuth("{{tokenUrl}}", clientId, OAuthFlow.{{flow}}, clientSecret, parameters); diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache index 29dd30720c3..474084a2f23 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache @@ -206,8 +206,8 @@ {{#useBeanValidation}} 1.1.0.Final {{/useBeanValidation}} - 3.2.5 - 2.9.6 + 3.2.7 + 2.9.7 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache index f1ff0c1dd18..079e81b6da0 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache @@ -263,8 +263,8 @@ {{#generateSpringBootApplication}} 1.5.9.RELEASE {{/generateSpringBootApplication}} - 3.2.5 - 2.9.6 + 3.2.7 + 2.9.7 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index c5cbafc2595..f49b66eead8 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -79,7 +79,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{^parent}} * maximum: {{maximum}} {{/maximum}} * @return {{name}} - **/ + */ {{#vendorExtensions.extraAnnotation}} {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 1659fc4169c..6bd50bc8e2a 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -22,6 +22,7 @@ org.openapitools.codegen.languages.EiffelClientCodegen org.openapitools.codegen.languages.ElixirClientCodegen org.openapitools.codegen.languages.ElmClientCodegen org.openapitools.codegen.languages.ErlangClientCodegen +org.openapitools.codegen.languages.ErlangProperCodegen org.openapitools.codegen.languages.ErlangServerCodegen org.openapitools.codegen.languages.FlashClientCodegen org.openapitools.codegen.languages.FinchServerCodegen diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache index b8a4e34fad1..f1a7841c402 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache @@ -73,7 +73,7 @@ void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Reque nlohmann::json request_body = nlohmann::json::parse(request.body()); {{^isPrimitiveType}}{{^isContainer}} {{paramName}}.fromJson(request_body); - {{/isContainer}}{{/isPrimitiveType}}{{#isContainer}} {{paramName}} = {{#isListContainer}} {{prefix}}ModelArrayHelper{{/isListContainer}}{{#isMapContainer}} {{prefix}}ModelMapHelper{{/isMapContainer}}::fromJson<{{items.baseType}}>(request_body);{{/isContainer}} + {{/isContainer}}{{/isPrimitiveType}}{{#isContainer}} {{paramName}} = {{#isListContainer}} {{prefix}}ArrayHelper{{/isListContainer}}{{#isMapContainer}} {{prefix}}MapHelper{{/isMapContainer}}::fromJson<{{items.baseType}}>(request_body);{{/isContainer}} {{#isPrimitiveType}} // The conversion is done automatically by the json library {{paramName}} = request_body; diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-header.mustache index 0fb65fa26b3..10c0c8181f6 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-header.mustache @@ -34,7 +34,7 @@ public: void validate() override; nlohmann::json toJson() const override; - void fromJson(nlohmann::json& json) override; + void fromJson(const nlohmann::json& json) override; ///////////////////////////////////////////// /// {{classname}} members 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 41d64dcf75d..ca57408bcb2 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 @@ -45,20 +45,34 @@ nlohmann::json {{classname}}::toJson() const if(jsonArray.size() > 0) { val["{{baseName}}"] = jsonArray; - } - {{/required}} + } {{/required}} } - {{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(m_{{name}}IsSet) + {{/isListContainer}}{{#isMapContainer}}{ + nlohmann::json jsonObj; + for( auto const& item : m_{{name}} ) + { {{^items.isContainer}} + jsonObj[item.first] = {{prefix}}ModelBase::toJson(item.second);{{/items.isContainer}} {{#items.isListContainer}} + jsonObj[item.first] = {{prefix}}ArrayHelper::toJson<{{{items.items.datatype}}}>(item.second); + {{/items.isListContainer}} {{#items.isMapContainer}} + jsonObj[item.first] = {{prefix}}MapHelper::toJson<{{{items.items.datatype}}}>(item.second); {{/items.isMapContainer}} + } + {{#required}}val["{{baseName}}"] = jsonObj; {{/required}}{{^required}} + if(jsonObj.size() > 0) + { + val["{{baseName}}"] = jsonObj; + } {{/required}} + } + {{/isMapContainer}}{{^isContainer}}{{^isPrimitiveType}}{{^required}}if(m_{{name}}IsSet) { val["{{baseName}}"] = {{prefix}}ModelBase::toJson(m_{{name}}); } {{/required}}{{#required}}val["{{baseName}}"] = {{prefix}}ModelBase::toJson(m_{{name}}); - {{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}} + {{/required}}{{/isPrimitiveType}}{{/isContainer}}{{/vars}} return val; } -void {{classname}}::fromJson(nlohmann::json& val) +void {{classname}}::fromJson(const nlohmann::json& val) { {{#vars}}{{#isPrimitiveType}}{{^isListContainer}}{{^required}}if(val.find("{{baseName}}") != val.end()) { @@ -67,33 +81,53 @@ void {{classname}}::fromJson(nlohmann::json& val) {{/required}}{{#required}}{{setter}}(val.at("{{baseName}}")); {{/required}}{{/isListContainer}}{{/isPrimitiveType}}{{#isListContainer}}{ m_{{name}}.clear(); - nlohmann::json jsonArray; {{^required}}if(val.find("{{baseName}}") != val.end()) { {{/required}} - for( auto& item : val["{{baseName}}"] ) - { - {{#isPrimitiveType}}m_{{name}}.push_back(item); - {{/isPrimitiveType}}{{^isPrimitiveType}}{{#items.isString}}m_{{name}}.push_back(item); - {{/items.isString}}{{^items.isString}}{{#items.isDateTime}}m_{{name}}.push_back(item); - {{/items.isDateTime}}{{^items.isDateTime}} - if(item.is_null()) + for( auto& item : val["{{baseName}}"] ) { - m_{{name}}.push_back( {{{items.datatype}}}() ); + {{#isPrimitiveType}}m_{{name}}.push_back(item); + {{/isPrimitiveType}}{{^isPrimitiveType}}{{#items.isString}}m_{{name}}.push_back(item); + {{/items.isString}}{{^items.isString}}{{#items.isDateTime}}m_{{name}}.push_back(item); + {{/items.isDateTime}}{{^items.isDateTime}} + if(item.is_null()) + { + m_{{name}}.push_back( {{{items.datatype}}}() ); + } + else + { + {{{items.datatype}}} newItem; + newItem.fromJson(item); + m_{{name}}.push_back( newItem ); + } + {{/items.isDateTime}}{{/items.isString}}{{/isPrimitiveType}} } - else - { - {{{items.datatype}}} newItem; - newItem.fromJson(item); - m_{{name}}.push_back( newItem ); - } - {{/items.isDateTime}}{{/items.isString}}{{/isPrimitiveType}} - } {{^required}} } {{/required}} } - {{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(val.find("{{baseName}}") != val.end()) + {{/isListContainer}}{{#isMapContainer}}{ + m_{{name}}.clear(); + {{^required}}if(val.find("{{baseName}}") != val.end()) + { + {{/required}} + if(val["{{baseName}}"].is_object()) { {{^items.isContainer}} + m_{{name}} = {{prefix}}MapHelper::fromJson<{{{items.datatype}}}>(val["{{baseName}}"]); + {{/items.isContainer}} {{#items.isContainer}} + for( auto& item : val["{{baseName}}"].items() ) + { {{#items.isMapContainer}} + {{{items.datatype}}} newItem = {{prefix}}MapHelper::fromJson<{{{items.items.datatype}}}>(item.value()); + {{/items.isMapContainer}}{{#items.isListContainer}} + {{{items.datatype}}} newItem = {{prefix}}ArrayHelper::fromJson<{{{items.items.datatype}}}>(item.value()); + {{/items.isListContainer}} + m_{{name}}.insert(m_{{name}}.end(), std::pair< std::string, {{{items.datatype}}} >(item.key(), newItem)); + } {{/items.isContainer}} + } + {{^required}} + } + {{/required}} + } + {{/isMapContainer}}{{^isContainer}}{{^isPrimitiveType}}{{^required}}if(val.find("{{baseName}}") != val.end()) { {{#isString}}{{setter}}(val.at("{{baseName}}"));{{/isString}}{{#isByteArray}}{{setter}}(val.at("{{baseName}}"));{{/isByteArray}}{{#isBinary}}{{setter}}(val.at("{{baseName}}")); {{/isBinary}}{{^isString}}{{#isDateTime}}{{setter}}(val.at("{{baseName}}")); @@ -107,7 +141,7 @@ void {{classname}}::fromJson(nlohmann::json& val) } {{/required}}{{#required}}{{#isString}}{{setter}}(val.at("{{baseName}}")); {{/isString}}{{^isString}}{{#isDateTime}}{{setter}}(val.at("{{baseName}}")); - {{/isDateTime}}{{/isString}}{{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}} + {{/isDateTime}}{{/isString}}{{/required}}{{/isPrimitiveType}}{{/isContainer}}{{/vars}} } diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/modelbase-header.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/modelbase-header.mustache index faeff483038..8840764a57a 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/modelbase-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/modelbase-header.mustache @@ -28,7 +28,7 @@ public: virtual void validate() = 0; virtual nlohmann::json toJson() const = 0; - virtual void fromJson(nlohmann::json& json) = 0; + virtual void fromJson(const nlohmann::json& json) = 0; static std::string toJson( std::string const& value ); static std::string toJson( std::time_t const& value ); @@ -39,100 +39,85 @@ public: static nlohmann::json toJson({{prefix}}ModelBase const& content ); }; -class {{prefix}}ModelArrayHelper { -public: - template - static std::vector fromJson(nlohmann::json& json) { - T *ptrTest; - std::vector val; - if (dynamic_cast<{{prefix}}ModelBase*>(ptrTest) != nullptr) { - if (!json.empty()) { - for (auto &item : json.items()) { - T entry; - entry.fromJson(item.value()); - val.push_back(entry); - } - } - } - return val; - } - template - static nlohmann::json toJson(std::vector val) { - nlohmann::json json; - for(auto item : val){ - json.push_back(item.toJson()); - } - return json; - } -}; - class {{prefix}}ArrayHelper { +private: + template::value>::value> + static void itemFromJson(T& item, const nlohmann::json& json){ + item = json; + } + static void itemFromJson(ModelBase& item, const nlohmann::json& json){ + item.fromJson(json); + } + template::value>::value> + static nlohmann::json itemtoJson(const T& item){ + return item; + } + static nlohmann::json itemtoJson(const ModelBase& item){ + return item.toJson(); + } public: - template - static std::vector fromJson(nlohmann::json& json) { - std::vector val; - nlohmann::from_json(json, val); - return val; - } - template - static nlohmann::json toJson(std::vector val) { - nlohmann::json json; - nlohmann::to_json(json, val); - return json; - } -}; - -class {{prefix}}ModelMapHelper { -public: - template - static std::map & fromJson(nlohmann::json& json) { - T *ptrTest; - std::map val; - if (dynamic_cast<{{prefix}}ModelBase*>(ptrTest) != nullptr) { - if (!json.empty()) { - for (auto &item : json.items()) { - T entry; - entry.fromJson(item.value()); - val.insert(val.end(), - std::pair(item.key(), entry)); - } - } - } - return val; - } - template - static nlohmann::json toJson(std::map val) { - nlohmann::json json; - for (auto const& item : val) { - json[item.first] = item.second.toJson(); - } - return json; - } + template + static std::vector fromJson(const nlohmann::json& json) { + std::vector val; + if (!json.empty()) { + for (const auto& item : json.items()) { + T entry; + itemFromJson(entry, item.value()); + val.push_back(entry); + } + } + return val; + } + template + static nlohmann::json toJson(const std::vector& val) { + nlohmann::json json; + for(const auto& item : val){ + json.push_back(itemtoJson(item)); + } + return json; + } }; class {{prefix}}MapHelper { +private: + template::value>::value> + static void itemFromJson(T &item, const nlohmann::json& json){ + item = json; + } + static void itemFromJson(ModelBase &item, const nlohmann::json& json){ + item.fromJson(json); + } + template::value>::value> + static nlohmann::json itemtoJson(const T& item){ + return item; + } + static nlohmann::json itemtoJson(const ModelBase& item){ + return item.toJson(); + } + public: - template - static std::map & fromJson(nlohmann::json& json) { - std::map val; - if (!json.empty()) { - for (auto &item : json.items()) { - T entry = item.value(); - val.insert(val.end(), - std::pair(item.key(), entry)); - } - } - return val; - } - template - static nlohmann::json toJson(std::map val) { - nlohmann::json json; - for (auto const& item : val) { - nlohmann::json jitem = item.second; - json[item.first] = jitem; - } - return json; - } + template + static std::map fromJson(const nlohmann::json& json) { + std::map val; + if (!json.empty()) { + for (const auto& item : json.items()) { + T entry; + itemfromJson(entry, item.value()); + val.insert(val.end(), + std::pair(item.key(), entry)); + } + } + return val; + } + template + static nlohmann::json toJson(const std::map& val) { + nlohmann::json json; + for (const auto& item : val) { + nlohmann::json jitem = itemtoJson(item.second); + json[item.first] = jitem; + } + return json; + } }; {{#modelNamespaceDeclarations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-source.mustache index 3650945081c..b6f58e86525 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/apiclient-source.mustache @@ -3,6 +3,18 @@ #include "MultipartFormData.h" #include "ModelBase.h" +#include +#include +#include + +template +utility::string_t toString(const T value) +{ + std::ostringstream out; + out << std::setprecision(std::numeric_limits::digits10) << std::fixed << value; + return out.str(); +} + {{#apiNamespaceDeclarations}} namespace {{this}} { {{/apiNamespaceDeclarations}} @@ -46,12 +58,12 @@ utility::string_t ApiClient::parameterToString(int32_t value) utility::string_t ApiClient::parameterToString(float value) { - return utility::conversions::to_string_t(std::to_string(value)); + return utility::conversions::to_string_t(toString(value)); } utility::string_t ApiClient::parameterToString(double value) { - return utility::conversions::to_string_t(std::to_string(value)); + return utility::conversions::to_string_t(toString(value)); } utility::string_t ApiClient::parameterToString(const utility::datetime &value) diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache index 0bc4771d8a6..979880be2f4 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache @@ -36,7 +36,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; @@ -54,7 +54,14 @@ public: {{/isNotContainer}}{{^required}}bool {{nameInCamelCase}}IsSet() const; void unset{{name}}(); {{/required}} + + {{#isPrimitiveType}} void {{setter}}({{{dataType}}} value); + {{/isPrimitiveType}} + {{^isPrimitiveType}} + void {{setter}}(const {{{dataType}}}& value); + {{/isPrimitiveType}} + {{/isInherited}} {{/vars}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache index 7325a888f99..eb302fda6b1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache @@ -126,7 +126,7 @@ web::json::value {{classname}}::toJson() const return val; } -void {{classname}}::fromJson(web::json::value& val) +void {{classname}}::fromJson(const web::json::value& val) { {{#parent}} this->{{{parent}}}::fromJson(val); @@ -140,7 +140,7 @@ void {{classname}}::fromJson(web::json::value& val) {{^required}} if(val.has_field(utility::conversions::to_string_t("{{baseName}}"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("{{baseName}}")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("{{baseName}}")); if(!fieldValue.is_null()) { {{setter}}(ModelBase::{{baseType}}FromJson(fieldValue)); @@ -148,7 +148,7 @@ void {{classname}}::fromJson(web::json::value& val) } {{/required}} {{#required}} - {{setter}}(ModelBase::{{baseType}}FromJson(val[utility::conversions::to_string_t("{{baseName}}")])); + {{setter}}(ModelBase::{{baseType}}FromJson(val.at(utility::conversions::to_string_t("{{baseName}}")))); {{/required}} {{/isMapContainer}} {{/isListContainer}} @@ -161,7 +161,7 @@ void {{classname}}::fromJson(web::json::value& val) if(val.has_field(utility::conversions::to_string_t("{{baseName}}"))) { {{/required}} - for( auto& item : val[utility::conversions::to_string_t("{{baseName}}")].as_array() ) + for( auto& item : val.at(utility::conversions::to_string_t("{{baseName}}")).as_array() ) { {{#items.isPrimitiveType}} m_{{name}}.push_back(ModelBase::{{items.baseType}}FromJson(item)); @@ -202,21 +202,21 @@ void {{classname}}::fromJson(web::json::value& val) if(val.has_field(utility::conversions::to_string_t("{{baseName}}"))) { {{/required}} - for( auto& item : val[utility::conversions::to_string_t("{{baseName}}")].as_array() ) + for( const auto& item : val.at(utility::conversions::to_string_t("{{baseName}}")).as_array() ) { if(item.has_field(utility::conversions::to_string_t("key"))) { - utility::string_t key = ModelBase::stringFromJson(item[utility::conversions::to_string_t("key")]); + utility::string_t key = ModelBase::stringFromJson(item.at(utility::conversions::to_string_t("key"))); {{#items.isPrimitiveType}} - m_{{name}}.insert(std::pair( key, ModelBase::{{items.baseType}}FromJson(item[utility::conversions::to_string_t("value")]))); + m_{{name}}.insert(std::pair( key, ModelBase::{{items.baseType}}FromJson(item.at(utility::conversions::to_string_t("value"))))); {{/items.isPrimitiveType}} {{^items.isPrimitiveType}} {{#items.isString}} - m_{{name}}.insert(std::pair( key, ModelBase::stringFromJson(item[utility::conversions::to_string_t("value")]))); + m_{{name}}.insert(std::pair( key, ModelBase::stringFromJson(item.at(utility::conversions::to_string_t("value"))))); {{/items.isString}} {{^items.isString}} {{#items.isDateTime}} - m_{{name}}.insert(std::pair( key, ModelBase::dateFromJson(item[utility::conversions::to_string_t("value")]))); + m_{{name}}.insert(std::pair( key, ModelBase::dateFromJson(item.at(utility::conversions::to_string_t("value"))))); {{/items.isDateTime}} {{^items.isDateTime}} if(item.is_null()) @@ -226,7 +226,7 @@ void {{classname}}::fromJson(web::json::value& val) else { {{{items.datatype}}} newItem({{{items.defaultValue}}}); - newItem->fromJson(item[utility::conversions::to_string_t("value")]); + newItem->fromJson(item.at(utility::conversions::to_string_t("value"))); m_{{name}}.insert(std::pair( key, newItem )); } {{/items.isDateTime}} @@ -245,7 +245,7 @@ void {{classname}}::fromJson(web::json::value& val) {{^required}} if(val.has_field(utility::conversions::to_string_t("{{baseName}}"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("{{baseName}}")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("{{baseName}}")); if(!fieldValue.is_null()) { {{#isString}} @@ -271,7 +271,7 @@ void {{classname}}::fromJson(web::json::value& val) {{/required}} {{#required}} {{#isString}} - {{setter}}(ModelBase::stringFromJson(val[utility::conversions::to_string_t("{{baseName}}")])); + {{setter}}(ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("{{baseName}}")))); {{/isString}} {{#isByteArray}} {{setter}}(ModelBase::stringFromJson(val[utility::conversions::to_string_t("{{baseName}}")])); @@ -280,15 +280,15 @@ void {{classname}}::fromJson(web::json::value& val) {{^isByteArray}} {{#isDateTime}} {{setter}} - (ModelBase::dateFromJson(val[utility::conversions::to_string_t("{{baseName}}")])); + (ModelBase::dateFromJson(val.at(utility::conversions::to_string_t("{{baseName}}")))); {{/isDateTime}} {{^isDateTime}} {{#vendorExtensions.x-codegen-file}} - {{setter}}(ModelBase::fileFromJson(val[utility::conversions::to_string_t("{{baseName}}")])); + {{setter}}(ModelBase::fileFromJson(val.at(utility::conversions::to_string_t("{{baseName}}")))); {{/vendorExtensions.x-codegen-file}} {{^vendorExtensions.x-codegen-file}} {{{dataType}}} new{{name}}({{{defaultValue}}}); - new{{name}}->fromJson(val[utility::conversions::to_string_t("{{baseName}}")]); + new{{name}}->fromJson(val.at(utility::conversions::to_string_t("{{baseName}}"))); {{setter}}( new{{name}} ); {{/vendorExtensions.x-codegen-file}} {{/isDateTime}} @@ -596,26 +596,25 @@ void {{classname}}::fromMultiPart(std::shared_ptr multipart, { return m_{{name}}; } - -void {{classname}}::{{setter}}({{{dataType}}} value) -{ - m_{{name}} = value; - {{^required}}m_{{name}}IsSet = true;{{/required}} -} {{/isNotContainer}} {{#isNotContainer}} {{{dataType}}} {{classname}}::{{getter}}() const { return m_{{name}}; } +{{/isNotContainer}} - +{{#isPrimitiveType}} void {{classname}}::{{setter}}({{{dataType}}} value) +{{/isPrimitiveType}} +{{^isPrimitiveType}} +void {{classname}}::{{setter}}(const {{{dataType}}}& value) +{{/isPrimitiveType}} { m_{{name}} = value; {{^required}}m_{{name}}IsSet = true;{{/required}} } -{{/isNotContainer}} + {{^required}} bool {{classname}}::{{nameInCamelCase}}IsSet() const { diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache index 83271bf79d9..c88ab1dfe63 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache @@ -30,7 +30,7 @@ public: virtual void validate() = 0; virtual web::json::value toJson() const = 0; - virtual void fromJson(web::json::value& json) = 0; + virtual void fromJson(const web::json::value& json) = 0; virtual void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const = 0; virtual void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) = 0; @@ -46,14 +46,14 @@ public: template static web::json::value toJson(const std::vector& value); - static int64_t int64_tFromJson(web::json::value& val); - static int32_t int32_tFromJson(web::json::value& val); - static float floatFromJson(web::json::value& val); - static utility::string_t stringFromJson(web::json::value& val); - static utility::datetime dateFromJson(web::json::value& val); - static double doubleFromJson(web::json::value& val); - static bool boolFromJson(web::json::value& val); - static std::shared_ptr fileFromJson(web::json::value& val); + static int64_t int64_tFromJson(const web::json::value& val); + static int32_t int32_tFromJson(const web::json::value& val); + static float floatFromJson(const web::json::value& val); + static utility::string_t stringFromJson(const web::json::value& val); + static utility::datetime dateFromJson(const web::json::value& val); + static double doubleFromJson(const web::json::value& val); + static bool boolFromJson(const web::json::value& val); + static std::shared_ptr fileFromJson(const web::json::value& val); static std::shared_ptr toHttpContent( const utility::string_t& name, const utility::string_t& value, const utility::string_t& contentType = utility::conversions::to_string_t("")); static std::shared_ptr toHttpContent( const utility::string_t& name, const utility::datetime& value, const utility::string_t& contentType = utility::conversions::to_string_t("")); diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-source.mustache index 86f976d1453..97f8aea1090 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-source.mustache @@ -46,25 +46,25 @@ web::json::value ModelBase::toJson( std::shared_ptr content ) return value; } -std::shared_ptr ModelBase::fileFromJson(web::json::value& val) +std::shared_ptr ModelBase::fileFromJson(const web::json::value& val) { std::shared_ptr content(new HttpContent); if(val.has_field(utility::conversions::to_string_t("ContentDisposition"))) { - content->setContentDisposition( ModelBase::stringFromJson(val[utility::conversions::to_string_t("ContentDisposition")]) ); + content->setContentDisposition( ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("ContentDisposition"))) ); } if(val.has_field(utility::conversions::to_string_t("ContentType"))) { - content->setContentType( ModelBase::stringFromJson(val[utility::conversions::to_string_t("ContentType")]) ); + content->setContentType( ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("ContentType"))) ); } if(val.has_field(utility::conversions::to_string_t("FileName"))) { - content->setFileName( ModelBase::stringFromJson(val[utility::conversions::to_string_t("FileName")]) ); + content->setFileName( ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("FileName"))) ); } if(val.has_field(utility::conversions::to_string_t("InputStream"))) { - content->setData( ModelBase::fromBase64( ModelBase::stringFromJson(val[utility::conversions::to_string_t("InputStream")]) ) ); + content->setData( ModelBase::fromBase64( ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("InputStream")))) ); } return content; @@ -263,32 +263,32 @@ std::shared_ptr ModelBase::fromBase64( const utility::string_t& en return result; } -int64_t ModelBase::int64_tFromJson(web::json::value& val) +int64_t ModelBase::int64_tFromJson(const web::json::value& val) { return val.as_number().to_int64(); } -int32_t ModelBase::int32_tFromJson(web::json::value& val) +int32_t ModelBase::int32_tFromJson(const web::json::value& val) { return val.as_integer(); } -float ModelBase::floatFromJson(web::json::value& val) +float ModelBase::floatFromJson(const web::json::value& val) { return static_cast(val.as_double()); } -utility::string_t ModelBase::stringFromJson(web::json::value& val) +utility::string_t ModelBase::stringFromJson(const web::json::value& val) { return val.is_string() ? val.as_string() : utility::conversions::to_string_t(""); } -utility::datetime ModelBase::dateFromJson(web::json::value& val) +utility::datetime ModelBase::dateFromJson(const web::json::value& val) { return utility::datetime::from_string(val.as_string(), utility::datetime::ISO_8601); } -bool ModelBase::boolFromJson(web::json::value& val) +bool ModelBase::boolFromJson(const web::json::value& val) { return val.as_bool(); } -double ModelBase::doubleFromJson(web::json::value& val) +double ModelBase::doubleFromJson(const web::json::value& val) { return val.as_double(); } diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/object-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/object-header.mustache index 5ad0497e5a0..e048a80cd99 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/object-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/object-header.mustache @@ -29,7 +29,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/object-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/object-source.mustache index 2bc1d86eb1f..ba81ba71976 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/object-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/object-source.mustache @@ -24,7 +24,7 @@ web::json::value Object::toJson() const return m_object; } -void Object::fromJson(web::json::value& val) +void Object::fromJson(const web::json::value& val) { if (val.is_object()) { diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/README.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/README.mustache new file mode 100644 index 00000000000..cc63f05bdc5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/README.mustache @@ -0,0 +1,6 @@ +# OpenAPI client library for Erlang with Erlang QuickCheck generators + +## Overview + +An Erlang client stub and Erlang QuickCheck generators, generated by +[OpenAPI Generator](https://openapi-generator.tech) given an OpenAPI spec. diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/api.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/api.mustache new file mode 100644 index 00000000000..7861cfbeb32 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/api.mustache @@ -0,0 +1,30 @@ +-module({{classname}}_api). + +-export([ {{#operations}}{{#operation}}{{^-first}} + , {{/-first}}{{operationId}}/{{arity}}{{/operation}}{{/operations}} + ]). + +-define(BASE_URL, "{{{basePathWithoutHost}}}"). + +{{#operations}} +{{#operation}} +%% @doc {{{summary}}} +{{^notes.isEmpty}} +%% {{{notes}}} +{{/notes.isEmpty}} +-spec {{operationId}}({{#allParams}}{{#required}}{{^-first}}, {{/-first}}{{{dataType}}}{{/required}}{{/allParams}}) -> + {{packageName}}_utils:response(). +{{operationId}}({{#allParams}}{{#required}}{{^-first}}, {{/-first}}{{paramName}}{{/required}}{{/allParams}}) -> + Method = {{httpMethod}}, + Host = application:get_env({{packageName}}, host, "http://localhost:8080"), + Path = ["{{{replacedPathName}}}"], + Body = {{^formParams.isEmpty}}{form, [{{#formParams}}{{#required}}{{^-first}}, {{/-first}}{<<"{{{baseName}}}">>, {{paramName}}{{/required}}{{/formParams}}]++{{packageName}}_utils:optional_params([{{#formParams}}{{^required}}{{^-first}}, {{/-first}}'{{{baseName}}}'{{/required}}{{/formParams}}], _OptionalParams)}{{/formParams.isEmpty}}{{#formParams.isEmpty}}{{#bodyParams.isEmpty}}[]{{/bodyParams.isEmpty}}{{^bodyParams.isEmpty}}{{#bodyParams}}{{paramName}}{{/bodyParams}}{{/bodyParams.isEmpty}}{{/formParams.isEmpty}}, + ContentType = {{#hasConsumes}}hd([{{#consumes}}{{^-first}}, {{/-first}}"{{mediaType}}"{{/consumes}}]){{/hasConsumes}}{{^hasConsumes}}<<"text/plain">>{{/hasConsumes}}, + {{^queryParams.isEmpty}} + QueryString = [{{#queryParams}}{{^-first}}, {{/-first}}<<"{{{baseName}}}=">>, {{{paramName}}}, <<"&">>{{/queryParams}}], + {{/queryParams.isEmpty}} + + {{packageName}}_utils:request(Method, [Host, ?BASE_URL, Path{{^queryParams.isEmpty}}, <<"?">>, QueryString{{/queryParams.isEmpty}}], jsx:encode(Body), ContentType). + +{{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/app.src.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/app.src.mustache new file mode 100644 index 00000000000..0c9bc9c2ae0 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/app.src.mustache @@ -0,0 +1,21 @@ +{ application, {{packageName}} +, [ {description, {{#appDescription}}"{{appDescription}}"{{/appDescription}}{{^appDescription}}"OpenAPI client library for EQC testing"{{/appDescription}}} + , {vsn, "{{#apiVersion}}{{apiVersion}}{{/apiVersion}}{{^apiVersion}}0.1.0{{/apiVersion}}"} + , {registered, []} + , { applications + , [ kernel + , stdlib + , ssl + , jsx + ] + } + , { env + , [ {host, "http://{{#host}}{{{host}}}{{/host}}{{^host}}localhost:8080{{/host}}"} + , {basic_auth, {"admin", "admin"}} + ] + } + , {modules, []} + , {maintainers, []} + , {licenses, [{{#licenseInfo}}"{{licenseInfo}}"{{/licenseInfo}}]} + , {links, [{{#infoUrl}}"{{infoUrl}}"{{/infoUrl}}]} +]}. diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/gen.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/gen.mustache new file mode 100644 index 00000000000..c7da29fd143 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/gen.mustache @@ -0,0 +1,157 @@ +-module({{packageName}}_gen). + +-compile({no_auto_import,[date/0]}). + +-include_lib("proper/include/proper_common.hrl"). + +%%============================================================================== +%% Exports +%%============================================================================== + +-export([ binary/0 + , binary/1 + , binary/2 + , integer/0 + , integer/1 + , integer/2 + , boolean/0 + , list/0 + , list/1 + , list/2 + , list/3 + , map/0 + , date/0 + , datetime/0 + , any/0 + , elements/1 + ]). + +-define(CHARS, [$a, $b, $c]). + +%%============================================================================== +%% Generators +%%============================================================================== + +binary() -> binary(10). + +binary(Min, Max) -> + ?LET( {X, N} + , { proper_types:elements(?CHARS) + , proper_types:choose(Min, Max) + } + , iolist_to_binary(lists:duplicate(N, X)) + ). + +binary(N) -> + ?LET( X + , proper_types:elements(?CHARS) + , iolist_to_binary(lists:duplicate(N, X)) + ). + +integer() -> proper_types:int(). + +integer(0) -> proper_types:nat(); +integer(Min) -> + ?LET( N + , proper_types:nat() + , proper_types:choose(Min, Min + N) + ). + +integer(Min, Max) -> proper_types:choose(Min, Max). + +boolean() -> proper_types:bool(). + +list() -> list(any()). + +list(Type) -> proper_types:list(Type). + +list(Type, Min) -> + ?LET( N + , integer(0) + , ?LET(X, list(Type, Min, Min + N), X) + ). + +list(Type, Min, Max) when Min =< Max -> + ?LET( {X, Y} + , { proper_types:vector(Min, Type) + , proper_types:resize(Max - Min, proper_types:list(Type)) + } + , X ++ Y + ). + +map() -> proper_types:map(any(), any()). + +date() -> + ?LET( X + , ?SUCHTHAT( X + , { year() + , proper_types:choose(1, 12) + , proper_types:choose(1, 31) + } + , calendar:valid_date(X) + ) + , begin + {Year, Month, Day} = X, + YearBin = num_binary_format(Year, "4"), + MonthBin = num_binary_format(Month, "2"), + DayBin = num_binary_format(Day, "2"), + <> + end + ). + +datetime() -> + Date = date(), + Hour = hour(), + ?LET( X + , {Date, Hour} + , begin + {D, H} = X, + <> + end + ). + +any() -> + Any = [ binary() + , integer() + , boolean() + %% We don't include lists and maps to avoid huge values + %% , list() + %% , map() + , date() + , datetime() + ], + proper_types:oneof(Any). + +elements(Items) -> + proper_types:elements(Items). + +%%============================================================================== +%% Internal +%%============================================================================== + +year() -> + ?LET( X + , proper_types:nat() + , 1970 + X + ). + +hour() -> + ?LET( X + , { proper_types:choose(0, 23) + , proper_types:choose(0, 59) + , proper_types:choose(0, 59) + , proper_types:choose(0, 999) + } + , begin + {Hours, Mins, Secs, Millis} = X, + HoursBin = num_binary_format(Hours, "2"), + MinsBin = num_binary_format(Mins, "2"), + SecsBin = num_binary_format(Secs, "2"), + MillisBin = num_binary_format(Millis, "3"), + <> + end + ). + +num_binary_format(X, N) -> + list_to_binary(io_lib:format("~" ++ N ++ "..0B", [X])). diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/include.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/include.mustache new file mode 100644 index 00000000000..ee07f9f5c37 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/include.mustache @@ -0,0 +1,24 @@ +-compile({no_auto_import,[date/0]}). + +-import( {{packageName}}_gen + , [ binary/0 + , binary/1 + , binary/2 + , integer/0 + , integer/1 + , integer/2 + , boolean/0 + , list/0 + , list/1 + , list/2 + , list/3 + , map/0 + , date/0 + , datetime/0 + , any/0 + , elements/1 + ] + ). + +-type date() :: calendar:date(). +-type datetime() :: calendar:datetime(). diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/model.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/model.mustache new file mode 100644 index 00000000000..5e4024ed8d3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/model.mustache @@ -0,0 +1,26 @@ +{{#models}} +{{#model}} +-module({{classname}}). + +-include("{{packageName}}.hrl"). + +-export([{{classname}}/0]). + +-export_type([{{classname}}/0]). + +-type {{classname}}() ::{{#isEnum}} + binary().{{/isEnum}}{{^isEnum}}{{#isArrayModel}} + list({{arrayModelType}}).{{/isArrayModel}}{{^isArrayModel}} + [ {{#vars}}{{^-first}} + | {{/-first}}{'{{name}}', {{dataType}} }{{/vars}} + ].{{/isArrayModel}}{{/isEnum}} + +{{classname}}() ->{{#isEnum}} + elements([{{#allowableValues.values}}{{^-first}}, {{/-first}}<<"{{.}}">>{{/allowableValues.values}}]). + {{/isEnum}}{{#isArrayModel}} + list({{arrayModelType}}{{#minItems}}, {{minItems}}{{#maxItems}}, {{maxItems}}{{/maxItems}}{{/minItems}}).{{/isArrayModel}}{{^isEnum}}{{^isArrayModel}} + [ {{#vars}}{{^-first}} + , {{/-first}}{'{{baseName}}', {{#isString}}{{#isEnum}}elements([{{#allowableValues.values}}{{^-first}}, {{/-first}}<<"{{.}}">>{{/allowableValues.values}}]){{/isEnum}}{{^isEnum}}binary({{#minLength}}{{minLength}}{{#maxLength}}, {{maxLength}}{{/maxLength}}{{/minLength}}){{/isEnum}}{{/isString}}{{^isString}}{{baseType}}{{/isString}} }{{/vars}} + ].{{/isArrayModel}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/rebar.config.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/rebar.config.mustache new file mode 100644 index 00000000000..4a1593adca4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/rebar.config.mustache @@ -0,0 +1,7 @@ +{erl_opts, [debug_info, warnings_as_errors]}. + +{deps, [{jsx, "2.9.0"}, {proper, "1.3.0"}]}. + +{shell, [{apps, [{{packageName}}]}]}. + +{plugins, [rebar3_proper]}. diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/statem.hrl.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/statem.hrl.mustache new file mode 100644 index 00000000000..7b4dd931aa3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/statem.hrl.mustache @@ -0,0 +1,25 @@ +%%============================================================================== +%% Setup +%%============================================================================== + +setup() -> ok. + +%%============================================================================== +%% Cleanup +%%============================================================================== + +cleanup() -> ok. + +%%============================================================================== +%% Initial State +%%============================================================================== + +initial_state() -> #{}. + +%%============================================================================== +%% State transitions callbacks +%% +%% operation_pre(State) -> true. +%% operation_next(State, Result, Args) -> State. +%% operation_post(State, Args, Result) -> true. +%%============================================================================== diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/statem.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/statem.mustache new file mode 100644 index 00000000000..98ebdf1c54c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/statem.mustache @@ -0,0 +1,105 @@ +-module({{classname}}_statem). + +-behaviour(proper_statem). + +-include("{{packageName}}.hrl"). +-include_lib("proper/include/proper_common.hrl"). +-include_lib("stdlib/include/assert.hrl"). + +-compile(export_all). +-compile(nowarn_export_all). + +%%============================================================================== +%% PropEr callbacks +%%============================================================================== + +command(State) -> + Funs0 = [ {F, list_to_atom(atom_to_list(F) ++ "_args")} + || {F, _} <- ?MODULE:module_info(exports) + ], + + Funs1 = [ X || {_, FArgs} = X <- Funs0, + erlang:function_exported(?MODULE, FArgs, 1) + ], + proper_types:oneof([ {call, ?MODULE, F, ?MODULE:FArgs(State)} + || {F, FArgs} <- Funs1 + ]). + +precondition(S, {call, M, F, Args}) -> + Pre = list_to_atom(atom_to_list(F) ++ "_pre"), + case erlang:function_exported(M, Pre, 1) of + true -> M:Pre(S); + false -> true + end + andalso + case erlang:function_exported(M, Pre, 2) of + true -> M:Pre(S, Args); + false -> true + end. + +next_state(S, Res, {call, M, F, Args}) -> + Next = list_to_atom(atom_to_list(F) ++ "_next"), + case erlang:function_exported(M, Next, 3) of + true -> M:Next(S, Res, Args); + false -> S + end. + +postcondition(S, {call, M, F, Args}, Res) -> + Post = list_to_atom(atom_to_list(F) ++ "_post"), + case erlang:function_exported(M, Post, 3) of + true -> M:Post(S, Args, Res); + false -> true + end. + +{{#operations}} +{{#operation}} +%%============================================================================== +%% {{operationId}} +%%============================================================================== + +{{operationId}}({{#allParams}}{{#required}}{{^-first}}, {{/-first}}{{paramName}}{{/required}}{{/allParams}}) -> + {{classname}}_api:{{operationId}}({{#allParams}}{{#required}}{{^-first}}, {{/-first}}{{paramName}}{{/required}}{{/allParams}}). + +{{operationId}}_args(S) -> + Args = [{{#allParams}}{{#required}}{{^-first}}, {{/-first}}{{dataType}}{{/required}}{{/allParams}}], + case erlang:function_exported(?MODULE, '{{operationId}}_args_custom', 2) of + true -> ?MODULE:{{operationId}}_args_custom(S, Args); + false -> Args + end. + +{{/operation}} +{{/operations}} + +%%============================================================================== +%% The statem's property +%%============================================================================== + +prop_main() -> + setup(), + ?FORALL( Cmds + , proper_statem:commands(?MODULE) + , begin + cleanup(), + { History + , State + , Result + } = proper_statem:run_commands(?MODULE, Cmds), + ?WHENFAIL( + io:format("History: ~p\nState: ~p\nResult: ~p\nCmds: ~p\n", + [ History + , State + , Result + , proper_statem:command_names(Cmds) + ]), + proper:aggregate( proper_statem:command_names(Cmds) + , Result =:= ok + ) + ) + end + ). + +%%============================================================================== +%% Include file with setup, cleanup, initial_state +%% and state transitions callbacks +%%============================================================================== +-include("{{classname}}_statem.hrl"). diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/test.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/test.mustache new file mode 100644 index 00000000000..ac2d2330b30 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/test.mustache @@ -0,0 +1,7 @@ +-module(prop_{{packageName}}). + +-export([prop_test/0]). + +prop_test() -> + {ok, _} = application:ensure_all_started({{packageName}}), + {{packageName}}_statem:prop_main(). diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/utils.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/utils.mustache new file mode 100644 index 00000000000..f8adf39c54b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/erlang-proper/utils.mustache @@ -0,0 +1,66 @@ +-module({{packageName}}_utils). + +-export([ request/2 + , request/4 + ]). + +-type response() :: #{ status := integer() + , headers := map() + , body := iolist() + }. + +-export_type([response/0]). + +-spec request(atom(), string()) -> response(). +request(Method, Url) -> + request(Method, Url, undefined, undefined). + +-spec request(atom(), iolist(), iolist(), string()) -> response(). +request(Method, Url0, Body, ContentType) -> + Url = binary_to_list(iolist_to_binary(Url0)), + Headers = headers(), + Request = case Body of + undefined -> {Url, Headers}; + _ -> {Url, Headers, ContentType, Body} + end, + HTTPOptions = [{autoredirect, true}], + Options = [], + %% Disable pipelining to avoid the socket getting closed during long runs + ok = httpc:set_options([ {max_keep_alive_length, 0} + , {max_pipeline_length, 0} + , {max_sessions, 0} + ]), + Result = httpc:request(Method, Request, HTTPOptions, Options), + {ok, {{=<% %>=}}{{_Ver, Status, _Phrase}, RespHeaders, RespBody}}<%={{ }}=%> = Result, + + Response = #{ status => Status + , headers => maps:from_list(RespHeaders) + , body => RespBody + }, + decode_body(Response). + +-spec headers() -> [{string(), string()}]. +headers() -> + [ {"Accept", "application/json"} + | basic_auth() + ]. + +-spec basic_auth() -> [{string(), string()}]. +basic_auth() -> + case application:get_env({{packageName}}, basic_auth, undefined) of + undefined -> []; + {Username, Password} -> + Credentials = base64:encode_to_string(Username ++ ":" ++ Password), + [{"Authorization", "Basic " ++ Credentials}] + end. + +-spec decode_body(response()) -> response(). +decode_body(#{ headers := #{"content-type" := "application/json"} + , body := Body + } = Response) -> + Json = jsx:decode( unicode:characters_to_binary(Body) + , [return_maps, {labels, atom}] + ), + Response#{body_json => Json}; +decode_body(Response) -> + Response. diff --git a/modules/openapi-generator/src/main/resources/flaskConnexion/model.mustache b/modules/openapi-generator/src/main/resources/flaskConnexion/model.mustache index 821eaa3a780..2e7269a978b 100644 --- a/modules/openapi-generator/src/main/resources/flaskConnexion/model.mustache +++ b/modules/openapi-generator/src/main/resources/flaskConnexion/model.mustache @@ -136,7 +136,7 @@ class {{classname}}(Model): raise ValueError("Invalid value for `{{name}}`, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}`{{minimum}}`") # noqa: E501 {{/minimum}} {{#pattern}} - if {{name}} is not None and not re.search('{{{vendorExtensions.x-regex}}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 + if {{name}} is not None and not re.search(r'{{{vendorExtensions.x-regex}}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 raise ValueError("Invalid value for `{{name}}`, must be a follow pattern or equal to `{{{pattern}}}`") # noqa: E501 {{/pattern}} {{#maxItems}} diff --git a/modules/openapi-generator/src/main/resources/flaskConnexion/requirements.mustache b/modules/openapi-generator/src/main/resources/flaskConnexion/requirements.mustache index 3f4f2a782d1..2a194f98782 100644 --- a/modules/openapi-generator/src/main/resources/flaskConnexion/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/flaskConnexion/requirements.mustache @@ -1,4 +1,4 @@ -connexion == 2.0.0rc3 +connexion == 2.0.0 swagger-ui-bundle == 0.0.2 python_dateutil == 2.6.0 {{#supportPython2}} diff --git a/modules/openapi-generator/src/main/resources/flaskConnexion/setup.mustache b/modules/openapi-generator/src/main/resources/flaskConnexion/setup.mustache index 57a047e7bb0..ef4c3bd3c0a 100644 --- a/modules/openapi-generator/src/main/resources/flaskConnexion/setup.mustache +++ b/modules/openapi-generator/src/main/resources/flaskConnexion/setup.mustache @@ -13,7 +13,12 @@ VERSION = "{{packageVersion}}" # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = ["connexion"] +REQUIRES = [ + "connexion==2.0.0", + "swagger-ui-bundle==0.0.2", + "python_dateutil==2.6.0"{{#supportPython2}}, + "typing==3.5.2.2"{{/supportPython2}} +] setup( name=NAME, diff --git a/modules/openapi-generator/src/main/resources/php/api.mustache b/modules/openapi-generator/src/main/resources/php/api.mustache index 4f1fc87045e..9329db910b7 100644 --- a/modules/openapi-generator/src/main/resources/php/api.mustache +++ b/modules/openapi-generator/src/main/resources/php/api.mustache @@ -89,6 +89,10 @@ use {{invokerPackage}}\ObjectSerializer; * {{.}} * {{/description}} +{{#vendorExtensions.x-group-parameters}} + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * +{{/vendorExtensions.x-group-parameters}} {{#allParams}} * @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} @@ -97,9 +101,9 @@ use {{invokerPackage}}\ObjectSerializer; * @throws \InvalidArgumentException * @return {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}void{{/returnType}} */ - public function {{operationId}}({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public function {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { - {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} return $response;{{/returnType}} } @@ -114,6 +118,10 @@ use {{invokerPackage}}\ObjectSerializer; * {{.}} * {{/description}} +{{#vendorExtensions.x-group-parameters}} + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * +{{/vendorExtensions.x-group-parameters}} {{#allParams}} * @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} @@ -122,9 +130,9 @@ use {{invokerPackage}}\ObjectSerializer; * @throws \InvalidArgumentException * @return array of {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings) */ - public function {{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public function {{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { - $request = $this->{{operationId}}Request({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}{{#allParams}}$associative_array['{{paramName}}']{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}); try { $options = $this->createHttpClientOption(); @@ -226,6 +234,10 @@ use {{invokerPackage}}\ObjectSerializer; * {{.}} * {{/description}} +{{#vendorExtensions.x-group-parameters}} + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * +{{/vendorExtensions.x-group-parameters}} {{#allParams}} * @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} @@ -233,9 +245,9 @@ use {{invokerPackage}}\ObjectSerializer; * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function {{operationId}}Async({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public function {{operationId}}Async({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { - return $this->{{operationId}}AsyncWithHttpInfo({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + return $this->{{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) ->then( function ($response) { return $response[0]; @@ -252,6 +264,10 @@ use {{invokerPackage}}\ObjectSerializer; * {{.}} * {{/description}} +{{#vendorExtensions.x-group-parameters}} + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * +{{/vendorExtensions.x-group-parameters}} {{#allParams}} * @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} @@ -259,10 +275,10 @@ use {{invokerPackage}}\ObjectSerializer; * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function {{operationId}}AsyncWithHttpInfo({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public function {{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { $returnType = '{{returnType}}'; - $request = $this->{{operationId}}Request({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -306,6 +322,10 @@ use {{invokerPackage}}\ObjectSerializer; /** * Create request for operation '{{{operationId}}}' * +{{#vendorExtensions.x-group-parameters}} + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * +{{/vendorExtensions.x-group-parameters}} {{#allParams}} * @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} @@ -313,8 +333,15 @@ use {{invokerPackage}}\ObjectSerializer; * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function {{operationId}}Request({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + protected function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { + {{#vendorExtensions.x-group-parameters}} + // unbox the parameters from the associative array + {{#allParams}} + ${{paramName}} = array_key_exists('{{paramName}}', $associative_array) ? $associative_array['{{paramName}}'] : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; + {{/allParams}} + + {{/vendorExtensions.x-group-parameters}} {{#allParams}} {{#required}} // verify the required parameter '{{paramName}}' is set diff --git a/modules/openapi-generator/src/main/resources/php/api_doc.mustache b/modules/openapi-generator/src/main/resources/php/api_doc.mustache index 4118b83c30d..262fcb8f327 100644 --- a/modules/openapi-generator/src/main/resources/php/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/php/api_doc.mustache @@ -21,31 +21,45 @@ Method | HTTP request | Description ```php setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); -{{/isBasic}}{{#isApiKey}} +{{/isBasic}} +{{#isApiKey}} // Configure API key authorization: {{{name}}} $config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKey('{{{keyParamName}}}', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKeyPrefix('{{{keyParamName}}}', 'Bearer');{{/isApiKey}}{{#isOAuth}} +// $config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKeyPrefix('{{{keyParamName}}}', 'Bearer'); +{{/isApiKey}} +{{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} -$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');{{/isOAuth}}{{/authMethods}} -{{/hasAuthMethods}} +$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +{{/isOAuth}} +{{/authMethods}} +{{/hasAuthMethods}} $apiInstance = new {{invokerPackage}}\Api\{{classname}}( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(){{#hasAuthMethods}}, $config{{/hasAuthMethods}} ); +{{^vendorExtensions.x-group-parameters}} {{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +{{#allParams}}$associate_array['{{paramName}}'] = {{{example}}}; // {{{dataType}}} | {{{description}}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} try { - {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associate_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} print_r($result);{{/returnType}} } catch (Exception $e) { echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; @@ -54,6 +68,10 @@ try { ``` ### Parameters +{{#vendorExtensions.x-group-parameters}} +Note: the input parameter is an associative array with the keys listed as the parameter name below. + +{{/vendorExtensions.x-group-parameters}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index cfdf88cf094..1109aaebdce 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -27,7 +27,7 @@ class {{classname}}(object): {{#operation}} def {{operationId}}(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501 - """{{#summary}}{{.}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 + """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 {{#notes}} {{{notes}}} # noqa: E501 @@ -58,7 +58,7 @@ class {{classname}}(object): return data def {{operationId}}_with_http_info(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501 - """{{#summary}}{{.}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 + """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 {{#notes}} {{{notes}}} # noqa: E501 @@ -130,7 +130,7 @@ class {{classname}}(object): raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}`{{minimum}}`") # noqa: E501 {{/minimum}} {{#pattern}} - if '{{paramName}}' in local_var_params and not re.search('{{{vendorExtensions.x-regex}}}', local_var_params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 + if '{{paramName}}' in local_var_params and not re.search(r'{{{vendorExtensions.x-regex}}}', local_var_params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must conform to the pattern `{{{pattern}}}`") # noqa: E501 {{/pattern}} {{#maxItems}} diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 659d267a2d6..b89911d51d2 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -40,6 +40,8 @@ class ApiClient(object): the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types @@ -53,14 +55,15 @@ class ApiClient(object): 'datetime': datetime.datetime, 'object': object, } + _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): + cookie=None, pool_threads=None): if configuration is None: configuration = Configuration() self.configuration = configuration + self.pool_threads = pool_threads - self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: @@ -70,8 +73,19 @@ class ApiClient(object): self.user_agent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' def __del__(self): - self.pool.close() - self.pool.join() + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + self._pool = ThreadPool(self.pool_threads) + return self._pool @property def user_agent(self): @@ -251,12 +265,12 @@ class ApiClient(object): if type(klass) == str: if klass.startswith('list['): - sub_kls = re.match('list\[(.*)\]', klass).group(1) + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('dict('): - sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} diff --git a/modules/openapi-generator/src/main/resources/python/model.mustache b/modules/openapi-generator/src/main/resources/python/model.mustache index 2652a3090eb..cde5cb3718f 100644 --- a/modules/openapi-generator/src/main/resources/python/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/model.mustache @@ -153,8 +153,8 @@ class {{classname}}(object): raise ValueError("Invalid value for `{{name}}`, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}`{{minimum}}`") # noqa: E501 {{/minimum}} {{#pattern}} - if {{name}} is not None and not re.search('{{{vendorExtensions.x-regex}}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 - raise ValueError("Invalid value for `{{name}}`, must be a follow pattern or equal to `{{{pattern}}}`") # noqa: E501 + if {{name}} is not None and not re.search(r'{{{vendorExtensions.x-regex}}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501 + raise ValueError(r"Invalid value for `{{name}}`, must be a follow pattern or equal to `{{{pattern}}}`") # noqa: E501 {{/pattern}} {{#maxItems}} if {{name}} is not None and len({{name}}) > {{maxItems}}: diff --git a/modules/openapi-generator/src/main/resources/ruby-client/Gemfile.lock.mustache b/modules/openapi-generator/src/main/resources/ruby-client/Gemfile.lock.mustache index bb7eb9d3f79..6ba95d4e7a4 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/Gemfile.lock.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/Gemfile.lock.mustache @@ -13,7 +13,7 @@ GEM public_suffix (>= 2.0.2, < 4.0) autotest (4.4.6) ZenTest (>= 4.4.1) - autotest-fsevent (0.2.13) + autotest-fsevent (0.2.14) sys-uname autotest-growl (0.2.16) autotest-rails-pure (4.1.2) diff --git a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache index 5266610e43c..bf43a520c29 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache @@ -1,6 +1,6 @@ [package] name = "{{{packageName}}}" -version = "{{{appVersion}}}" +version = {{#packageVersion}}"{{{packageVersion}}}"{{/packageVersion}}{{^packageVersion}}"{{{appVersion}}}"{{/packageVersion}}{{! Fill in with packageVersion if defined, which can be passed via a command line argument, Else use appVersion from the Open API spec, which defaults to 1.0.0 if not present.}} authors = [{{#infoEmail}}"{{{infoEmail}}}"{{/infoEmail}}] {{#appDescription}} description = "{{{appDescription}}}" 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 23b832cfabf..55a115fff30 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 @@ -257,7 +257,7 @@ export class {{classname}} { {{#hasFormParams}} const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; {{#formParams}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java index 2d89be08cf8..9bb5e0f0464 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java @@ -271,4 +271,61 @@ public class RubyClientCodegenTest { // TODO comment out the following until https://github.com/swagger-api/swagger-parser/issues/820 is solved //Assert.assertTrue(status.isNullable); } + + @Test(description = "test example string imported from x-example parameterr (OAS2)") + public void exampleStringFromExampleParameterOAS2Test() { + final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/2_0/petstore-nullable.yaml", null, new ParseOptions()).getOpenAPI(); + final RubyClientCodegen codegen = new RubyClientCodegen(); + codegen.setModuleName("OnlinePetstore"); + final String path = "/store/order/{orderId}"; + + final Operation p = openAPI.getPaths().get(path).getDelete(); + final CodegenOperation op = codegen.fromOperation(path, "delete", p, openAPI.getComponents().getSchemas()); + + CodegenParameter pp = op.pathParams.get(0); + Assert.assertEquals(pp.example, "'orderid123'"); + } + + @Test(description = "test example string imported from example in schema (OAS3)") + public void exampleStringFromXExampleParameterOAS3Test() { + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore_oas3_test.yaml", null, new ParseOptions()).getOpenAPI(); + final RubyClientCodegen codegen = new RubyClientCodegen(); + codegen.setModuleName("OnlinePetstore"); + final String path = "/store/order/{orderId}"; + + final Operation p = openAPI.getPaths().get(path).getDelete(); + final CodegenOperation op = codegen.fromOperation(path, "delete", p, openAPI.getComponents().getSchemas()); + + CodegenParameter pp = op.pathParams.get(0); + Assert.assertEquals(pp.example, "'orderid123'"); + } + + /** + * We want to make sure that all Regex patterns: + * - Start with / so Ruby know this is a regex pattern + * - Have a second / that may be added to end if only 1 exists at start + * - If there are 2 / in pattern then don't add any more + */ + @Test(description = "test regex patterns") + public void exampleRegexParameterValidationOAS3Test() { + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/test_regex.yaml", null, new ParseOptions()).getOpenAPI(); + final RubyClientCodegen codegen = new RubyClientCodegen(); + final String path = "/ping"; + final Operation p = openAPI.getPaths().get(path).getGet(); + final CodegenOperation op = codegen.fromOperation(path, "get", p, openAPI.getComponents().getSchemas()); + // pattern_no_forward_slashes '^pattern$' + Assert.assertEquals(op.allParams.get(0).pattern, "/^pattern$/"); + // pattern_two_slashes '/^pattern$/i' + Assert.assertEquals(op.allParams.get(1).pattern, "/^pattern$/i"); + // pattern_one_slash_start '/^pattern$' + Assert.assertEquals(op.allParams.get(2).pattern, "/^pattern$/"); + // pattern_one_slash_end '^pattern$/' + Assert.assertEquals(op.allParams.get(3).pattern, "/^pattern$/"); + // pattern_one_slash_near_end '^pattern$/im' + Assert.assertEquals(op.allParams.get(4).pattern, "/^pattern$/im"); + // pattern_dont_escape_backslash '/^pattern\d{3}$/i' NOTE: the double \ is to escape \ in string but is read as single \ + Assert.assertEquals(op.allParams.get(5).pattern, "/^pattern\\d{3}$/i"); + } } diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-nullable.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-nullable.yaml index cff13ed73ce..f784c3e83f7 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-nullable.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-nullable.yaml @@ -361,6 +361,7 @@ paths: description: ID of the order that needs to be deleted required: true type: string + x-example: orderid123 responses: '400': description: Invalid ID supplied diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index 8315914ce14..4307bdc0eb5 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -792,6 +792,30 @@ paths: description: User not found security: - http_basic_test: [] + delete: + tags: + - fake + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: string_group + type: integer + in: query + description: String in group parameters + - name: boolean_group + type: boolean + in: header + description: Boolean in group parameters + - name: int64_group + type: integer + format: int64 + in: query + description: Integer in group parameters + responses: + '400': + description: Someting wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml b/modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml index 1aff69d888b..884c55e1113 100644 --- a/modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml @@ -1,7 +1,7 @@ swagger: '2.0' info: description: "This spec is for testing rust-server-specific things" - version: 1.0.0 + version: 2.3.4 title: rust-server-test schemes: - http @@ -12,6 +12,42 @@ paths: responses: '200': description: Success + put: + parameters: + - $ref: '#/parameters/nested_response' + responses: + '200': + description: Success + /html: + post: + summary: Test HTML handling + consumes: [text/html] + produces: [text/html] + parameters: + - in: body + name: body + required: true + schema: + type: string + responses: + 200: + description: Success + schema: + type: string +parameters: + nested_response: + name: nested_response + in: body + required: true + schema: + # Erroneously ends up as `Option` + properties: + id: + type: string + password: + type: string + required: + - id definitions: additionalPropertiesObject: description: An additionalPropertiesObject @@ -30,3 +66,31 @@ definitions: x-nullable: true required: - RequiredNullableThing + ObjectOfObjects: + description: An object of objects + type: object + properties: + inner: + type: object + required: + - required_thing + properties: + required_thing: + type: string + optional_thing: + type: integer + # Currently broken - see https://github.com/OpenAPITools/openapi-generator/issues/8 + # ArrayOfObjects: + # description: An array of objects + # type: array + # items: + # properties: + # filename: + # description: A non-required property + # type: string + # contents: + # description: A required property + # type: string + # required: + # - contents + # type: object 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 10f904b50ef..d60c17ddc3a 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 @@ -765,6 +765,33 @@ paths: - double - pattern_without_delimiter - byte + delete: + tags: + - fake + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: string_group + in: query + description: String in group parameters + schema: + type: integer + - name: boolean_group + in: header + description: Boolean in group parameters + schema: + type: boolean + - name: int64_group + in: query + description: Integer in group parameters + schema: + type: integer + format: int64 + responses: + '400': + description: Someting wrong /fake/outer/number: post: tags: @@ -911,7 +938,7 @@ paths: - $another-fake? summary: To test special tags description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags + operationId: '123_test_@#$%_special_tags' responses: '200': description: successful operation @@ -1311,6 +1338,14 @@ components: format: password maxLength: 64 minLength: 10 + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + type: string + pattern: '^\d{10}$' + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + type: string + pattern: '/^image_\d{1,3}$/i' EnumClass: type: string default: '-efg' diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore_oas3_test.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore_oas3_test.yaml index 370ae3ee32f..b6abd5c6aac 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore_oas3_test.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore_oas3_test.yaml @@ -360,6 +360,7 @@ paths: required: true schema: type: string + example: orderid123 responses: '400': description: Invalid ID supplied diff --git a/modules/openapi-generator/src/test/resources/3_0/test_regex.yaml b/modules/openapi-generator/src/test/resources/3_0/test_regex.yaml new file mode 100644 index 00000000000..af1ae8d3101 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/test_regex.yaml @@ -0,0 +1,51 @@ +openapi: 3.0.1 +info: + title: Test Regex generation for parameter validation + version: 1.0.0 +components: + headers: + + responses: + OK_200: + description: OK + +paths: + /ping: + get: + summary: Get Payment Information + description: Returns the content of a payment object + parameters: + - name: pattern_no_forward_slashes + in: header + schema: + type: string + pattern: '^pattern$' + - name: pattern_two_slashes + in: header + schema: + type: string + pattern: '/^pattern$/i' + - name: pattern_one_slash_start + in: header + schema: + type: string + pattern: '/^pattern$' + - name: pattern_one_slash_end + in: header + schema: + type: string + pattern: '^pattern$/' + - name: pattern_one_slash_near_end + in: header + schema: + type: string + pattern: '^pattern$/im' + - name: pattern_dont_escape_backslash + in: header + schema: + type: string + pattern: '/^pattern\d{3}$/i' + + responses: + '200': + $ref: "#/components/responses/OK_200" diff --git a/samples/client/petstore-security-test/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore-security-test/java/okhttp-gson/.openapi-generator/VERSION index f4cb97d56ce..a6527129083 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore-security-test/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.1-SNAPSHOT \ No newline at end of file +3.3.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java index de2793cbeef..79c97041076 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -79,7 +79,7 @@ public class ApiClient { private HttpLoggingInterceptor loggingInterceptor; /* - * Constructor for ApiClient + * Basic constructor for ApiClient */ public ApiClient() { init(); @@ -92,13 +92,23 @@ public class ApiClient { } /* - * Constructor for ApiClient to support access token retry on 401/403 + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID */ - public ApiClient( - String clientId, - String clientSecret, - Map parameters - ) { + public ApiClient(String clientId) { + this(clientId, null, null); + } + + /* + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID and additional parameters + */ + public ApiClient(String clientId, Map parameters) { + this(clientId, null, parameters); + } + + /* + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID, secret, and additional parameters + */ + public ApiClient(String clientId, String clientSecret, Map parameters) { init(); RetryingOAuth retryingOAuth = new RetryingOAuth("", clientId, OAuthFlow.implicit, clientSecret, parameters); diff --git a/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java index cb658432bb1..6d5ddd7c0b0 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -32,7 +32,7 @@ import java.io.IOException; public class ModelReturn { public static final String SERIALIZED_NAME_RETURN = "return"; @SerializedName(SERIALIZED_NAME_RETURN) - private Integer _return = null; + private Integer _return; public ModelReturn _return(Integer _return) { this._return = _return; diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 4395ff59232..e24c1f857e0 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -3.2.0-SNAPSHOT \ No newline at end of file +3.3.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION index f4cb97d56ce..6d94c9c2e12 100644 --- a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.1-SNAPSHOT \ No newline at end of file +3.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/ApiClient.cpp index 482cb6b51af..1a9ac7df1f1 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiClient.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -13,6 +13,18 @@ #include "MultipartFormData.h" #include "ModelBase.h" +#include +#include +#include + +template +utility::string_t toString(const T value) +{ + std::ostringstream out; + out << std::setprecision(std::numeric_limits::digits10) << std::fixed << value; + return out.str(); +} + namespace org { namespace openapitools { namespace client { @@ -57,12 +69,12 @@ utility::string_t ApiClient::parameterToString(int32_t value) utility::string_t ApiClient::parameterToString(float value) { - return utility::conversions::to_string_t(std::to_string(value)); + return utility::conversions::to_string_t(toString(value)); } utility::string_t ApiClient::parameterToString(double value) { - return utility::conversions::to_string_t(std::to_string(value)); + return utility::conversions::to_string_t(toString(value)); } utility::string_t ApiClient::parameterToString(const utility::datetime &value) diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.h b/samples/client/petstore/cpp-restsdk/ApiClient.h index afea008c5af..0ce3eeb4916 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/ApiClient.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp index e5418033e95..95a6c5fc1b9 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h index 583a4d42ba9..218c92b403f 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.cpp b/samples/client/petstore/cpp-restsdk/ApiException.cpp index b517975318d..f1eb81c2144 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiException.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.h b/samples/client/petstore/cpp-restsdk/ApiException.h index 28d298c1d33..4958f09ad74 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/ApiException.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/HttpContent.cpp index 64bb8809d5c..3f94dd84a97 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/HttpContent.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.h b/samples/client/petstore/cpp-restsdk/HttpContent.h index 3bab6732e5e..9cc76d8d114 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/HttpContent.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/IHttpBody.h b/samples/client/petstore/cpp-restsdk/IHttpBody.h index eea4bff9a22..c5e173490f7 100644 --- a/samples/client/petstore/cpp-restsdk/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/IHttpBody.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/JsonBody.cpp index bfe372de78d..276f83abbb2 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/JsonBody.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.h b/samples/client/petstore/cpp-restsdk/JsonBody.h index 1230f4e2d4a..ada2e9eb11b 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/JsonBody.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/ModelBase.cpp index ef2171033bd..8027f547dea 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/ModelBase.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -57,25 +57,25 @@ web::json::value ModelBase::toJson( std::shared_ptr content ) return value; } -std::shared_ptr ModelBase::fileFromJson(web::json::value& val) +std::shared_ptr ModelBase::fileFromJson(const web::json::value& val) { std::shared_ptr content(new HttpContent); if(val.has_field(utility::conversions::to_string_t("ContentDisposition"))) { - content->setContentDisposition( ModelBase::stringFromJson(val[utility::conversions::to_string_t("ContentDisposition")]) ); + content->setContentDisposition( ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("ContentDisposition"))) ); } if(val.has_field(utility::conversions::to_string_t("ContentType"))) { - content->setContentType( ModelBase::stringFromJson(val[utility::conversions::to_string_t("ContentType")]) ); + content->setContentType( ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("ContentType"))) ); } if(val.has_field(utility::conversions::to_string_t("FileName"))) { - content->setFileName( ModelBase::stringFromJson(val[utility::conversions::to_string_t("FileName")]) ); + content->setFileName( ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("FileName"))) ); } if(val.has_field(utility::conversions::to_string_t("InputStream"))) { - content->setData( ModelBase::fromBase64( ModelBase::stringFromJson(val[utility::conversions::to_string_t("InputStream")]) ) ); + content->setData( ModelBase::fromBase64( ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("InputStream")))) ); } return content; @@ -274,32 +274,32 @@ std::shared_ptr ModelBase::fromBase64( const utility::string_t& en return result; } -int64_t ModelBase::int64_tFromJson(web::json::value& val) +int64_t ModelBase::int64_tFromJson(const web::json::value& val) { return val.as_number().to_int64(); } -int32_t ModelBase::int32_tFromJson(web::json::value& val) +int32_t ModelBase::int32_tFromJson(const web::json::value& val) { return val.as_integer(); } -float ModelBase::floatFromJson(web::json::value& val) +float ModelBase::floatFromJson(const web::json::value& val) { return static_cast(val.as_double()); } -utility::string_t ModelBase::stringFromJson(web::json::value& val) +utility::string_t ModelBase::stringFromJson(const web::json::value& val) { return val.is_string() ? val.as_string() : utility::conversions::to_string_t(""); } -utility::datetime ModelBase::dateFromJson(web::json::value& val) +utility::datetime ModelBase::dateFromJson(const web::json::value& val) { return utility::datetime::from_string(val.as_string(), utility::datetime::ISO_8601); } -bool ModelBase::boolFromJson(web::json::value& val) +bool ModelBase::boolFromJson(const web::json::value& val) { return val.as_bool(); } -double ModelBase::doubleFromJson(web::json::value& val) +double ModelBase::doubleFromJson(const web::json::value& val) { return val.as_double(); } diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.h b/samples/client/petstore/cpp-restsdk/ModelBase.h index 6d7475178a0..430b2f73621 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/ModelBase.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -41,7 +41,7 @@ public: virtual void validate() = 0; virtual web::json::value toJson() const = 0; - virtual void fromJson(web::json::value& json) = 0; + virtual void fromJson(const web::json::value& json) = 0; virtual void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const = 0; virtual void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) = 0; @@ -57,14 +57,14 @@ public: template static web::json::value toJson(const std::vector& value); - static int64_t int64_tFromJson(web::json::value& val); - static int32_t int32_tFromJson(web::json::value& val); - static float floatFromJson(web::json::value& val); - static utility::string_t stringFromJson(web::json::value& val); - static utility::datetime dateFromJson(web::json::value& val); - static double doubleFromJson(web::json::value& val); - static bool boolFromJson(web::json::value& val); - static std::shared_ptr fileFromJson(web::json::value& val); + static int64_t int64_tFromJson(const web::json::value& val); + static int32_t int32_tFromJson(const web::json::value& val); + static float floatFromJson(const web::json::value& val); + static utility::string_t stringFromJson(const web::json::value& val); + static utility::datetime dateFromJson(const web::json::value& val); + static double doubleFromJson(const web::json::value& val); + static bool boolFromJson(const web::json::value& val); + static std::shared_ptr fileFromJson(const web::json::value& val); static std::shared_ptr toHttpContent( const utility::string_t& name, const utility::string_t& value, const utility::string_t& contentType = utility::conversions::to_string_t("")); static std::shared_ptr toHttpContent( const utility::string_t& name, const utility::datetime& value, const utility::string_t& contentType = utility::conversions::to_string_t("")); diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp index 4ff69df7857..af977862526 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/MultipartFormData.h index 034cc248125..3cc52c4990c 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/Object.cpp b/samples/client/petstore/cpp-restsdk/Object.cpp index f7e01f73424..ad213d11ad4 100644 --- a/samples/client/petstore/cpp-restsdk/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/Object.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -35,7 +35,7 @@ web::json::value Object::toJson() const return m_object; } -void Object::fromJson(web::json::value& val) +void Object::fromJson(const web::json::value& val) { if (val.is_object()) { diff --git a/samples/client/petstore/cpp-restsdk/Object.h b/samples/client/petstore/cpp-restsdk/Object.h index 848583cbb42..fe7c8669d50 100644 --- a/samples/client/petstore/cpp-restsdk/Object.h +++ b/samples/client/petstore/cpp-restsdk/Object.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -40,7 +40,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp index cbc094a1e9c..eb912354ea0 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.h b/samples/client/petstore/cpp-restsdk/api/PetApi.h index a4b37987816..b6c684e162a 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/api/PetApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -25,7 +25,7 @@ #include "HttpContent.h" #include "Pet.h" #include - +#include "../ModelBase.h" #include @@ -63,7 +63,7 @@ public: /// /// /// Pet id to delete - /// (optional, default to utility::conversions::to_string_t("")) + /// (optional) pplx::task deletePet( int64_t petId, boost::optional apiKey diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp index 6af51a562b4..55cfb7850e9 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/api/StoreApi.h index 3a2a1ac3b32..3fded80876d 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -24,7 +24,7 @@ #include "Order.h" #include #include - +#include "../ModelBase.h" #include diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp index 808f988a2eb..24376a87477 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.h b/samples/client/petstore/cpp-restsdk/api/UserApi.h index c0ea7d3b1f2..de94d75ff56 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/api/UserApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -24,7 +24,7 @@ #include "User.h" #include #include - +#include "../ModelBase.h" #include diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp index 72e188a8984..8160c7dcdc3 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -57,11 +57,11 @@ web::json::value ApiResponse::toJson() const return val; } -void ApiResponse::fromJson(web::json::value& val) +void ApiResponse::fromJson(const web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("code"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("code")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("code")); if(!fieldValue.is_null()) { setCode(ModelBase::int32_tFromJson(fieldValue)); @@ -69,7 +69,7 @@ void ApiResponse::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("type"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("type")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); if(!fieldValue.is_null()) { setType(ModelBase::stringFromJson(fieldValue)); @@ -77,7 +77,7 @@ void ApiResponse::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("message"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("message")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("message")); if(!fieldValue.is_null()) { setMessage(ModelBase::stringFromJson(fieldValue)); @@ -134,12 +134,12 @@ int32_t ApiResponse::getCode() const return m_Code; } - void ApiResponse::setCode(int32_t value) { m_Code = value; m_CodeIsSet = true; } + bool ApiResponse::codeIsSet() const { return m_CodeIsSet; @@ -155,12 +155,12 @@ utility::string_t ApiResponse::getType() const return m_Type; } - -void ApiResponse::setType(utility::string_t value) +void ApiResponse::setType(const utility::string_t& value) { m_Type = value; m_TypeIsSet = true; } + bool ApiResponse::typeIsSet() const { return m_TypeIsSet; @@ -176,12 +176,12 @@ utility::string_t ApiResponse::getMessage() const return m_Message; } - -void ApiResponse::setMessage(utility::string_t value) +void ApiResponse::setMessage(const utility::string_t& value) { m_Message = value; m_MessageIsSet = true; } + bool ApiResponse::messageIsSet() const { return m_MessageIsSet; diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h index 422091ab1f7..26aa0ae30b6 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -44,7 +44,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; @@ -58,21 +58,27 @@ public: int32_t getCode() const; bool codeIsSet() const; void unsetCode(); + void setCode(int32_t value); + /// /// /// utility::string_t getType() const; bool typeIsSet() const; void unsetType(); - void setType(utility::string_t value); + + void setType(const utility::string_t& value); + /// /// /// utility::string_t getMessage() const; bool messageIsSet() const; void unsetMessage(); - void setMessage(utility::string_t value); + + void setMessage(const utility::string_t& value); + protected: int32_t m_Code; diff --git a/samples/client/petstore/cpp-restsdk/model/Category.cpp b/samples/client/petstore/cpp-restsdk/model/Category.cpp index e8b48e94269..8b74c5bb591 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Category.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -51,11 +51,11 @@ web::json::value Category::toJson() const return val; } -void Category::fromJson(web::json::value& val) +void Category::fromJson(const web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("id")); if(!fieldValue.is_null()) { setId(ModelBase::int64_tFromJson(fieldValue)); @@ -63,7 +63,7 @@ void Category::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("name"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("name")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("name")); if(!fieldValue.is_null()) { setName(ModelBase::stringFromJson(fieldValue)); @@ -112,12 +112,12 @@ int64_t Category::getId() const return m_Id; } - void Category::setId(int64_t value) { m_Id = value; m_IdIsSet = true; } + bool Category::idIsSet() const { return m_IdIsSet; @@ -133,12 +133,12 @@ utility::string_t Category::getName() const return m_Name; } - -void Category::setName(utility::string_t value) +void Category::setName(const utility::string_t& value) { m_Name = value; m_NameIsSet = true; } + bool Category::nameIsSet() const { return m_NameIsSet; diff --git a/samples/client/petstore/cpp-restsdk/model/Category.h b/samples/client/petstore/cpp-restsdk/model/Category.h index e4f9b7bbf59..a6fc63beaec 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/model/Category.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -44,7 +44,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; @@ -58,14 +58,18 @@ public: int64_t getId() const; bool idIsSet() const; void unsetId(); + void setId(int64_t value); + /// /// /// utility::string_t getName() const; bool nameIsSet() const; void unsetName(); - void setName(utility::string_t value); + + void setName(const utility::string_t& value); + protected: int64_t m_Id; diff --git a/samples/client/petstore/cpp-restsdk/model/Order.cpp b/samples/client/petstore/cpp-restsdk/model/Order.cpp index aa39a3ada03..60952756058 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Order.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -75,11 +75,11 @@ web::json::value Order::toJson() const return val; } -void Order::fromJson(web::json::value& val) +void Order::fromJson(const web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("id")); if(!fieldValue.is_null()) { setId(ModelBase::int64_tFromJson(fieldValue)); @@ -87,7 +87,7 @@ void Order::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("petId"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("petId")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("petId")); if(!fieldValue.is_null()) { setPetId(ModelBase::int64_tFromJson(fieldValue)); @@ -95,7 +95,7 @@ void Order::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("quantity"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("quantity")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("quantity")); if(!fieldValue.is_null()) { setQuantity(ModelBase::int32_tFromJson(fieldValue)); @@ -103,7 +103,7 @@ void Order::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("shipDate"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("shipDate")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("shipDate")); if(!fieldValue.is_null()) { setShipDate(ModelBase::dateFromJson(fieldValue)); @@ -111,7 +111,7 @@ void Order::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("status"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("status")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("status")); if(!fieldValue.is_null()) { setStatus(ModelBase::stringFromJson(fieldValue)); @@ -119,7 +119,7 @@ void Order::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("complete"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("complete")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("complete")); if(!fieldValue.is_null()) { setComplete(ModelBase::boolFromJson(fieldValue)); @@ -200,12 +200,12 @@ int64_t Order::getId() const return m_Id; } - void Order::setId(int64_t value) { m_Id = value; m_IdIsSet = true; } + bool Order::idIsSet() const { return m_IdIsSet; @@ -221,12 +221,12 @@ int64_t Order::getPetId() const return m_PetId; } - void Order::setPetId(int64_t value) { m_PetId = value; m_PetIdIsSet = true; } + bool Order::petIdIsSet() const { return m_PetIdIsSet; @@ -242,12 +242,12 @@ int32_t Order::getQuantity() const return m_Quantity; } - void Order::setQuantity(int32_t value) { m_Quantity = value; m_QuantityIsSet = true; } + bool Order::quantityIsSet() const { return m_QuantityIsSet; @@ -263,12 +263,12 @@ utility::datetime Order::getShipDate() const return m_ShipDate; } - -void Order::setShipDate(utility::datetime value) +void Order::setShipDate(const utility::datetime& value) { m_ShipDate = value; m_ShipDateIsSet = true; } + bool Order::shipDateIsSet() const { return m_ShipDateIsSet; @@ -284,12 +284,12 @@ utility::string_t Order::getStatus() const return m_Status; } - -void Order::setStatus(utility::string_t value) +void Order::setStatus(const utility::string_t& value) { m_Status = value; m_StatusIsSet = true; } + bool Order::statusIsSet() const { return m_StatusIsSet; @@ -305,12 +305,12 @@ bool Order::isComplete() const return m_Complete; } - void Order::setComplete(bool value) { m_Complete = value; m_CompleteIsSet = true; } + bool Order::completeIsSet() const { return m_CompleteIsSet; diff --git a/samples/client/petstore/cpp-restsdk/model/Order.h b/samples/client/petstore/cpp-restsdk/model/Order.h index 716cd3edb6f..b679d1eb127 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/model/Order.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -44,7 +44,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; @@ -58,43 +58,55 @@ public: int64_t getId() const; bool idIsSet() const; void unsetId(); + void setId(int64_t value); + /// /// /// int64_t getPetId() const; bool petIdIsSet() const; void unsetPetId(); + void setPetId(int64_t value); + /// /// /// int32_t getQuantity() const; bool quantityIsSet() const; void unsetQuantity(); + void setQuantity(int32_t value); + /// /// /// utility::datetime getShipDate() const; bool shipDateIsSet() const; void unsetShipDate(); - void setShipDate(utility::datetime value); + + void setShipDate(const utility::datetime& value); + /// /// Order Status /// utility::string_t getStatus() const; bool statusIsSet() const; void unsetStatus(); - void setStatus(utility::string_t value); + + void setStatus(const utility::string_t& value); + /// /// /// bool isComplete() const; bool completeIsSet() const; void unsetComplete(); + void setComplete(bool value); + protected: int64_t m_Id; bool m_IdIsSet; diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/model/Pet.cpp index 8d37d3fd330..47e262d79df 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Pet.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -78,11 +78,11 @@ web::json::value Pet::toJson() const return val; } -void Pet::fromJson(web::json::value& val) +void Pet::fromJson(const web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("id")); if(!fieldValue.is_null()) { setId(ModelBase::int64_tFromJson(fieldValue)); @@ -90,7 +90,7 @@ void Pet::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("category"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("category")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category")); if(!fieldValue.is_null()) { std::shared_ptr newItem(new Category()); @@ -98,11 +98,11 @@ void Pet::fromJson(web::json::value& val) setCategory( newItem ); } } - setName(ModelBase::stringFromJson(val[utility::conversions::to_string_t("name")])); + setName(ModelBase::stringFromJson(val.at(utility::conversions::to_string_t("name")))); { m_PhotoUrls.clear(); std::vector jsonArray; - for( auto& item : val[utility::conversions::to_string_t("photoUrls")].as_array() ) + for( auto& item : val.at(utility::conversions::to_string_t("photoUrls")).as_array() ) { m_PhotoUrls.push_back(ModelBase::stringFromJson(item)); } @@ -112,7 +112,7 @@ void Pet::fromJson(web::json::value& val) std::vector jsonArray; if(val.has_field(utility::conversions::to_string_t("tags"))) { - for( auto& item : val[utility::conversions::to_string_t("tags")].as_array() ) + for( auto& item : val.at(utility::conversions::to_string_t("tags")).as_array() ) { if(item.is_null()) { @@ -129,7 +129,7 @@ void Pet::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("status"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("status")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("status")); if(!fieldValue.is_null()) { setStatus(ModelBase::stringFromJson(fieldValue)); @@ -246,12 +246,12 @@ int64_t Pet::getId() const return m_Id; } - void Pet::setId(int64_t value) { m_Id = value; m_IdIsSet = true; } + bool Pet::idIsSet() const { return m_IdIsSet; @@ -267,12 +267,12 @@ std::shared_ptr Pet::getCategory() const return m_Category; } - -void Pet::setCategory(std::shared_ptr value) +void Pet::setCategory(const std::shared_ptr& value) { m_Category = value; m_CategoryIsSet = true; } + bool Pet::categoryIsSet() const { return m_CategoryIsSet; @@ -288,32 +288,34 @@ utility::string_t Pet::getName() const return m_Name; } - -void Pet::setName(utility::string_t value) +void Pet::setName(const utility::string_t& value) { m_Name = value; } + std::vector& Pet::getPhotoUrls() { return m_PhotoUrls; } -void Pet::setPhotoUrls(std::vector value) +void Pet::setPhotoUrls(const std::vector& value) { m_PhotoUrls = value; } + std::vector>& Pet::getTags() { return m_Tags; } -void Pet::setTags(std::vector> value) +void Pet::setTags(const std::vector>& value) { m_Tags = value; m_TagsIsSet = true; } + bool Pet::tagsIsSet() const { return m_TagsIsSet; @@ -329,12 +331,12 @@ utility::string_t Pet::getStatus() const return m_Status; } - -void Pet::setStatus(utility::string_t value) +void Pet::setStatus(const utility::string_t& value) { m_Status = value; m_StatusIsSet = true; } + bool Pet::statusIsSet() const { return m_StatusIsSet; diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.h b/samples/client/petstore/cpp-restsdk/model/Pet.h index d5f9293a3ff..7a932c2ad91 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/model/Pet.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -47,7 +47,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; @@ -61,38 +61,50 @@ public: int64_t getId() const; bool idIsSet() const; void unsetId(); + void setId(int64_t value); + /// /// /// std::shared_ptr getCategory() const; bool categoryIsSet() const; void unsetCategory(); - void setCategory(std::shared_ptr value); + + void setCategory(const std::shared_ptr& value); + /// /// /// utility::string_t getName() const; - void setName(utility::string_t value); + + void setName(const utility::string_t& value); + /// /// /// std::vector& getPhotoUrls(); - void setPhotoUrls(std::vector value); + + void setPhotoUrls(const std::vector& value); + /// /// /// std::vector>& getTags(); bool tagsIsSet() const; void unsetTags(); - void setTags(std::vector> value); + + void setTags(const std::vector>& value); + /// /// pet status in the store /// utility::string_t getStatus() const; bool statusIsSet() const; void unsetStatus(); - void setStatus(utility::string_t value); + + void setStatus(const utility::string_t& value); + protected: int64_t m_Id; diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/model/Tag.cpp index a2edf655290..3e19f14a9e6 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Tag.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -51,11 +51,11 @@ web::json::value Tag::toJson() const return val; } -void Tag::fromJson(web::json::value& val) +void Tag::fromJson(const web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("id")); if(!fieldValue.is_null()) { setId(ModelBase::int64_tFromJson(fieldValue)); @@ -63,7 +63,7 @@ void Tag::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("name"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("name")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("name")); if(!fieldValue.is_null()) { setName(ModelBase::stringFromJson(fieldValue)); @@ -112,12 +112,12 @@ int64_t Tag::getId() const return m_Id; } - void Tag::setId(int64_t value) { m_Id = value; m_IdIsSet = true; } + bool Tag::idIsSet() const { return m_IdIsSet; @@ -133,12 +133,12 @@ utility::string_t Tag::getName() const return m_Name; } - -void Tag::setName(utility::string_t value) +void Tag::setName(const utility::string_t& value) { m_Name = value; m_NameIsSet = true; } + bool Tag::nameIsSet() const { return m_NameIsSet; diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.h b/samples/client/petstore/cpp-restsdk/model/Tag.h index 4213e328479..e290b90b94b 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/model/Tag.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -44,7 +44,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; @@ -58,14 +58,18 @@ public: int64_t getId() const; bool idIsSet() const; void unsetId(); + void setId(int64_t value); + /// /// /// utility::string_t getName() const; bool nameIsSet() const; void unsetName(); - void setName(utility::string_t value); + + void setName(const utility::string_t& value); + protected: int64_t m_Id; diff --git a/samples/client/petstore/cpp-restsdk/model/User.cpp b/samples/client/petstore/cpp-restsdk/model/User.cpp index cf72b9e02e9..72e65d89fe3 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/model/User.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -87,11 +87,11 @@ web::json::value User::toJson() const return val; } -void User::fromJson(web::json::value& val) +void User::fromJson(const web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("id")); if(!fieldValue.is_null()) { setId(ModelBase::int64_tFromJson(fieldValue)); @@ -99,7 +99,7 @@ void User::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("username"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("username")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("username")); if(!fieldValue.is_null()) { setUsername(ModelBase::stringFromJson(fieldValue)); @@ -107,7 +107,7 @@ void User::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("firstName"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("firstName")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("firstName")); if(!fieldValue.is_null()) { setFirstName(ModelBase::stringFromJson(fieldValue)); @@ -115,7 +115,7 @@ void User::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("lastName"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("lastName")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("lastName")); if(!fieldValue.is_null()) { setLastName(ModelBase::stringFromJson(fieldValue)); @@ -123,7 +123,7 @@ void User::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("email"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("email")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("email")); if(!fieldValue.is_null()) { setEmail(ModelBase::stringFromJson(fieldValue)); @@ -131,7 +131,7 @@ void User::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("password"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("password")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("password")); if(!fieldValue.is_null()) { setPassword(ModelBase::stringFromJson(fieldValue)); @@ -139,7 +139,7 @@ void User::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("phone"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("phone")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("phone")); if(!fieldValue.is_null()) { setPhone(ModelBase::stringFromJson(fieldValue)); @@ -147,7 +147,7 @@ void User::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("userStatus"))) { - web::json::value& fieldValue = val[utility::conversions::to_string_t("userStatus")]; + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("userStatus")); if(!fieldValue.is_null()) { setUserStatus(ModelBase::int32_tFromJson(fieldValue)); @@ -244,12 +244,12 @@ int64_t User::getId() const return m_Id; } - void User::setId(int64_t value) { m_Id = value; m_IdIsSet = true; } + bool User::idIsSet() const { return m_IdIsSet; @@ -265,12 +265,12 @@ utility::string_t User::getUsername() const return m_Username; } - -void User::setUsername(utility::string_t value) +void User::setUsername(const utility::string_t& value) { m_Username = value; m_UsernameIsSet = true; } + bool User::usernameIsSet() const { return m_UsernameIsSet; @@ -286,12 +286,12 @@ utility::string_t User::getFirstName() const return m_FirstName; } - -void User::setFirstName(utility::string_t value) +void User::setFirstName(const utility::string_t& value) { m_FirstName = value; m_FirstNameIsSet = true; } + bool User::firstNameIsSet() const { return m_FirstNameIsSet; @@ -307,12 +307,12 @@ utility::string_t User::getLastName() const return m_LastName; } - -void User::setLastName(utility::string_t value) +void User::setLastName(const utility::string_t& value) { m_LastName = value; m_LastNameIsSet = true; } + bool User::lastNameIsSet() const { return m_LastNameIsSet; @@ -328,12 +328,12 @@ utility::string_t User::getEmail() const return m_Email; } - -void User::setEmail(utility::string_t value) +void User::setEmail(const utility::string_t& value) { m_Email = value; m_EmailIsSet = true; } + bool User::emailIsSet() const { return m_EmailIsSet; @@ -349,12 +349,12 @@ utility::string_t User::getPassword() const return m_Password; } - -void User::setPassword(utility::string_t value) +void User::setPassword(const utility::string_t& value) { m_Password = value; m_PasswordIsSet = true; } + bool User::passwordIsSet() const { return m_PasswordIsSet; @@ -370,12 +370,12 @@ utility::string_t User::getPhone() const return m_Phone; } - -void User::setPhone(utility::string_t value) +void User::setPhone(const utility::string_t& value) { m_Phone = value; m_PhoneIsSet = true; } + bool User::phoneIsSet() const { return m_PhoneIsSet; @@ -391,12 +391,12 @@ int32_t User::getUserStatus() const return m_UserStatus; } - void User::setUserStatus(int32_t value) { m_UserStatus = value; m_UserStatusIsSet = true; } + bool User::userStatusIsSet() const { return m_UserStatusIsSet; diff --git a/samples/client/petstore/cpp-restsdk/model/User.h b/samples/client/petstore/cpp-restsdk/model/User.h index ed18d117ced..30f78e134a4 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.h +++ b/samples/client/petstore/cpp-restsdk/model/User.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.3.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.3.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -44,7 +44,7 @@ public: void validate() override; web::json::value toJson() const override; - void fromJson(web::json::value& json) override; + void fromJson(const web::json::value& json) override; void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; @@ -58,57 +58,73 @@ public: int64_t getId() const; bool idIsSet() const; void unsetId(); + void setId(int64_t value); + /// /// /// utility::string_t getUsername() const; bool usernameIsSet() const; void unsetUsername(); - void setUsername(utility::string_t value); + + void setUsername(const utility::string_t& value); + /// /// /// utility::string_t getFirstName() const; bool firstNameIsSet() const; void unsetFirstName(); - void setFirstName(utility::string_t value); + + void setFirstName(const utility::string_t& value); + /// /// /// utility::string_t getLastName() const; bool lastNameIsSet() const; void unsetLastName(); - void setLastName(utility::string_t value); + + void setLastName(const utility::string_t& value); + /// /// /// utility::string_t getEmail() const; bool emailIsSet() const; void unsetEmail(); - void setEmail(utility::string_t value); + + void setEmail(const utility::string_t& value); + /// /// /// utility::string_t getPassword() const; bool passwordIsSet() const; void unsetPassword(); - void setPassword(utility::string_t value); + + void setPassword(const utility::string_t& value); + /// /// /// utility::string_t getPhone() const; bool phoneIsSet() const; void unsetPhone(); - void setPhone(utility::string_t value); + + void setPhone(const utility::string_t& value); + /// /// User Status /// int32_t getUserStatus() const; bool userStatusIsSet() const; void unsetUserStatus(); + void setUserStatus(int32_t value); + protected: int64_t m_Id; bool m_IdIsSet; diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md index a2b8a9b17a0..aabf26b7899 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient/README.md @@ -106,6 +106,7 @@ Class | Method | HTTP request | Description *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 diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index d51d29c09a6..d9f2c5dc7f3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -600,6 +601,70 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **TestGroupParameters** +> void TestGroupParameters (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestGroupParametersExample + { + public void main() + { + var apiInstance = new FakeApi(); + var stringGroup = 56; // int? | String in group parameters (optional) + var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var int64Group = 789; // long? | Integer in group parameters (optional) + + try + { + // Fake endpoint to test group parameters (optional) + apiInstance.TestGroupParameters(stringGroup, booleanGroup, int64Group); + } + catch (Exception e) + { + Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stringGroup** | **int?**| String in group parameters | [optional] + **booleanGroup** | **bool?**| Boolean in group parameters | [optional] + **int64Group** | **long?**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **TestInlineAdditionalProperties** > void TestInlineAdditionalProperties (Dictionary requestBody) diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index 6d0928a226a..283b7db9dc2 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -256,6 +256,31 @@ namespace Org.OpenAPITools.Api /// ApiResponse of Object(void) ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// + void TestGroupParameters (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + + /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// ApiResponse of Object(void) + ApiResponse TestGroupParametersWithHttpInfo (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + /// /// test inline additionalProperties /// /// @@ -533,6 +558,31 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse System.Threading.Tasks.Task> TestEnumParametersAsyncWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null); /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// Task of void + System.Threading.Tasks.Task TestGroupParametersAsync (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + + /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + /// /// test inline additionalProperties /// /// @@ -2108,6 +2158,141 @@ namespace Org.OpenAPITools.Api null); } + /// + /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// + public void TestGroupParameters (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + { + TestGroupParametersWithHttpInfo(stringGroup, booleanGroup, int64Group); + } + + /// + /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// ApiResponse of Object(void) + public ApiResponse TestGroupParametersWithHttpInfo (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + { + + var localVarPath = "/fake"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter + if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter + if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// Task of void + public async System.Threading.Tasks.Task TestGroupParametersAsync (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + { + await TestGroupParametersAsyncWithHttpInfo(stringGroup, booleanGroup, int64Group); + + } + + /// + /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + { + + var localVarPath = "/fake"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter + if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter + if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter + + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + /// /// test inline additionalProperties /// diff --git a/samples/client/petstore/erlang-proper/.openapi-generator-ignore b/samples/client/petstore/erlang-proper/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/client/petstore/erlang-proper/.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/erlang-proper/.openapi-generator/VERSION b/samples/client/petstore/erlang-proper/.openapi-generator/VERSION new file mode 100644 index 00000000000..6d94c9c2e12 --- /dev/null +++ b/samples/client/petstore/erlang-proper/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/erlang-proper/README.md b/samples/client/petstore/erlang-proper/README.md new file mode 100644 index 00000000000..cc63f05bdc5 --- /dev/null +++ b/samples/client/petstore/erlang-proper/README.md @@ -0,0 +1,6 @@ +# OpenAPI client library for Erlang with Erlang QuickCheck generators + +## Overview + +An Erlang client stub and Erlang QuickCheck generators, generated by +[OpenAPI Generator](https://openapi-generator.tech) given an OpenAPI spec. diff --git a/samples/client/petstore/erlang-proper/rebar.config b/samples/client/petstore/erlang-proper/rebar.config new file mode 100644 index 00000000000..0060c9afec5 --- /dev/null +++ b/samples/client/petstore/erlang-proper/rebar.config @@ -0,0 +1,7 @@ +{erl_opts, [debug_info, warnings_as_errors]}. + +{deps, [{jsx, "2.9.0"}, {proper, "1.3.0"}]}. + +{shell, [{apps, [petstore]}]}. + +{plugins, [rebar3_proper]}. diff --git a/samples/client/petstore/erlang-proper/src/model/petstore_api_response.erl b/samples/client/petstore/erlang-proper/src/model/petstore_api_response.erl new file mode 100644 index 00000000000..495861559a8 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/model/petstore_api_response.erl @@ -0,0 +1,19 @@ +-module(petstore_api_response). + +-include("petstore.hrl"). + +-export([petstore_api_response/0]). + +-export_type([petstore_api_response/0]). + +-type petstore_api_response() :: + [ {'code', integer() } + | {'type', binary() } + | {'message', binary() } + ]. + +petstore_api_response() -> + [ {'code', integer() } + , {'type', binary() } + , {'message', binary() } + ]. diff --git a/samples/client/petstore/erlang-proper/src/model/petstore_category.erl b/samples/client/petstore/erlang-proper/src/model/petstore_category.erl new file mode 100644 index 00000000000..d048667c354 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/model/petstore_category.erl @@ -0,0 +1,17 @@ +-module(petstore_category). + +-include("petstore.hrl"). + +-export([petstore_category/0]). + +-export_type([petstore_category/0]). + +-type petstore_category() :: + [ {'id', integer() } + | {'name', binary() } + ]. + +petstore_category() -> + [ {'id', integer() } + , {'name', binary() } + ]. diff --git a/samples/client/petstore/erlang-proper/src/model/petstore_order.erl b/samples/client/petstore/erlang-proper/src/model/petstore_order.erl new file mode 100644 index 00000000000..360e5cf4287 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/model/petstore_order.erl @@ -0,0 +1,25 @@ +-module(petstore_order). + +-include("petstore.hrl"). + +-export([petstore_order/0]). + +-export_type([petstore_order/0]). + +-type petstore_order() :: + [ {'id', integer() } + | {'petId', integer() } + | {'quantity', integer() } + | {'shipDate', datetime() } + | {'status', binary() } + | {'complete', boolean() } + ]. + +petstore_order() -> + [ {'id', integer() } + , {'petId', integer() } + , {'quantity', integer() } + , {'shipDate', datetime() } + , {'status', elements([<<"placed">>, <<"approved">>, <<"delivered">>]) } + , {'complete', boolean() } + ]. diff --git a/samples/client/petstore/erlang-proper/src/model/petstore_pet.erl b/samples/client/petstore/erlang-proper/src/model/petstore_pet.erl new file mode 100644 index 00000000000..77bbd704fef --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/model/petstore_pet.erl @@ -0,0 +1,25 @@ +-module(petstore_pet). + +-include("petstore.hrl"). + +-export([petstore_pet/0]). + +-export_type([petstore_pet/0]). + +-type petstore_pet() :: + [ {'id', integer() } + | {'category', petstore_category:petstore_category() } + | {'name', binary() } + | {'photoUrls', list(binary()) } + | {'tags', list(petstore_tag:petstore_tag()) } + | {'status', binary() } + ]. + +petstore_pet() -> + [ {'id', integer() } + , {'category', petstore_category:petstore_category() } + , {'name', binary() } + , {'photoUrls', list(binary()) } + , {'tags', list(petstore_tag:petstore_tag()) } + , {'status', elements([<<"available">>, <<"pending">>, <<"sold">>]) } + ]. diff --git a/samples/client/petstore/erlang-proper/src/model/petstore_tag.erl b/samples/client/petstore/erlang-proper/src/model/petstore_tag.erl new file mode 100644 index 00000000000..31bfe4fadb1 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/model/petstore_tag.erl @@ -0,0 +1,17 @@ +-module(petstore_tag). + +-include("petstore.hrl"). + +-export([petstore_tag/0]). + +-export_type([petstore_tag/0]). + +-type petstore_tag() :: + [ {'id', integer() } + | {'name', binary() } + ]. + +petstore_tag() -> + [ {'id', integer() } + , {'name', binary() } + ]. diff --git a/samples/client/petstore/erlang-proper/src/model/petstore_user.erl b/samples/client/petstore/erlang-proper/src/model/petstore_user.erl new file mode 100644 index 00000000000..df35576aa43 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/model/petstore_user.erl @@ -0,0 +1,29 @@ +-module(petstore_user). + +-include("petstore.hrl"). + +-export([petstore_user/0]). + +-export_type([petstore_user/0]). + +-type petstore_user() :: + [ {'id', integer() } + | {'username', binary() } + | {'firstName', binary() } + | {'lastName', binary() } + | {'email', binary() } + | {'password', binary() } + | {'phone', binary() } + | {'userStatus', integer() } + ]. + +petstore_user() -> + [ {'id', integer() } + , {'username', binary() } + , {'firstName', binary() } + , {'lastName', binary() } + , {'email', binary() } + , {'password', binary() } + , {'phone', binary() } + , {'userStatus', integer() } + ]. diff --git a/samples/client/petstore/erlang-proper/src/petstore.app.src b/samples/client/petstore/erlang-proper/src/petstore.app.src new file mode 100644 index 00000000000..dc56ef9bd89 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/petstore.app.src @@ -0,0 +1,21 @@ +{ application, petstore +, [ {description, "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters."} + , {vsn, "0.1.0"} + , {registered, []} + , { applications + , [ kernel + , stdlib + , ssl + , jsx + ] + } + , { env + , [ {host, "http://petstore.swagger.io"} + , {basic_auth, {"admin", "admin"}} + ] + } + , {modules, []} + , {maintainers, []} + , {licenses, ["Apache-2.0"]} + , {links, []} +]}. diff --git a/samples/client/petstore/erlang-proper/src/petstore.hrl b/samples/client/petstore/erlang-proper/src/petstore.hrl new file mode 100644 index 00000000000..d57c511a5aa --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/petstore.hrl @@ -0,0 +1,24 @@ +-compile({no_auto_import,[date/0]}). + +-import( petstore_gen + , [ binary/0 + , binary/1 + , binary/2 + , integer/0 + , integer/1 + , integer/2 + , boolean/0 + , list/0 + , list/1 + , list/2 + , list/3 + , map/0 + , date/0 + , datetime/0 + , any/0 + , elements/1 + ] + ). + +-type date() :: calendar:date(). +-type datetime() :: calendar:datetime(). diff --git a/samples/client/petstore/erlang-proper/src/petstore_api.erl b/samples/client/petstore/erlang-proper/src/petstore_api.erl new file mode 100644 index 00000000000..fe3fe661b3f --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/petstore_api.erl @@ -0,0 +1,119 @@ +-module(petstore_api). + +-export([ create_user/1 + , create_users_with_array_input/1 + , create_users_with_list_input/1 + , delete_user/1 + , get_user_by_name/1 + , login_user/2 + , logout_user/0 + , update_user/2 + ]). + +-define(BASE_URL, "/v2"). + +%% @doc Create user +%% This can only be done by the logged in user. +-spec create_user(petstore_user:petstore_user()) -> + petstore_utils:response(). +create_user(PetstoreUser) -> + Method = post, + Host = application:get_env(petstore, host, "http://localhost:8080"), + Path = ["/user"], + Body = PetstoreUser, + ContentType = <<"text/plain">>, + + petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). + +%% @doc Creates list of users with given input array +%% +-spec create_users_with_array_input(list(petstore_user:petstore_user())) -> + petstore_utils:response(). +create_users_with_array_input(PetstoreUserArray) -> + Method = post, + Host = application:get_env(petstore, host, "http://localhost:8080"), + Path = ["/user/createWithArray"], + Body = PetstoreUserArray, + ContentType = <<"text/plain">>, + + petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). + +%% @doc Creates list of users with given input array +%% +-spec create_users_with_list_input(list(petstore_user:petstore_user())) -> + petstore_utils:response(). +create_users_with_list_input(PetstoreUserArray) -> + Method = post, + Host = application:get_env(petstore, host, "http://localhost:8080"), + Path = ["/user/createWithList"], + Body = PetstoreUserArray, + ContentType = <<"text/plain">>, + + petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). + +%% @doc Delete user +%% This can only be done by the logged in user. +-spec delete_user(binary()) -> + petstore_utils:response(). +delete_user(Username) -> + Method = delete, + Host = application:get_env(petstore, host, "http://localhost:8080"), + Path = ["/user/", Username, ""], + Body = [], + ContentType = <<"text/plain">>, + + petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). + +%% @doc Get user by user name +%% +-spec get_user_by_name(binary()) -> + petstore_utils:response(). +get_user_by_name(Username) -> + Method = get, + Host = application:get_env(petstore, host, "http://localhost:8080"), + Path = ["/user/", Username, ""], + Body = [], + ContentType = <<"text/plain">>, + + petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). + +%% @doc Logs user into the system +%% +-spec login_user(binary(), binary()) -> + petstore_utils:response(). +login_user(Username, Password) -> + Method = get, + Host = application:get_env(petstore, host, "http://localhost:8080"), + Path = ["/user/login"], + Body = [], + ContentType = <<"text/plain">>, + QueryString = [<<"username=">>, Username, <<"&">>, <<"password=">>, Password, <<"&">>], + + petstore_utils:request(Method, [Host, ?BASE_URL, Path, <<"?">>, QueryString], jsx:encode(Body), ContentType). + +%% @doc Logs out current logged in user session +%% +-spec logout_user() -> + petstore_utils:response(). +logout_user() -> + Method = get, + Host = application:get_env(petstore, host, "http://localhost:8080"), + Path = ["/user/logout"], + Body = [], + ContentType = <<"text/plain">>, + + petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). + +%% @doc Updated user +%% This can only be done by the logged in user. +-spec update_user(binary(), petstore_user:petstore_user()) -> + petstore_utils:response(). +update_user(Username, PetstoreUser) -> + Method = put, + Host = application:get_env(petstore, host, "http://localhost:8080"), + Path = ["/user/", Username, ""], + Body = PetstoreUser, + ContentType = <<"text/plain">>, + + petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). + diff --git a/samples/client/petstore/erlang-proper/src/petstore_gen.erl b/samples/client/petstore/erlang-proper/src/petstore_gen.erl new file mode 100644 index 00000000000..fae40e35676 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/petstore_gen.erl @@ -0,0 +1,157 @@ +-module(petstore_gen). + +-compile({no_auto_import,[date/0]}). + +-include_lib("proper/include/proper_common.hrl"). + +%%============================================================================== +%% Exports +%%============================================================================== + +-export([ binary/0 + , binary/1 + , binary/2 + , integer/0 + , integer/1 + , integer/2 + , boolean/0 + , list/0 + , list/1 + , list/2 + , list/3 + , map/0 + , date/0 + , datetime/0 + , any/0 + , elements/1 + ]). + +-define(CHARS, [$a, $b, $c]). + +%%============================================================================== +%% Generators +%%============================================================================== + +binary() -> binary(10). + +binary(Min, Max) -> + ?LET( {X, N} + , { proper_types:elements(?CHARS) + , proper_types:choose(Min, Max) + } + , iolist_to_binary(lists:duplicate(N, X)) + ). + +binary(N) -> + ?LET( X + , proper_types:elements(?CHARS) + , iolist_to_binary(lists:duplicate(N, X)) + ). + +integer() -> proper_types:int(). + +integer(0) -> proper_types:nat(); +integer(Min) -> + ?LET( N + , proper_types:nat() + , proper_types:choose(Min, Min + N) + ). + +integer(Min, Max) -> proper_types:choose(Min, Max). + +boolean() -> proper_types:bool(). + +list() -> list(any()). + +list(Type) -> proper_types:list(Type). + +list(Type, Min) -> + ?LET( N + , integer(0) + , ?LET(X, list(Type, Min, Min + N), X) + ). + +list(Type, Min, Max) when Min =< Max -> + ?LET( {X, Y} + , { proper_types:vector(Min, Type) + , proper_types:resize(Max - Min, proper_types:list(Type)) + } + , X ++ Y + ). + +map() -> proper_types:map(any(), any()). + +date() -> + ?LET( X + , ?SUCHTHAT( X + , { year() + , proper_types:choose(1, 12) + , proper_types:choose(1, 31) + } + , calendar:valid_date(X) + ) + , begin + {Year, Month, Day} = X, + YearBin = num_binary_format(Year, "4"), + MonthBin = num_binary_format(Month, "2"), + DayBin = num_binary_format(Day, "2"), + <> + end + ). + +datetime() -> + Date = date(), + Hour = hour(), + ?LET( X + , {Date, Hour} + , begin + {D, H} = X, + <> + end + ). + +any() -> + Any = [ binary() + , integer() + , boolean() + %% We don't include lists and maps to avoid huge values + %% , list() + %% , map() + , date() + , datetime() + ], + proper_types:oneof(Any). + +elements(Items) -> + proper_types:elements(Items). + +%%============================================================================== +%% Internal +%%============================================================================== + +year() -> + ?LET( X + , proper_types:nat() + , 1970 + X + ). + +hour() -> + ?LET( X + , { proper_types:choose(0, 23) + , proper_types:choose(0, 59) + , proper_types:choose(0, 59) + , proper_types:choose(0, 999) + } + , begin + {Hours, Mins, Secs, Millis} = X, + HoursBin = num_binary_format(Hours, "2"), + MinsBin = num_binary_format(Mins, "2"), + SecsBin = num_binary_format(Secs, "2"), + MillisBin = num_binary_format(Millis, "3"), + <> + end + ). + +num_binary_format(X, N) -> + list_to_binary(io_lib:format("~" ++ N ++ "..0B", [X])). diff --git a/samples/client/petstore/erlang-proper/src/petstore_statem.erl b/samples/client/petstore/erlang-proper/src/petstore_statem.erl new file mode 100644 index 00000000000..d7e769cdaee --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/petstore_statem.erl @@ -0,0 +1,199 @@ +-module(petstore_statem). + +-behaviour(proper_statem). + +-include("petstore.hrl"). +-include_lib("proper/include/proper_common.hrl"). +-include_lib("stdlib/include/assert.hrl"). + +-compile(export_all). +-compile(nowarn_export_all). + +%%============================================================================== +%% PropEr callbacks +%%============================================================================== + +command(State) -> + Funs0 = [ {F, list_to_atom(atom_to_list(F) ++ "_args")} + || {F, _} <- ?MODULE:module_info(exports) + ], + + Funs1 = [ X || {_, FArgs} = X <- Funs0, + erlang:function_exported(?MODULE, FArgs, 1) + ], + proper_types:oneof([ {call, ?MODULE, F, ?MODULE:FArgs(State)} + || {F, FArgs} <- Funs1 + ]). + +precondition(S, {call, M, F, Args}) -> + Pre = list_to_atom(atom_to_list(F) ++ "_pre"), + case erlang:function_exported(M, Pre, 1) of + true -> M:Pre(S); + false -> true + end + andalso + case erlang:function_exported(M, Pre, 2) of + true -> M:Pre(S, Args); + false -> true + end. + +next_state(S, Res, {call, M, F, Args}) -> + Next = list_to_atom(atom_to_list(F) ++ "_next"), + case erlang:function_exported(M, Next, 3) of + true -> M:Next(S, Res, Args); + false -> S + end. + +postcondition(S, {call, M, F, Args}, Res) -> + Post = list_to_atom(atom_to_list(F) ++ "_post"), + case erlang:function_exported(M, Post, 3) of + true -> M:Post(S, Args, Res); + false -> true + end. + +%%============================================================================== +%% create_user +%%============================================================================== + +create_user(PetstoreUser) -> + petstore_api:create_user(PetstoreUser). + +create_user_args(S) -> + Args = [petstore_user:petstore_user()], + case erlang:function_exported(?MODULE, 'create_user_args_custom', 2) of + true -> ?MODULE:create_user_args_custom(S, Args); + false -> Args + end. + +%%============================================================================== +%% create_users_with_array_input +%%============================================================================== + +create_users_with_array_input(PetstoreUserArray) -> + petstore_api:create_users_with_array_input(PetstoreUserArray). + +create_users_with_array_input_args(S) -> + Args = [list(petstore_user:petstore_user())], + case erlang:function_exported(?MODULE, 'create_users_with_array_input_args_custom', 2) of + true -> ?MODULE:create_users_with_array_input_args_custom(S, Args); + false -> Args + end. + +%%============================================================================== +%% create_users_with_list_input +%%============================================================================== + +create_users_with_list_input(PetstoreUserArray) -> + petstore_api:create_users_with_list_input(PetstoreUserArray). + +create_users_with_list_input_args(S) -> + Args = [list(petstore_user:petstore_user())], + case erlang:function_exported(?MODULE, 'create_users_with_list_input_args_custom', 2) of + true -> ?MODULE:create_users_with_list_input_args_custom(S, Args); + false -> Args + end. + +%%============================================================================== +%% delete_user +%%============================================================================== + +delete_user(Username) -> + petstore_api:delete_user(Username). + +delete_user_args(S) -> + Args = [binary()], + case erlang:function_exported(?MODULE, 'delete_user_args_custom', 2) of + true -> ?MODULE:delete_user_args_custom(S, Args); + false -> Args + end. + +%%============================================================================== +%% get_user_by_name +%%============================================================================== + +get_user_by_name(Username) -> + petstore_api:get_user_by_name(Username). + +get_user_by_name_args(S) -> + Args = [binary()], + case erlang:function_exported(?MODULE, 'get_user_by_name_args_custom', 2) of + true -> ?MODULE:get_user_by_name_args_custom(S, Args); + false -> Args + end. + +%%============================================================================== +%% login_user +%%============================================================================== + +login_user(Username, Password) -> + petstore_api:login_user(Username, Password). + +login_user_args(S) -> + Args = [binary(), binary()], + case erlang:function_exported(?MODULE, 'login_user_args_custom', 2) of + true -> ?MODULE:login_user_args_custom(S, Args); + false -> Args + end. + +%%============================================================================== +%% logout_user +%%============================================================================== + +logout_user() -> + petstore_api:logout_user(). + +logout_user_args(S) -> + Args = [], + case erlang:function_exported(?MODULE, 'logout_user_args_custom', 2) of + true -> ?MODULE:logout_user_args_custom(S, Args); + false -> Args + end. + +%%============================================================================== +%% update_user +%%============================================================================== + +update_user(Username, PetstoreUser) -> + petstore_api:update_user(Username, PetstoreUser). + +update_user_args(S) -> + Args = [binary(), petstore_user:petstore_user()], + case erlang:function_exported(?MODULE, 'update_user_args_custom', 2) of + true -> ?MODULE:update_user_args_custom(S, Args); + false -> Args + end. + + +%%============================================================================== +%% The statem's property +%%============================================================================== + +prop_main() -> + setup(), + ?FORALL( Cmds + , proper_statem:commands(?MODULE) + , begin + cleanup(), + { History + , State + , Result + } = proper_statem:run_commands(?MODULE, Cmds), + ?WHENFAIL( + io:format("History: ~p\nState: ~p\nResult: ~p\nCmds: ~p\n", + [ History + , State + , Result + , proper_statem:command_names(Cmds) + ]), + proper:aggregate( proper_statem:command_names(Cmds) + , Result =:= ok + ) + ) + end + ). + +%%============================================================================== +%% Include file with setup, cleanup, initial_state +%% and state transitions callbacks +%%============================================================================== +-include("petstore_statem.hrl"). diff --git a/samples/client/petstore/erlang-proper/src/petstore_statem.hrl b/samples/client/petstore/erlang-proper/src/petstore_statem.hrl new file mode 100644 index 00000000000..7b4dd931aa3 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/petstore_statem.hrl @@ -0,0 +1,25 @@ +%%============================================================================== +%% Setup +%%============================================================================== + +setup() -> ok. + +%%============================================================================== +%% Cleanup +%%============================================================================== + +cleanup() -> ok. + +%%============================================================================== +%% Initial State +%%============================================================================== + +initial_state() -> #{}. + +%%============================================================================== +%% State transitions callbacks +%% +%% operation_pre(State) -> true. +%% operation_next(State, Result, Args) -> State. +%% operation_post(State, Args, Result) -> true. +%%============================================================================== diff --git a/samples/client/petstore/erlang-proper/src/petstore_utils.erl b/samples/client/petstore/erlang-proper/src/petstore_utils.erl new file mode 100644 index 00000000000..054228c13d2 --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/petstore_utils.erl @@ -0,0 +1,66 @@ +-module(petstore_utils). + +-export([ request/2 + , request/4 + ]). + +-type response() :: #{ status := integer() + , headers := map() + , body := iolist() + }. + +-export_type([response/0]). + +-spec request(atom(), string()) -> response(). +request(Method, Url) -> + request(Method, Url, undefined, undefined). + +-spec request(atom(), iolist(), iolist(), string()) -> response(). +request(Method, Url0, Body, ContentType) -> + Url = binary_to_list(iolist_to_binary(Url0)), + Headers = headers(), + Request = case Body of + undefined -> {Url, Headers}; + _ -> {Url, Headers, ContentType, Body} + end, + HTTPOptions = [{autoredirect, true}], + Options = [], + %% Disable pipelining to avoid the socket getting closed during long runs + ok = httpc:set_options([ {max_keep_alive_length, 0} + , {max_pipeline_length, 0} + , {max_sessions, 0} + ]), + Result = httpc:request(Method, Request, HTTPOptions, Options), + {ok, {{_Ver, Status, _Phrase}, RespHeaders, RespBody}} = Result, + + Response = #{ status => Status + , headers => maps:from_list(RespHeaders) + , body => RespBody + }, + decode_body(Response). + +-spec headers() -> [{string(), string()}]. +headers() -> + [ {"Accept", "application/json"} + | basic_auth() + ]. + +-spec basic_auth() -> [{string(), string()}]. +basic_auth() -> + case application:get_env(petstore, basic_auth, undefined) of + undefined -> []; + {Username, Password} -> + Credentials = base64:encode_to_string(Username ++ ":" ++ Password), + [{"Authorization", "Basic " ++ Credentials}] + end. + +-spec decode_body(response()) -> response(). +decode_body(#{ headers := #{"content-type" := "application/json"} + , body := Body + } = Response) -> + Json = jsx:decode( unicode:characters_to_binary(Body) + , [return_maps, {labels, atom}] + ), + Response#{body_json => Json}; +decode_body(Response) -> + Response. diff --git a/samples/client/petstore/erlang-proper/test/prop_petstore.erl b/samples/client/petstore/erlang-proper/test/prop_petstore.erl new file mode 100644 index 00000000000..558e99f1c30 --- /dev/null +++ b/samples/client/petstore/erlang-proper/test/prop_petstore.erl @@ -0,0 +1,7 @@ +-module(prop_petstore). + +-export([prop_test/0]). + +prop_test() -> + {ok, _} = application:ensure_all_started(petstore), + petstore_statem:prop_main(). diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index 610174ac2a8..91a0e994b24 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -40,6 +40,7 @@ Class | Method | HTTP request | Description *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 diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index debb8e0c844..95a925396fa 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -589,6 +589,34 @@ paths: tags: - fake_classname_tags 123#$%^ /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true get: description: To test enum parameters operationId: testEnumParameters diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 949b14bf876..f3792213114 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -910,6 +910,91 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona return localVarHttpResponse, nil } +/* +FakeApiService Fake endpoint to test group parameters (optional) +Fake endpoint to test group parameters (optional) + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *TestGroupParametersOpts - Optional Parameters: + * @param "StringGroup" (optional.Int32) - String in group parameters + * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters + * @param "Int64Group" (optional.Int64) - Integer in group parameters +*/ + +type TestGroupParametersOpts struct { + StringGroup optional.Int32 + BooleanGroup optional.Bool + Int64Group optional.Int64 +} + +func (a *FakeApiService) TestGroupParameters(ctx context.Context, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/fake" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.StringGroup.IsSet() { + localVarQueryParams.Add("string_group", parameterToString(localVarOptionals.StringGroup.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int64Group.IsSet() { + localVarQueryParams.Add("int64_group", parameterToString(localVarOptionals.Int64Group.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if localVarOptionals != nil && localVarOptionals.BooleanGroup.IsSet() { + localVarHeaderParams["boolean_group"] = parameterToString(localVarOptionals.BooleanGroup.Value(), "") + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + /* FakeApiService test inline additionalProperties * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md index b89c1abbc1c..8490ca254c7 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -334,6 +335,43 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **TestGroupParameters** +> TestGroupParameters(ctx, optional) +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a TestGroupParametersOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stringGroup** | **optional.Int32**| String in group parameters | + **booleanGroup** | **optional.Bool**| Boolean in group parameters | + **int64Group** | **optional.Int64**| Integer in group parameters | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **TestInlineAdditionalProperties** > TestInlineAdditionalProperties(ctx, requestBody) test inline additionalProperties diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs index 4d73209965f..0af6e0fa70e 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs @@ -368,6 +368,39 @@ instance Consumes TestEnumParameters MimeFormUrlEncoded instance Produces TestEnumParameters MimeNoContent +-- *** testGroupParameters + +-- | @DELETE \/fake@ +-- +-- Fake endpoint to test group parameters (optional) +-- +-- Fake endpoint to test group parameters (optional) +-- +testGroupParameters + :: OpenAPIPetstoreRequest TestGroupParameters MimeNoContent NoContent MimeNoContent +testGroupParameters = + _mkRequest "DELETE" ["/fake"] + +data TestGroupParameters + +-- | /Optional Param/ "string_group" - String in group parameters +instance HasOptionalParam TestGroupParameters StringGroup where + applyOptionalParam req (StringGroup xs) = + req `setQuery` toQuery ("string_group", Just xs) + +-- | /Optional Param/ "boolean_group" - Boolean in group parameters +instance HasOptionalParam TestGroupParameters BooleanGroup where + applyOptionalParam req (BooleanGroup xs) = + req `setHeader` toHeader ("boolean_group", xs) + +-- | /Optional Param/ "int64_group" - Integer in group parameters +instance HasOptionalParam TestGroupParameters Int64Group where + applyOptionalParam req (Int64Group xs) = + req `setQuery` toQuery ("int64_group", Just xs) + +instance Produces TestGroupParameters MimeNoContent + + -- *** testInlineAdditionalProperties -- | @POST \/fake\/inline-additionalProperties@ diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index cf1093c0640..d6a12c9dc75 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -81,6 +81,9 @@ newtype BodyBool = BodyBool { unBodyBool :: Bool } deriving (P.Eq, P.Show, A.ToJ -- ** BodyText newtype BodyText = BodyText { unBodyText :: Text } deriving (P.Eq, P.Show, A.ToJSON) +-- ** BooleanGroup +newtype BooleanGroup = BooleanGroup { unBooleanGroup :: Bool } deriving (P.Eq, P.Show) + -- ** Byte newtype Byte = Byte { unByte :: ByteArray } deriving (P.Eq, P.Show) @@ -120,6 +123,9 @@ newtype Int32 = Int32 { unInt32 :: Int } deriving (P.Eq, P.Show) -- ** Int64 newtype Int64 = Int64 { unInt64 :: Integer } deriving (P.Eq, P.Show) +-- ** Int64Group +newtype Int64Group = Int64Group { unInt64Group :: Integer } deriving (P.Eq, P.Show) + -- ** Name2 newtype Name2 = Name2 { unName2 :: Text } deriving (P.Eq, P.Show) @@ -183,6 +189,9 @@ newtype Status = Status { unStatus :: [E'Status2] } deriving (P.Eq, P.Show) -- ** StatusText newtype StatusText = StatusText { unStatusText :: Text } deriving (P.Eq, P.Show) +-- ** StringGroup +newtype StringGroup = StringGroup { unStringGroup :: Int } deriving (P.Eq, P.Show) + -- ** Tags newtype Tags = Tags { unTags :: [Text] } deriving (P.Eq, P.Show) diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index debb8e0c844..95a925396fa 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -589,6 +589,34 @@ paths: tags: - fake_classname_tags 123#$%^ /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true get: description: To test enum parameters operationId: testEnumParameters diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java index ddfdca531a9..af078f73628 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java @@ -246,6 +246,58 @@ public interface FakeApi extends ApiClient.Api { } } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + */ + @RequestLine("DELETE /fake?string_group={stringGroup}&int64_group={int64Group}") + @Headers({ + "Accept: application/json", + "boolean_group: {booleanGroup}" + }) + void testGroupParameters(@Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * Note, this is equivalent to the other testGroupParameters method, + * but with the query parameters collected into a single Map parameter. This + * is convenient for services with optional query parameters, especially when + * used with the {@link TestGroupParametersQueryParams} class that allows for + * building up this map in a fluent style. + * @param booleanGroup Boolean in group parameters (optional) + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + *
  • stringGroup - String in group parameters (optional)
  • + *
  • int64Group - Integer in group parameters (optional)
  • + *
+ */ + @RequestLine("DELETE /fake?string_group={stringGroup}&int64_group={int64Group}") + @Headers({ + "Accept: application/json", + "boolean_group: {booleanGroup}" + }) + void testGroupParameters(@Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); + + /** + * A convenience class for generating query parameters for the + * testGroupParameters method in a fluent style. + */ + public static class TestGroupParametersQueryParams extends HashMap { + public TestGroupParametersQueryParams stringGroup(final Integer value) { + put("string_group", EncodingUtils.encode(value)); + return this; + } + public TestGroupParametersQueryParams int64Group(final Long value) { + put("int64_group", EncodingUtils.encode(value)); + return this; + } + } + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java index ddfdca531a9..af078f73628 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java @@ -246,6 +246,58 @@ public interface FakeApi extends ApiClient.Api { } } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + */ + @RequestLine("DELETE /fake?string_group={stringGroup}&int64_group={int64Group}") + @Headers({ + "Accept: application/json", + "boolean_group: {booleanGroup}" + }) + void testGroupParameters(@Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * Note, this is equivalent to the other testGroupParameters method, + * but with the query parameters collected into a single Map parameter. This + * is convenient for services with optional query parameters, especially when + * used with the {@link TestGroupParametersQueryParams} class that allows for + * building up this map in a fluent style. + * @param booleanGroup Boolean in group parameters (optional) + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + *
  • stringGroup - String in group parameters (optional)
  • + *
  • int64Group - Integer in group parameters (optional)
  • + *
+ */ + @RequestLine("DELETE /fake?string_group={stringGroup}&int64_group={int64Group}") + @Headers({ + "Accept: application/json", + "boolean_group: {booleanGroup}" + }) + void testGroupParameters(@Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); + + /** + * A convenience class for generating query parameters for the + * testGroupParameters method in a fluent style. + */ + public static class TestGroupParametersQueryParams extends HashMap { + public TestGroupParametersQueryParams stringGroup(final Integer value) { + put("string_group", EncodingUtils.encode(value)); + return this; + } + public TestGroupParametersQueryParams int64Group(final Long value) { + put("int64_group", EncodingUtils.encode(value)); + return this; + } + } + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java index 8261d36b58d..706f7ac9a5d 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java @@ -879,6 +879,92 @@ public class FakeApi { } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + *

400 - Someting wrong + * @param stringGroup String in group parameters + * @param booleanGroup Boolean in group parameters + * @param int64Group Integer in group parameters + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws IOException { + testGroupParametersForHttpResponse(stringGroup, booleanGroup, int64Group); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + *

400 - Someting wrong + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public void testGroupParameters(Map params) throws IOException { + testGroupParametersForHttpResponse(params); + } + + public HttpResponse testGroupParametersForHttpResponse(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws IOException { + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake"); + if (stringGroup != null) { + String key = "string_group"; + Object value = stringGroup; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } if (int64Group != null) { + String key = "int64_group"; + Object value = int64Group; + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = null; + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute(); + } + + public HttpResponse testGroupParametersForHttpResponse(Map params) throws IOException { + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake"); + + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); + + for (Map.Entry entry: allParams.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + if (key != null && value != null) { + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + } + + String url = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = null; + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute(); + } + + /** * test inline additionalProperties *

200 - successful operation diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java index ac9d1f4e362..97fe4cc1356 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java @@ -486,6 +486,48 @@ if (enumFormString != null) apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @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 stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPair("string_group", stringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPair("int64_group", int64Group)); + + if (booleanGroup != null) + localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeApiTest.java index f23eef8b585..23f854df6ab 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -15,8 +15,8 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; import java.math.BigDecimal; -import org.openapitools.client.model.Client; import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.OuterComposite; @@ -102,6 +102,22 @@ public class FakeApiTest { // TODO: test validations } + /** + * + * + * For this test, the body for this request much reference a schema named `File`. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithFileSchemaTest() throws ApiException { + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema(fileSchemaTestClass); + + // TODO: test validations + } + /** * * @@ -119,22 +135,6 @@ public class FakeApiTest { // TODO: test validations } - /** - * To test \"client\" model - * - * To test \"client\" model - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testClientModelTest() throws ApiException { - Client client = null; - Client response = api.testClientModel(client); - - // TODO: test validations - } - /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -187,6 +187,24 @@ public class FakeApiTest { // TODO: test validations } + /** + * Fake endpoint to test group parameters (optional) + * + * Fake endpoint to test group parameters (optional) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testGroupParametersTest() throws ApiException { + Integer stringGroup = null; + Boolean booleanGroup = null; + Long int64Group = null; + api.testGroupParameters(stringGroup, booleanGroup, int64Group); + + // TODO: test validations + } + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java index 217f4b30495..f27eb4d2d53 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java @@ -584,6 +584,60 @@ if (enumFormString != null) return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @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 stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + + testGroupParametersWithHttpInfo(stringGroup, booleanGroup, int64Group); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @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 ApiResponse testGroupParametersWithHttpInfo(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group)); + + if (booleanGroup != null) + localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index 167ef1fb4d8..434cebdd6f3 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -584,6 +584,60 @@ if (enumFormString != null) return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @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 stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + + testGroupParametersWithHttpInfo(stringGroup, booleanGroup, int64Group); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @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 ApiResponse testGroupParametersWithHttpInfo(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group)); + + if (booleanGroup != null) + localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java index 35e9a6037cf..66fd7294503 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -17,6 +17,7 @@ import org.openapitools.client.ApiException; 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; @@ -102,6 +103,22 @@ public class FakeApiTest { // TODO: test validations } + /** + * + * + * For this test, the body for this request much reference a schema named `File`. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithFileSchemaTest() throws ApiException { + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema(fileSchemaTestClass); + + // TODO: test validations + } + /** * * @@ -187,6 +204,24 @@ public class FakeApiTest { // TODO: test validations } + /** + * Fake endpoint to test group parameters (optional) + * + * Fake endpoint to test group parameters (optional) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testGroupParametersTest() throws ApiException { + Integer stringGroup = null; + Boolean booleanGroup = null; + Long int64Group = null; + api.testGroupParameters(stringGroup, booleanGroup, int64Group); + + // TODO: test validations + } + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/jersey2/docs/FakeApi.md b/samples/client/petstore/java/jersey2/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java index 217f4b30495..f27eb4d2d53 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -584,6 +584,60 @@ if (enumFormString != null) return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @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 stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + + testGroupParametersWithHttpInfo(stringGroup, booleanGroup, int64Group); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @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 ApiResponse testGroupParametersWithHttpInfo(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group)); + + if (booleanGroup != null) + localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeApiTest.java index f23eef8b585..6fffb218baa 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -17,6 +17,7 @@ import org.openapitools.client.ApiException; import java.math.BigDecimal; import org.openapitools.client.model.Client; import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.OuterComposite; @@ -102,6 +103,22 @@ public class FakeApiTest { // TODO: test validations } + /** + * + * + * For this test, the body for this request much reference a schema named `File`. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithFileSchemaTest() throws ApiException { + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema(fileSchemaTestClass); + + // TODO: test validations + } + /** * * @@ -187,6 +204,24 @@ public class FakeApiTest { // TODO: test validations } + /** + * Fake endpoint to test group parameters (optional) + * + * Fake endpoint to test group parameters (optional) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testGroupParametersTest() throws ApiException { + Integer stringGroup = null; + Boolean booleanGroup = null; + Long int64Group = null; + api.testGroupParameters(stringGroup, booleanGroup, int64Group); + + // TODO: test validations + } + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java index f8ad6cf3902..12630634b3f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java @@ -79,7 +79,7 @@ public class ApiClient { private HttpLoggingInterceptor loggingInterceptor; /* - * Constructor for ApiClient + * Basic constructor for ApiClient */ public ApiClient() { init(); @@ -94,13 +94,23 @@ public class ApiClient { } /* - * Constructor for ApiClient to support access token retry on 401/403 + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID */ - public ApiClient( - String clientId, - String clientSecret, - Map parameters - ) { + public ApiClient(String clientId) { + this(clientId, null, null); + } + + /* + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID and additional parameters + */ + public ApiClient(String clientId, Map parameters) { + this(clientId, null, parameters); + } + + /* + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID, secret, and additional parameters + */ + public ApiClient(String clientId, String clientSecret, Map parameters) { init(); RetryingOAuth retryingOAuth = new RetryingOAuth("", clientId, OAuthFlow.implicit, clientSecret, parameters); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java index 6db391fbe62..783dfb78ec2 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1305,6 +1305,138 @@ public class FakeApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for testGroupParameters + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call testGroupParametersCall(Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/fake"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (stringGroup != null) { + localVarQueryParams.addAll(apiClient.parameterToPair("string_group", stringGroup)); + } + + if (int64Group != null) { + localVarQueryParams.addAll(apiClient.parameterToPair("int64_group", int64Group)); + } + + Map localVarHeaderParams = new HashMap(); + if (booleanGroup != null) { + localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + } + + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if (progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call testGroupParametersValidateBeforeCall(Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = testGroupParametersCall(stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); + return call; + + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + testGroupParametersWithHttpInfo(stringGroup, booleanGroup, int64Group); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse testGroupParametersWithHttpInfo(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + com.squareup.okhttp.Call call = testGroupParametersValidateBeforeCall(stringGroup, booleanGroup, int64Group, null, null); + return apiClient.execute(call); + } + + /** + * Fake endpoint to test group parameters (optional) (asynchronously) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call testGroupParametersAsync(Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = testGroupParametersValidateBeforeCall(stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for testInlineAdditionalProperties * @param requestBody request body (required) diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java index f8ad6cf3902..12630634b3f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -79,7 +79,7 @@ public class ApiClient { private HttpLoggingInterceptor loggingInterceptor; /* - * Constructor for ApiClient + * Basic constructor for ApiClient */ public ApiClient() { init(); @@ -94,13 +94,23 @@ public class ApiClient { } /* - * Constructor for ApiClient to support access token retry on 401/403 + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID */ - public ApiClient( - String clientId, - String clientSecret, - Map parameters - ) { + public ApiClient(String clientId) { + this(clientId, null, null); + } + + /* + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID and additional parameters + */ + public ApiClient(String clientId, Map parameters) { + this(clientId, null, parameters); + } + + /* + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID, secret, and additional parameters + */ + public ApiClient(String clientId, String clientSecret, Map parameters) { init(); RetryingOAuth retryingOAuth = new RetryingOAuth("", clientId, OAuthFlow.implicit, clientSecret, parameters); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java index 6db391fbe62..783dfb78ec2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1305,6 +1305,138 @@ public class FakeApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for testGroupParameters + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call testGroupParametersCall(Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/fake"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (stringGroup != null) { + localVarQueryParams.addAll(apiClient.parameterToPair("string_group", stringGroup)); + } + + if (int64Group != null) { + localVarQueryParams.addAll(apiClient.parameterToPair("int64_group", int64Group)); + } + + Map localVarHeaderParams = new HashMap(); + if (booleanGroup != null) { + localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + } + + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if (progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call testGroupParametersValidateBeforeCall(Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = testGroupParametersCall(stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); + return call; + + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + testGroupParametersWithHttpInfo(stringGroup, booleanGroup, int64Group); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse testGroupParametersWithHttpInfo(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + com.squareup.okhttp.Call call = testGroupParametersValidateBeforeCall(stringGroup, booleanGroup, int64Group, null, null); + return apiClient.execute(call); + } + + /** + * Fake endpoint to test group parameters (optional) (asynchronously) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call testGroupParametersAsync(Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = testGroupParametersValidateBeforeCall(stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for testInlineAdditionalProperties * @param requestBody request body (required) diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java index f23eef8b585..6fffb218baa 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -17,6 +17,7 @@ import org.openapitools.client.ApiException; import java.math.BigDecimal; import org.openapitools.client.model.Client; import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.OuterComposite; @@ -102,6 +103,22 @@ public class FakeApiTest { // TODO: test validations } + /** + * + * + * For this test, the body for this request much reference a schema named `File`. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithFileSchemaTest() throws ApiException { + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema(fileSchemaTestClass); + + // TODO: test validations + } + /** * * @@ -187,6 +204,24 @@ public class FakeApiTest { // TODO: test validations } + /** + * Fake endpoint to test group parameters (optional) + * + * Fake endpoint to test group parameters (optional) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testGroupParametersTest() throws ApiException { + Integer stringGroup = null; + Boolean booleanGroup = null; + Long int64Group = null; + api.testGroupParameters(stringGroup, booleanGroup, int64Group); + + // TODO: test validations + } + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/rest-assured/docs/FakeApi.md b/samples/client/petstore/java/rest-assured/docs/FakeApi.md index 884e7580651..8d5f569c6c7 100644 --- a/samples/client/petstore/java/rest-assured/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -413,6 +414,49 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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 io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).fake(); + +api.testGroupParameters().execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java index 832cdba0da6..991442d3dd0 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java @@ -149,6 +149,16 @@ public class FakeApi { return new TestEnumParametersOper(reqSpec); } + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", + notes = "Fake endpoint to test group parameters (optional)", + nickname = "testGroupParameters", + tags = { "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + public TestGroupParametersOper testGroupParameters() { + return new TestGroupParametersOper(reqSpec); + } + @ApiOperation(value = "test inline additionalProperties", notes = "", nickname = "testInlineAdditionalProperties", @@ -1030,6 +1040,91 @@ public class FakeApi { return this; } } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @see #stringGroupQuery String in group parameters (optional) + * @see #booleanGroupHeader Boolean in group parameters (optional) + * @see #int64GroupQuery Integer in group parameters (optional) + */ + public static class TestGroupParametersOper { + + public static final Method REQ_METHOD = DELETE; + public static final String REQ_URI = "/fake"; + + private RequestSpecBuilder reqSpec; + private ResponseSpecBuilder respSpec; + + public TestGroupParametersOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * DELETE /fake + * @param handler handler + * @param type + * @return type + */ + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); + } + + public static final String BOOLEAN_GROUP_HEADER = "boolean_group"; + + /** + * @param booleanGroup (Boolean) Boolean in group parameters (optional) + * @return operation + */ + public TestGroupParametersOper booleanGroupHeader(String booleanGroup) { + reqSpec.addHeader(BOOLEAN_GROUP_HEADER, booleanGroup); + return this; + } + + public static final String STRING_GROUP_QUERY = "string_group"; + + /** + * @param stringGroup (Integer) String in group parameters (optional) + * @return operation + */ + public TestGroupParametersOper stringGroupQuery(Object... stringGroup) { + reqSpec.addQueryParam(STRING_GROUP_QUERY, stringGroup); + return this; + } + + public static final String INT64_GROUP_QUERY = "int64_group"; + + /** + * @param int64Group (Long) Integer in group parameters (optional) + * @return operation + */ + public TestGroupParametersOper int64GroupQuery(Object... int64Group) { + reqSpec.addQueryParam(INT64_GROUP_QUERY, int64Group); + return this; + } + + /** + * Customise request specification + * @param consumer consumer + * @return operation + */ + public TestGroupParametersOper reqSpec(Consumer consumer) { + consumer.accept(reqSpec); + return this; + } + + /** + * Customise response specification + * @param consumer consumer + * @return operation + */ + public TestGroupParametersOper respSpec(Consumer consumer) { + consumer.accept(respSpec); + return this; + } + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java index 1244c0782b3..d05c8622726 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -16,6 +16,7 @@ package org.openapitools.client.api; import java.math.BigDecimal; import org.openapitools.client.model.Client; import java.io.File; +import org.openapitools.client.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.OuterComposite; @@ -96,6 +97,18 @@ public class FakeApiTest { } + /** + * Success + */ + @Test + public void shouldSee200AfterTestBodyWithFileSchema() { + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema() + .body(fileSchemaTestClass).execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** * Success */ @@ -212,6 +225,19 @@ public class FakeApiTest { } + /** + * Someting wrong + */ + @Test + public void shouldSee400AfterTestGroupParameters() { + Integer stringGroup = null; + String booleanGroup = null; + Long int64Group = null; + api.testGroupParameters().execute(r -> r.prettyPeek()); + // TODO: test validations + } + + /** * successful operation */ diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java index 5b68d20e83b..a1c5fef69c1 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java @@ -463,6 +463,47 @@ if (enumFormString != null) apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @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 stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group)); + + if (booleanGroup != null) + localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index b1e3e174e21..4a3cd69107c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -421,6 +421,40 @@ public class FakeApi { ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + *

400 - Someting wrong + * @param stringGroup String in group parameters + * @param booleanGroup Boolean in group parameters + * @param int64Group Integer in group parameters + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + Object postBody = null; + + String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "string_group", stringGroup)); + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "int64_group", int64Group)); + + if (booleanGroup != null) + headerParams.add("boolean_group", apiClient.parameterToString(booleanGroup)); + + final String[] accepts = { }; + final List accept = apiClient.selectHeaderAccept(accepts); + final String[] contentTypes = { }; + final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); + + String[] authNames = new String[] { }; + + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; + apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index b1e3e174e21..4a3cd69107c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -421,6 +421,40 @@ public class FakeApi { ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + *

400 - Someting wrong + * @param stringGroup String in group parameters + * @param booleanGroup Boolean in group parameters + * @param int64Group Integer in group parameters + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + Object postBody = null; + + String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "string_group", stringGroup)); + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "int64_group", int64Group)); + + if (booleanGroup != null) + headerParams.add("boolean_group", apiClient.parameterToString(booleanGroup)); + + final String[] accepts = { }; + final List accept = apiClient.selectHeaderAccept(accepts); + final String[] contentTypes = { }; + final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); + + String[] authNames = new String[] { }; + + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; + apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java index f5043c0f3b1..ed7fb62be50 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java @@ -283,6 +283,34 @@ public interface FakeApi { void testEnumParameters( @retrofit.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit.http.Header("enum_header_string") String enumHeaderString, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit.http.Query("enum_query_string") String enumQueryString, @retrofit.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit.http.Query("enum_query_double") Double enumQueryDouble, @retrofit.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit.http.Field("enum_form_string") String enumFormString, Callback cb ); + /** + * Fake endpoint to test group parameters (optional) + * Sync method + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Void + */ + + @DELETE("/fake") + Void testGroupParameters( + @retrofit.http.Query("string_group") Integer stringGroup, @retrofit.http.Header("boolean_group") Boolean booleanGroup, @retrofit.http.Query("int64_group") Long int64Group + ); + + /** + * Fake endpoint to test group parameters (optional) + * Async method + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @param cb callback method + */ + + @DELETE("/fake") + void testGroupParameters( + @retrofit.http.Query("string_group") Integer stringGroup, @retrofit.http.Header("boolean_group") Boolean booleanGroup, @retrofit.http.Query("int64_group") Long int64Group, Callback cb + ); /** * test inline additionalProperties * Sync method diff --git a/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md index d529c54f05a..3caa786e5ac 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/FakeApi.java index 523420ec7f4..84745f86ce9 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/FakeApi.java @@ -160,6 +160,19 @@ public interface FakeApi { @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Query("enum_query_double") Double enumQueryDouble, @retrofit2.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString ); + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Call<Void> + */ + @DELETE("fake") + F.Promise> testGroupParameters( + @retrofit2.http.Query("string_group") Integer stringGroup, @retrofit2.http.Header("boolean_group") Boolean booleanGroup, @retrofit2.http.Query("int64_group") Long int64Group + ); + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md index d529c54f05a..3caa786e5ac 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/FakeApi.java index 0c4b1f21257..3394d297167 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/FakeApi.java @@ -160,6 +160,19 @@ public interface FakeApi { @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Query("enum_query_double") Double enumQueryDouble, @retrofit2.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString ); + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Call<Void> + */ + @DELETE("fake") + CompletionStage> testGroupParameters( + @retrofit2.http.Query("string_group") Integer stringGroup, @retrofit2.http.Header("boolean_group") Boolean booleanGroup, @retrofit2.http.Query("int64_group") Long int64Group + ); + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index d529c54f05a..3caa786e5ac 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java index 0c4b1f21257..3394d297167 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java @@ -160,6 +160,19 @@ public interface FakeApi { @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Query("enum_query_double") Double enumQueryDouble, @retrofit2.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString ); + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Call<Void> + */ + @DELETE("fake") + CompletionStage> testGroupParameters( + @retrofit2.http.Query("string_group") Integer stringGroup, @retrofit2.http.Header("boolean_group") Boolean booleanGroup, @retrofit2.http.Query("int64_group") Long int64Group + ); + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index d529c54f05a..3caa786e5ac 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java index b2dbdf2f378..1f6a1f76981 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -155,6 +155,19 @@ public interface FakeApi { @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Query("enum_query_double") Double enumQueryDouble, @retrofit2.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString ); + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Call<Void> + */ + @DELETE("fake") + Call testGroupParameters( + @retrofit2.http.Query("string_group") Integer stringGroup, @retrofit2.http.Header("boolean_group") Boolean booleanGroup, @retrofit2.http.Query("int64_group") Long int64Group + ); + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md index d529c54f05a..3caa786e5ac 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/FakeApi.java index b871372608e..09f958ecd6a 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/FakeApi.java @@ -155,6 +155,19 @@ public interface FakeApi { @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Query("enum_query_double") Double enumQueryDouble, @retrofit2.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString ); + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Observable<Void> + */ + @DELETE("fake") + Observable testGroupParameters( + @retrofit2.http.Query("string_group") Integer stringGroup, @retrofit2.http.Header("boolean_group") Boolean booleanGroup, @retrofit2.http.Query("int64_group") Long int64Group + ); + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index d529c54f05a..3caa786e5ac 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java index f0196a69a2a..dfdb1132524 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -156,6 +156,19 @@ public interface FakeApi { @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Query("enum_query_double") Double enumQueryDouble, @retrofit2.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString ); + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Completable + */ + @DELETE("fake") + Completable testGroupParameters( + @retrofit2.http.Query("string_group") Integer stringGroup, @retrofit2.http.Header("boolean_group") Boolean booleanGroup, @retrofit2.http.Query("int64_group") Long int64Group + ); + /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index bbb141bb561..8ea6866dc51 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java index c95b43a4771..e95457a4270 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java @@ -34,6 +34,8 @@ public interface FakeApi { void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, Handler> handler); + void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group, Handler> handler); + void testInlineAdditionalProperties(Map requestBody, Handler> handler); void testJsonFormData(String param, String param2, Handler> handler); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java index 96dc3fadc0f..fbc675cc003 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java @@ -390,6 +390,40 @@ if (enumFormString != null) localVarFormParams.put("enum_form_string", enumFormS apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @param resultHandler Asynchronous result handler + */ + public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group, Handler> resultHandler) { + Object localVarBody = null; + + // create path and map variables + String localVarPath = "/fake"; + + // query params + List localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group)); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + if (booleanGroup != null) + localVarHeaderParams.add("boolean_group", apiClient.parameterToString(booleanGroup)); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { }; + String[] localVarContentTypes = { }; + String[] localVarAuthNames = new String[] { }; + + apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java index c1f17eaa765..243a8fc4335 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java @@ -259,6 +259,31 @@ public class FakeApi { delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, fut); })); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @param resultHandler Asynchronous result handler + */ + public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group, Handler> resultHandler) { + delegate.testGroupParameters(stringGroup, booleanGroup, int64Group, resultHandler); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { + delegate.testGroupParameters(stringGroup, booleanGroup, int64Group, fut); + })); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index 5ec1d20e445..a29ac9987a3 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -467,6 +468,54 @@ No authorization required - **Content-Type**: application/x-www-form-urlencoded - **Accept**: Not defined + +# **testGroupParameters** +> testGroupParameters(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.ApiException; +//import org.openapitools.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +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(stringGroup, booleanGroup, int64Group); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testGroupParameters"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + # **testInlineAdditionalProperties** > testInlineAdditionalProperties(requestBody) diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java index bd18f677378..091f59ea27c 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -420,6 +420,40 @@ public class FakeApi { ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + *

400 - Someting wrong + * @param stringGroup String in group parameters + * @param booleanGroup Boolean in group parameters + * @param int64Group Integer in group parameters + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public Mono testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + Object postBody = null; + + String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "string_group", stringGroup)); + queryParams.putAll(apiClient.parameterToMultiValueMap(null, "int64_group", int64Group)); + + if (booleanGroup != null) + headerParams.add("boolean_group", apiClient.parameterToString(booleanGroup)); + + final String[] accepts = { }; + final List accept = apiClient.selectHeaderAccept(accepts); + final String[] contentTypes = { }; + final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); + + String[] authNames = new String[] { }; + + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(path, HttpMethod.DELETE, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + } /** * test inline additionalProperties * diff --git a/samples/client/petstore/jaxrs-cxf-client/pom.xml b/samples/client/petstore/jaxrs-cxf-client/pom.xml index cc10a903111..4a42e886115 100644 --- a/samples/client/petstore/jaxrs-cxf-client/pom.xml +++ b/samples/client/petstore/jaxrs-cxf-client/pom.xml @@ -167,8 +167,8 @@ 4.12 1.1.7 2.5 - 3.2.5 - 2.9.6 + 3.2.7 + 2.9.7 UTF-8 diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index 4ae16d9d864..fc3d0e453e9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -89,6 +89,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testClientModel**](docs/Api/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/Api/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**testGroupParameters**](docs/Api/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/Api/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/Api/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data *FakeClassnameTags123Api* | [**testClassname**](docs/Api/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index 324248a32da..c7c1a117fd8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -375,7 +376,6 @@ $config = OpenAPI\Client\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); - $apiInstance = new OpenAPI\Client\Api\FakeApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. @@ -501,6 +501,60 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **testGroupParameters** +> testGroupParameters($string_group, $boolean_group, $int64_group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```php +testGroupParameters($associate_array); +} catch (Exception $e) { + echo 'Exception when calling FakeApi->testGroupParameters: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +Note: the input parameter is an associative array with the keys listed as the parameter name below. + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **string_group** | **int**| String in group parameters | [optional] + **boolean_group** | **bool**| Boolean in group parameters | [optional] + **int64_group** | **int**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **testInlineAdditionalProperties** > testInlineAdditionalProperties($request_body) diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index bc3c5a80f64..6970621f06e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -2517,6 +2517,253 @@ class FakeApi ); } + /** + * Operation testGroupParameters + * + * Fake endpoint to test group parameters (optional) + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function testGroupParameters($associative_array) + { + $this->testGroupParametersWithHttpInfo($associative_array); + } + + /** + * Operation testGroupParametersWithHttpInfo + * + * Fake endpoint to test group parameters (optional) + * + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function testGroupParametersWithHttpInfo($associative_array) + { + $request = $this->testGroupParametersRequest($associative_array['string_group'], $associative_array['boolean_group'], $associative_array['int64_group']); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation testGroupParametersAsync + * + * Fake endpoint to test group parameters (optional) + * + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testGroupParametersAsync($associative_array) + { + return $this->testGroupParametersAsyncWithHttpInfo($associative_array) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testGroupParametersAsyncWithHttpInfo + * + * Fake endpoint to test group parameters (optional) + * + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testGroupParametersAsyncWithHttpInfo($associative_array) + { + $returnType = ''; + $request = $this->testGroupParametersRequest($associative_array); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testGroupParameters' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function testGroupParametersRequest($associative_array) + { + // unbox the parameters from the associative array + $string_group = array_key_exists('string_group', $associative_array) ? $associative_array['string_group'] : null; + $boolean_group = array_key_exists('boolean_group', $associative_array) ? $associative_array['boolean_group'] : null; + $int64_group = array_key_exists('int64_group', $associative_array) ? $associative_array['int64_group'] : null; + + + $resourcePath = '/fake'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($string_group !== null) { + $queryParams['string_group'] = ObjectSerializer::toQueryValue($string_group); + } + // query params + if ($int64_group !== null) { + $queryParams['int64_group'] = ObjectSerializer::toQueryValue($int64_group); + } + // header params + if ($boolean_group !== null) { + $headerParams['boolean_group'] = ObjectSerializer::toHeaderValue($boolean_group); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation testInlineAdditionalProperties * diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 9b5f6738ba3..eabfd782201 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -161,6 +161,16 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase { } + /** + * Test case for testGroupParameters + * + * Fake endpoint to test group parameters (optional). + * + */ + public function testTestGroupParameters() + { + } + /** * Test case for testInlineAdditionalProperties * diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index a6527129083..e24c1f857e0 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.2-SNAPSHOT \ No newline at end of file +3.3.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index 6e6dbf6180a..486a96573d6 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -80,6 +80,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data *FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md index 57cf9937d36..3d24cab0d3f 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters +[**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data @@ -486,6 +487,57 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_group_parameters** +> test_group_parameters(string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = petstore_api.FakeApi() +string_group = 56 # int | String in group parameters (optional) +boolean_group = True # bool | Boolean in group parameters (optional) +int64_group = 56 # int | Integer in group parameters (optional) + +try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) +except ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **string_group** | **int**| String in group parameters | [optional] + **boolean_group** | **bool**| Boolean in group parameters | [optional] + **int64_group** | **int**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_inline_additional_properties** > test_inline_additional_properties(request_body) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py index 00089d9a1e7..7d40ece7a24 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py @@ -599,7 +599,7 @@ class FakeApi(object): collection_formats=collection_formats) def test_client_model(self, client, **kwargs): # noqa: E501 - """To test \"client\" model # noqa: E501 + """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -621,7 +621,7 @@ class FakeApi(object): return data def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 - """To test \"client\" model # noqa: E501 + """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -803,7 +803,7 @@ class FakeApi(object): raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in local_var_params and not re.search('^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 @@ -815,7 +815,7 @@ class FakeApi(object): raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in local_var_params and not re.search('[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 if ('password' in local_var_params and len(local_var_params['password']) > 64): @@ -1009,6 +1009,102 @@ class FakeApi(object): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def test_group_parameters(self, **kwargs): # noqa: E501 + """Fake endpoint to test group parameters (optional) # noqa: E501 + + Fake endpoint to test group parameters (optional) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_group_parameters(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int string_group: String in group parameters + :param bool boolean_group: Boolean in group parameters + :param int int64_group: Integer in group parameters + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.test_group_parameters_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.test_group_parameters_with_http_info(**kwargs) # noqa: E501 + return data + + def test_group_parameters_with_http_info(self, **kwargs): # noqa: E501 + """Fake endpoint to test group parameters (optional) # noqa: E501 + + Fake endpoint to test group parameters (optional) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_group_parameters_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int string_group: String in group parameters + :param bool boolean_group: Boolean in group parameters + :param int int64_group: Integer in group parameters + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['string_group', 'boolean_group', 'int64_group'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method test_group_parameters" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'string_group' in local_var_params: + query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 + if 'int64_group' in local_var_params: + query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 + + header_params = {} + if 'boolean_group' in local_var_params: + header_params['boolean_group'] = local_var_params['boolean_group'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/fake', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501 """test inline additionalProperties # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index 7bd428edb5e..470a9fda624 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -45,6 +45,8 @@ class ApiClient(object): the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types @@ -58,14 +60,15 @@ class ApiClient(object): 'datetime': datetime.datetime, 'object': object, } + _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): + cookie=None, pool_threads=1): if configuration is None: configuration = Configuration() self.configuration = configuration + self.pool_threads = pool_threads - self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: @@ -75,8 +78,19 @@ class ApiClient(object): self.user_agent = 'OpenAPI-Generator/1.0.0/python' def __del__(self): - self.pool.close() - self.pool.join() + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + self._pool = ThreadPool(self.pool_threads) + return self._pool @property def user_agent(self): @@ -244,12 +258,12 @@ class ApiClient(object): if type(klass) == str: if klass.startswith('list['): - sub_kls = re.match('list\[(.*)\]', klass).group(1) + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('dict('): - sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py index 68c8953ee19..c7703d16607 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py @@ -269,8 +269,8 @@ class FormatTest(object): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search('[a-z]', string, flags=re.IGNORECASE): # noqa: E501 - raise ValueError("Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 + if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 self._string = string @@ -294,8 +294,8 @@ class FormatTest(object): """ if byte is None: raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 - if byte is not None and not re.search('^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 - raise ValueError("Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 + if byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 + raise ValueError(r"Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 self._byte = byte diff --git a/samples/client/petstore/python-asyncio/test_python3.sh b/samples/client/petstore/python-asyncio/test_python3.sh index 2e52066e9a5..01abf0b35b1 100755 --- a/samples/client/petstore/python-asyncio/test_python3.sh +++ b/samples/client/petstore/python-asyncio/test_python3.sh @@ -24,7 +24,7 @@ python setup.py develop tox || exit 1 ### static analysis of code -#flake8 --show-source petstore_api/ +flake8 --show-source petstore_api/ ### deactivate virtualenv #if [ $DEACTIVE == true ]; then diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index a6527129083..e24c1f857e0 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.2-SNAPSHOT \ No newline at end of file +3.3.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md index 6e6dbf6180a..486a96573d6 100644 --- a/samples/client/petstore/python-tornado/README.md +++ b/samples/client/petstore/python-tornado/README.md @@ -80,6 +80,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data *FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case diff --git a/samples/client/petstore/python-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md index 57cf9937d36..3d24cab0d3f 100644 --- a/samples/client/petstore/python-tornado/docs/FakeApi.md +++ b/samples/client/petstore/python-tornado/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters +[**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data @@ -486,6 +487,57 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_group_parameters** +> test_group_parameters(string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = petstore_api.FakeApi() +string_group = 56 # int | String in group parameters (optional) +boolean_group = True # bool | Boolean in group parameters (optional) +int64_group = 56 # int | Integer in group parameters (optional) + +try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) +except ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **string_group** | **int**| String in group parameters | [optional] + **boolean_group** | **bool**| Boolean in group parameters | [optional] + **int64_group** | **int**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_inline_additional_properties** > test_inline_additional_properties(request_body) diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py index 00089d9a1e7..7d40ece7a24 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py @@ -599,7 +599,7 @@ class FakeApi(object): collection_formats=collection_formats) def test_client_model(self, client, **kwargs): # noqa: E501 - """To test \"client\" model # noqa: E501 + """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -621,7 +621,7 @@ class FakeApi(object): return data def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 - """To test \"client\" model # noqa: E501 + """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -803,7 +803,7 @@ class FakeApi(object): raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in local_var_params and not re.search('^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 @@ -815,7 +815,7 @@ class FakeApi(object): raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in local_var_params and not re.search('[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 if ('password' in local_var_params and len(local_var_params['password']) > 64): @@ -1009,6 +1009,102 @@ class FakeApi(object): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def test_group_parameters(self, **kwargs): # noqa: E501 + """Fake endpoint to test group parameters (optional) # noqa: E501 + + Fake endpoint to test group parameters (optional) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_group_parameters(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int string_group: String in group parameters + :param bool boolean_group: Boolean in group parameters + :param int int64_group: Integer in group parameters + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.test_group_parameters_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.test_group_parameters_with_http_info(**kwargs) # noqa: E501 + return data + + def test_group_parameters_with_http_info(self, **kwargs): # noqa: E501 + """Fake endpoint to test group parameters (optional) # noqa: E501 + + Fake endpoint to test group parameters (optional) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_group_parameters_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int string_group: String in group parameters + :param bool boolean_group: Boolean in group parameters + :param int int64_group: Integer in group parameters + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['string_group', 'boolean_group', 'int64_group'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method test_group_parameters" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'string_group' in local_var_params: + query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 + if 'int64_group' in local_var_params: + query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 + + header_params = {} + if 'boolean_group' in local_var_params: + header_params['boolean_group'] = local_var_params['boolean_group'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/fake', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501 """test inline additionalProperties # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 0b4a1c83f8f..a9bdacf1d2c 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -46,6 +46,8 @@ class ApiClient(object): the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types @@ -59,14 +61,15 @@ class ApiClient(object): 'datetime': datetime.datetime, 'object': object, } + _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): + cookie=None, pool_threads=1): if configuration is None: configuration = Configuration() self.configuration = configuration + self.pool_threads = pool_threads - self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: @@ -76,8 +79,19 @@ class ApiClient(object): self.user_agent = 'OpenAPI-Generator/1.0.0/python' def __del__(self): - self.pool.close() - self.pool.join() + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + self._pool = ThreadPool(self.pool_threads) + return self._pool @property def user_agent(self): @@ -246,12 +260,12 @@ class ApiClient(object): if type(klass) == str: if klass.startswith('list['): - sub_kls = re.match('list\[(.*)\]', klass).group(1) + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('dict('): - sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} diff --git a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py index 68c8953ee19..c7703d16607 100644 --- a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py @@ -269,8 +269,8 @@ class FormatTest(object): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search('[a-z]', string, flags=re.IGNORECASE): # noqa: E501 - raise ValueError("Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 + if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 self._string = string @@ -294,8 +294,8 @@ class FormatTest(object): """ if byte is None: raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 - if byte is not None and not re.search('^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 - raise ValueError("Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 + if byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 + raise ValueError(r"Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 self._byte = byte diff --git a/samples/client/petstore/python-tornado/test_python2_and_3.sh b/samples/client/petstore/python-tornado/test_python2_and_3.sh index daf08d5bacb..7b5795ec24a 100755 --- a/samples/client/petstore/python-tornado/test_python2_and_3.sh +++ b/samples/client/petstore/python-tornado/test_python2_and_3.sh @@ -24,7 +24,7 @@ python setup.py develop tox || exit 1 ### static analysis of code -#flake8 --show-source petstore_api/ +flake8 --show-source petstore_api/ ### deactivate virtualenv #if [ $DEACTIVE == true ]; then diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index a6527129083..e24c1f857e0 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.2-SNAPSHOT \ No newline at end of file +3.3.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index 6e6dbf6180a..486a96573d6 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -80,6 +80,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data *FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index 57cf9937d36..3d24cab0d3f 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters +[**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data @@ -486,6 +487,57 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_group_parameters** +> test_group_parameters(string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = petstore_api.FakeApi() +string_group = 56 # int | String in group parameters (optional) +boolean_group = True # bool | Boolean in group parameters (optional) +int64_group = 56 # int | Integer in group parameters (optional) + +try: + # Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(string_group=string_group, boolean_group=boolean_group, int64_group=int64_group) +except ApiException as e: + print("Exception when calling FakeApi->test_group_parameters: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **string_group** | **int**| String in group parameters | [optional] + **boolean_group** | **bool**| Boolean in group parameters | [optional] + **int64_group** | **int**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_inline_additional_properties** > test_inline_additional_properties(request_body) diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index 00089d9a1e7..7d40ece7a24 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -599,7 +599,7 @@ class FakeApi(object): collection_formats=collection_formats) def test_client_model(self, client, **kwargs): # noqa: E501 - """To test \"client\" model # noqa: E501 + """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -621,7 +621,7 @@ class FakeApi(object): return data def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 - """To test \"client\" model # noqa: E501 + """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -803,7 +803,7 @@ class FakeApi(object): raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value less than or equal to `123.4`") # noqa: E501 if 'double' in local_var_params and local_var_params['double'] < 67.8: # noqa: E501 raise ValueError("Invalid value for parameter `double` when calling `test_endpoint_parameters`, must be a value greater than or equal to `67.8`") # noqa: E501 - if 'pattern_without_delimiter' in local_var_params and not re.search('^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 + if 'pattern_without_delimiter' in local_var_params and not re.search(r'^[A-Z].*', local_var_params['pattern_without_delimiter']): # noqa: E501 raise ValueError("Invalid value for parameter `pattern_without_delimiter` when calling `test_endpoint_parameters`, must conform to the pattern `/^[A-Z].*/`") # noqa: E501 if 'integer' in local_var_params and local_var_params['integer'] > 100: # noqa: E501 raise ValueError("Invalid value for parameter `integer` when calling `test_endpoint_parameters`, must be a value less than or equal to `100`") # noqa: E501 @@ -815,7 +815,7 @@ class FakeApi(object): raise ValueError("Invalid value for parameter `int32` when calling `test_endpoint_parameters`, must be a value greater than or equal to `20`") # noqa: E501 if 'float' in local_var_params and local_var_params['float'] > 987.6: # noqa: E501 raise ValueError("Invalid value for parameter `float` when calling `test_endpoint_parameters`, must be a value less than or equal to `987.6`") # noqa: E501 - if 'string' in local_var_params and not re.search('[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 + if 'string' in local_var_params and not re.search(r'[a-z]', local_var_params['string'], flags=re.IGNORECASE): # noqa: E501 raise ValueError("Invalid value for parameter `string` when calling `test_endpoint_parameters`, must conform to the pattern `/[a-z]/i`") # noqa: E501 if ('password' in local_var_params and len(local_var_params['password']) > 64): @@ -1009,6 +1009,102 @@ class FakeApi(object): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def test_group_parameters(self, **kwargs): # noqa: E501 + """Fake endpoint to test group parameters (optional) # noqa: E501 + + Fake endpoint to test group parameters (optional) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_group_parameters(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int string_group: String in group parameters + :param bool boolean_group: Boolean in group parameters + :param int int64_group: Integer in group parameters + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.test_group_parameters_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.test_group_parameters_with_http_info(**kwargs) # noqa: E501 + return data + + def test_group_parameters_with_http_info(self, **kwargs): # noqa: E501 + """Fake endpoint to test group parameters (optional) # noqa: E501 + + Fake endpoint to test group parameters (optional) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_group_parameters_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int string_group: String in group parameters + :param bool boolean_group: Boolean in group parameters + :param int int64_group: Integer in group parameters + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['string_group', 'boolean_group', 'int64_group'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method test_group_parameters" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'string_group' in local_var_params: + query_params.append(('string_group', local_var_params['string_group'])) # noqa: E501 + if 'int64_group' in local_var_params: + query_params.append(('int64_group', local_var_params['int64_group'])) # noqa: E501 + + header_params = {} + if 'boolean_group' in local_var_params: + header_params['boolean_group'] = local_var_params['boolean_group'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/fake', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def test_inline_additional_properties(self, request_body, **kwargs): # noqa: E501 """test inline additionalProperties # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index e90d9f7e205..a79d7ccf742 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -45,6 +45,8 @@ class ApiClient(object): the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types @@ -58,14 +60,15 @@ class ApiClient(object): 'datetime': datetime.datetime, 'object': object, } + _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): + cookie=None, pool_threads=1): if configuration is None: configuration = Configuration() self.configuration = configuration + self.pool_threads = pool_threads - self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: @@ -75,8 +78,19 @@ class ApiClient(object): self.user_agent = 'OpenAPI-Generator/1.0.0/python' def __del__(self): - self.pool.close() - self.pool.join() + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + self._pool = ThreadPool(self.pool_threads) + return self._pool @property def user_agent(self): @@ -244,12 +258,12 @@ class ApiClient(object): if type(klass) == str: if klass.startswith('list['): - sub_kls = re.match('list\[(.*)\]', klass).group(1) + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('dict('): - sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} diff --git a/samples/client/petstore/python/petstore_api/models/format_test.py b/samples/client/petstore/python/petstore_api/models/format_test.py index 68c8953ee19..c7703d16607 100644 --- a/samples/client/petstore/python/petstore_api/models/format_test.py +++ b/samples/client/petstore/python/petstore_api/models/format_test.py @@ -269,8 +269,8 @@ class FormatTest(object): :param string: The string of this FormatTest. # noqa: E501 :type: str """ - if string is not None and not re.search('[a-z]', string, flags=re.IGNORECASE): # noqa: E501 - raise ValueError("Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 + if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501 + raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501 self._string = string @@ -294,8 +294,8 @@ class FormatTest(object): """ if byte is None: raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501 - if byte is not None and not re.search('^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 - raise ValueError("Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 + if byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501 + raise ValueError(r"Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 self._byte = byte diff --git a/samples/client/petstore/python/test_python2_and_3.sh b/samples/client/petstore/python/test_python2_and_3.sh index daf08d5bacb..7b5795ec24a 100755 --- a/samples/client/petstore/python/test_python2_and_3.sh +++ b/samples/client/petstore/python/test_python2_and_3.sh @@ -24,7 +24,7 @@ python setup.py develop tox || exit 1 ### static analysis of code -#flake8 --show-source petstore_api/ +flake8 --show-source petstore_api/ ### deactivate virtualenv #if [ $DEACTIVE == true ]; then diff --git a/samples/client/petstore/ruby/Gemfile.lock b/samples/client/petstore/ruby/Gemfile.lock index 0a4edb9a91b..995e71af95b 100644 --- a/samples/client/petstore/ruby/Gemfile.lock +++ b/samples/client/petstore/ruby/Gemfile.lock @@ -13,7 +13,7 @@ GEM public_suffix (>= 2.0.2, < 4.0) autotest (4.4.6) ZenTest (>= 4.4.1) - autotest-fsevent (0.2.13) + autotest-fsevent (0.2.14) sys-uname autotest-growl (0.2.16) autotest-rails-pure (4.1.2) diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 68720d86002..17dab7764b2 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -84,6 +84,7 @@ Class | Method | HTTP request | Description *Petstore::FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *Petstore::FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *Petstore::FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters +*Petstore::FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *Petstore::FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *Petstore::FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data *Petstore::FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md index a0a9023412d..59edb6114f8 100644 --- a/samples/client/petstore/ruby/docs/FakeApi.md +++ b/samples/client/petstore/ruby/docs/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters +[**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data @@ -470,6 +471,56 @@ No authorization required +# **test_group_parameters** +> test_group_parameters(opts) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```ruby +# load the gem +require 'petstore' + +api_instance = Petstore::FakeApi.new +opts = { + string_group: 56, # Integer | String in group parameters + boolean_group: true, # BOOLEAN | Boolean in group parameters + int64_group: 56 # Integer | Integer in group parameters +} + +begin + #Fake endpoint to test group parameters (optional) + api_instance.test_group_parameters(opts) +rescue Petstore::ApiError => e + puts "Exception when calling FakeApi->test_group_parameters: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **string_group** | **Integer**| String in group parameters | [optional] + **boolean_group** | **BOOLEAN**| Boolean in group parameters | [optional] + **int64_group** | **Integer**| Integer in group parameters | [optional] + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + + # **test_inline_additional_properties** > test_inline_additional_properties(request_body) diff --git a/samples/client/petstore/ruby/docs/FormatTest.md b/samples/client/petstore/ruby/docs/FormatTest.md index ad9b8191dce..8682ea539e8 100644 --- a/samples/client/petstore/ruby/docs/FormatTest.md +++ b/samples/client/petstore/ruby/docs/FormatTest.md @@ -16,5 +16,7 @@ Name | Type | Description | Notes **date_time** | **DateTime** | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | +**pattern_with_digits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**pattern_with_digits_and_delimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index e006711f01e..f69b48b968f 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -625,6 +625,59 @@ module Petstore return data, status_code, headers end + # Fake endpoint to test group parameters (optional) + # Fake endpoint to test group parameters (optional) + # @param [Hash] opts the optional parameters + # @option opts [Integer] :string_group String in group parameters + # @option opts [BOOLEAN] :boolean_group Boolean in group parameters + # @option opts [Integer] :int64_group Integer in group parameters + # @return [nil] + def test_group_parameters(opts = {}) + test_group_parameters_with_http_info(opts) + nil + end + + # Fake endpoint to test group parameters (optional) + # Fake endpoint to test group parameters (optional) + # @param [Hash] opts the optional parameters + # @option opts [Integer] :string_group String in group parameters + # @option opts [BOOLEAN] :boolean_group Boolean in group parameters + # @option opts [Integer] :int64_group Integer in group parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def test_group_parameters_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FakeApi.test_group_parameters ...' + end + # resource path + local_var_path = '/fake' + + # query parameters + query_params = {} + query_params[:'string_group'] = opts[:'string_group'] if !opts[:'string_group'].nil? + query_params[:'int64_group'] = opts[:'int64_group'] if !opts[:'int64_group'].nil? + + # header parameters + header_params = {} + header_params[:'boolean_group'] = opts[:'boolean_group'] if !opts[:'boolean_group'].nil? + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FakeApi#test_group_parameters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # test inline additionalProperties # @param request_body request body # @param [Hash] opts the optional parameters diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index d987f8aa3bf..ea892a9ce0a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -40,6 +40,12 @@ module Petstore attr_accessor :password + # A string that is a 10 digit number. Can have leading zeros. + attr_accessor :pattern_with_digits + + # A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + attr_accessor :pattern_with_digits_and_delimiter + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -55,7 +61,9 @@ module Petstore :'date' => :'date', :'date_time' => :'dateTime', :'uuid' => :'uuid', - :'password' => :'password' + :'password' => :'password', + :'pattern_with_digits' => :'pattern_with_digits', + :'pattern_with_digits_and_delimiter' => :'pattern_with_digits_and_delimiter' } end @@ -74,7 +82,9 @@ module Petstore :'date' => :'Date', :'date_time' => :'DateTime', :'uuid' => :'String', - :'password' => :'String' + :'password' => :'String', + :'pattern_with_digits' => :'String', + :'pattern_with_digits_and_delimiter' => :'String' } end @@ -137,6 +147,14 @@ module Petstore if attributes.has_key?(:'password') self.password = attributes[:'password'] end + + if attributes.has_key?(:'pattern_with_digits') + self.pattern_with_digits = attributes[:'pattern_with_digits'] + end + + if attributes.has_key?(:'pattern_with_digits_and_delimiter') + self.pattern_with_digits_and_delimiter = attributes[:'pattern_with_digits_and_delimiter'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -211,6 +229,14 @@ module Petstore invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.') end + if !@pattern_with_digits.nil? && @pattern_with_digits !~ Regexp.new(/^\d{10}$/) + invalid_properties.push('invalid value for "pattern_with_digits", must conform to the pattern /^\d{10}$/.') + end + + if !@pattern_with_digits_and_delimiter.nil? && @pattern_with_digits_and_delimiter !~ Regexp.new(/^image_\d{1,3}$/i) + invalid_properties.push('invalid value for "pattern_with_digits_and_delimiter", must conform to the pattern /^image_\d{1,3}$/i.') + end + invalid_properties end @@ -234,6 +260,8 @@ module Petstore return false if @password.nil? return false if @password.to_s.length > 64 return false if @password.to_s.length < 10 + return false if !@pattern_with_digits.nil? && @pattern_with_digits !~ Regexp.new(/^\d{10}$/) + return false if !@pattern_with_digits_and_delimiter.nil? && @pattern_with_digits_and_delimiter !~ Regexp.new(/^image_\d{1,3}$/i) true end @@ -339,6 +367,26 @@ module Petstore @password = password end + # Custom attribute writer method with validation + # @param [Object] pattern_with_digits Value to be assigned + def pattern_with_digits=(pattern_with_digits) + if !pattern_with_digits.nil? && pattern_with_digits !~ Regexp.new(/^\d{10}$/) + fail ArgumentError, 'invalid value for "pattern_with_digits", must conform to the pattern /^\d{10}$/.' + end + + @pattern_with_digits = pattern_with_digits + end + + # Custom attribute writer method with validation + # @param [Object] pattern_with_digits_and_delimiter Value to be assigned + def pattern_with_digits_and_delimiter=(pattern_with_digits_and_delimiter) + if !pattern_with_digits_and_delimiter.nil? && pattern_with_digits_and_delimiter !~ Regexp.new(/^image_\d{1,3}$/i) + fail ArgumentError, 'invalid value for "pattern_with_digits_and_delimiter", must conform to the pattern /^image_\d{1,3}$/i.' + end + + @pattern_with_digits_and_delimiter = pattern_with_digits_and_delimiter + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -356,7 +404,9 @@ module Petstore date == o.date && date_time == o.date_time && uuid == o.uuid && - password == o.password + password == o.password && + pattern_with_digits == o.pattern_with_digits && + pattern_with_digits_and_delimiter == o.pattern_with_digits_and_delimiter end # @see the `==` method @@ -368,7 +418,7 @@ module Petstore # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [integer, int32, int64, number, float, double, string, byte, binary, date, date_time, uuid, password].hash + [integer, int32, int64, number, float, double, string, byte, binary, date, date_time, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash end # Builds the object from hash diff --git a/samples/client/petstore/ruby/spec/models/format_test_spec.rb b/samples/client/petstore/ruby/spec/models/format_test_spec.rb index 2fee049ec96..74f4fe9bedd 100644 --- a/samples/client/petstore/ruby/spec/models/format_test_spec.rb +++ b/samples/client/petstore/ruby/spec/models/format_test_spec.rb @@ -110,4 +110,31 @@ describe 'FormatTest' do end end + describe 'test attribute "pattern_with_digits"' do + it 'should accept string "1234567890"' do + @instance.pattern_with_digits = '1234567890' + end + + it 'should accept string with leading zero "0123456789"' do + @instance.pattern_with_digits = '0123456789' + end + + it 'should reject string with non digits "ABC3456789"' do + expect {@instance.pattern_with_digits = 'ABC3456789'}.to raise_error(ArgumentError) + end + + it 'should reject string less than 10 in length "123456789"' do + expect {@instance.pattern_with_digits = '123456789'}.to raise_error(ArgumentError) + end + + it 'should reject string more than 10 in length "0123456789123"' do + expect {@instance.pattern_with_digits = '0123456789123'}.to raise_error(ArgumentError) + end + end + + describe 'test attribute "pattern_with_digits_and_delimiter"' do + it 'should accept string "Image_01"' do + @instance.pattern_with_digits_and_delimiter = 'Image_01' + end + end end diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index dae4ea2181e..3ce216637bf 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -28,7 +28,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index 4cb343936df..05bef966b93 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -31,7 +31,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -51,7 +51,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -71,7 +71,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index df461be5774..8d4fde5b5d8 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -75,7 +75,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -115,7 +115,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -135,7 +135,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -156,7 +156,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -176,7 +176,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 26e9e4e319f..e4e1a0fd7d3 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -80,7 +80,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -100,7 +100,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -121,7 +121,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -147,7 +147,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -176,7 +176,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -197,7 +197,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index f47a452ecdd..7dc45a89cb0 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -28,7 +28,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index 7d558a10277..fb37ee9c79c 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -46,7 +46,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -66,7 +66,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -86,7 +86,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -106,7 +106,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -126,7 +126,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -146,7 +146,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -166,7 +166,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java index dae4ea2181e..3ce216637bf 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -28,7 +28,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java index 4cb343936df..05bef966b93 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -31,7 +31,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -51,7 +51,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -71,7 +71,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index df461be5774..8d4fde5b5d8 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -75,7 +75,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -115,7 +115,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -135,7 +135,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -156,7 +156,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -176,7 +176,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index 26e9e4e319f..e4e1a0fd7d3 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -80,7 +80,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -100,7 +100,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -121,7 +121,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -147,7 +147,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -176,7 +176,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -197,7 +197,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java index f47a452ecdd..7dc45a89cb0 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -28,7 +28,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java index 7d558a10277..fb37ee9c79c 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -46,7 +46,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -66,7 +66,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -86,7 +86,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -106,7 +106,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -126,7 +126,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -146,7 +146,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -166,7 +166,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts index 71926b6af58..6692083bc3c 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts @@ -540,7 +540,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -613,7 +613,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts index 71926b6af58..6692083bc3c 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts @@ -540,7 +540,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -613,7 +613,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts index 3a8f92b9713..ce0fff0717f 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts @@ -541,7 +541,7 @@ export class PetService implements PetServiceInterface { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -614,7 +614,7 @@ export class PetService implements PetServiceInterface { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts index 39132299161..a982e419569 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts @@ -415,7 +415,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -485,7 +485,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts index 71926b6af58..6692083bc3c 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts @@ -540,7 +540,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -613,7 +613,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts index 5d494f52dea..82575f519aa 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts @@ -415,7 +415,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -485,7 +485,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts index 5d494f52dea..82575f519aa 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -415,7 +415,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -485,7 +485,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts index 8af05a1c521..e002c9a15cd 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts @@ -417,7 +417,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -487,7 +487,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts index 8af05a1c521..e002c9a15cd 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts @@ -417,7 +417,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; if (useForm) { @@ -487,7 +487,7 @@ export class PetService { const canConsumeForm = this.canConsumeForm(consumes); - let formParams: { append(param: string, value: any): void; }; + let formParams: { append(param: string, value: any): any; }; let useForm = false; let convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md index d96d603e9c6..6ab6d44eaa5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testClientModel**](docs/Api/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/Api/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**testGroupParameters**](docs/Api/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/Api/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/Api/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data *FakeClassnameTags123Api* | [**testClassname**](docs/Api/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index 12018e0ece7..e3d7f5e2051 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -13,6 +13,7 @@ Method | HTTP request | Description [**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 @@ -375,7 +376,6 @@ $config = OpenAPI\Client\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); - $apiInstance = new OpenAPI\Client\Api\FakeApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. @@ -501,6 +501,60 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **testGroupParameters** +> testGroupParameters($string_group, $boolean_group, $int64_group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```php +testGroupParameters($associate_array); +} catch (Exception $e) { + echo 'Exception when calling FakeApi->testGroupParameters: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +Note: the input parameter is an associative array with the keys listed as the parameter name below. + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **string_group** | **int**| String in group parameters | [optional] + **boolean_group** | **bool**| Boolean in group parameters | [optional] + **int64_group** | **int**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **testInlineAdditionalProperties** > testInlineAdditionalProperties($request_body) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md index e106ff1eba2..c27cc2cf209 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **date_time** | [**\DateTime**](\DateTime.md) | | [optional] **uuid** | **string** | | [optional] **password** | **string** | | +**pattern_with_digits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**pattern_with_digits_and_delimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 9cd51d19e9c..984d6b7f972 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -2517,6 +2517,253 @@ class FakeApi ); } + /** + * Operation testGroupParameters + * + * Fake endpoint to test group parameters (optional) + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function testGroupParameters($associative_array) + { + $this->testGroupParametersWithHttpInfo($associative_array); + } + + /** + * Operation testGroupParametersWithHttpInfo + * + * Fake endpoint to test group parameters (optional) + * + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function testGroupParametersWithHttpInfo($associative_array) + { + $request = $this->testGroupParametersRequest($associative_array['string_group'], $associative_array['boolean_group'], $associative_array['int64_group']); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation testGroupParametersAsync + * + * Fake endpoint to test group parameters (optional) + * + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testGroupParametersAsync($associative_array) + { + return $this->testGroupParametersAsyncWithHttpInfo($associative_array) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testGroupParametersAsyncWithHttpInfo + * + * Fake endpoint to test group parameters (optional) + * + * Note: the inpput parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testGroupParametersAsyncWithHttpInfo($associative_array) + { + $returnType = ''; + $request = $this->testGroupParametersRequest($associative_array); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testGroupParameters' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * @param int $string_group String in group parameters (optional) + * @param bool $boolean_group Boolean in group parameters (optional) + * @param int $int64_group Integer in group parameters (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function testGroupParametersRequest($associative_array) + { + // unbox the parameters from the associative array + $string_group = array_key_exists('string_group', $associative_array) ? $associative_array['string_group'] : null; + $boolean_group = array_key_exists('boolean_group', $associative_array) ? $associative_array['boolean_group'] : null; + $int64_group = array_key_exists('int64_group', $associative_array) ? $associative_array['int64_group'] : null; + + + $resourcePath = '/fake'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($string_group !== null) { + $queryParams['string_group'] = ObjectSerializer::toQueryValue($string_group); + } + // query params + if ($int64_group !== null) { + $queryParams['int64_group'] = ObjectSerializer::toQueryValue($int64_group); + } + // header params + if ($boolean_group !== null) { + $headerParams['boolean_group'] = ObjectSerializer::toHeaderValue($boolean_group); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation testInlineAdditionalProperties * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 05404e176e6..240c381b078 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -69,7 +69,9 @@ class FormatTest implements ModelInterface, ArrayAccess 'date' => '\DateTime', 'date_time' => '\DateTime', 'uuid' => 'string', - 'password' => 'string' + 'password' => 'string', + 'pattern_with_digits' => 'string', + 'pattern_with_digits_and_delimiter' => 'string' ]; /** @@ -90,7 +92,9 @@ class FormatTest implements ModelInterface, ArrayAccess 'date' => 'date', 'date_time' => 'date-time', 'uuid' => 'uuid', - 'password' => 'password' + 'password' => 'password', + 'pattern_with_digits' => null, + 'pattern_with_digits_and_delimiter' => null ]; /** @@ -132,7 +136,9 @@ class FormatTest implements ModelInterface, ArrayAccess 'date' => 'date', 'date_time' => 'dateTime', 'uuid' => 'uuid', - 'password' => 'password' + 'password' => 'password', + 'pattern_with_digits' => 'pattern_with_digits', + 'pattern_with_digits_and_delimiter' => 'pattern_with_digits_and_delimiter' ]; /** @@ -153,7 +159,9 @@ class FormatTest implements ModelInterface, ArrayAccess 'date' => 'setDate', 'date_time' => 'setDateTime', 'uuid' => 'setUuid', - 'password' => 'setPassword' + 'password' => 'setPassword', + 'pattern_with_digits' => 'setPatternWithDigits', + 'pattern_with_digits_and_delimiter' => 'setPatternWithDigitsAndDelimiter' ]; /** @@ -174,7 +182,9 @@ class FormatTest implements ModelInterface, ArrayAccess 'date' => 'getDate', 'date_time' => 'getDateTime', 'uuid' => 'getUuid', - 'password' => 'getPassword' + 'password' => 'getPassword', + 'pattern_with_digits' => 'getPatternWithDigits', + 'pattern_with_digits_and_delimiter' => 'getPatternWithDigitsAndDelimiter' ]; /** @@ -250,6 +260,8 @@ class FormatTest implements ModelInterface, ArrayAccess $this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null; $this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; $this->container['password'] = isset($data['password']) ? $data['password'] : null; + $this->container['pattern_with_digits'] = isset($data['pattern_with_digits']) ? $data['pattern_with_digits'] : null; + $this->container['pattern_with_digits_and_delimiter'] = isset($data['pattern_with_digits_and_delimiter']) ? $data['pattern_with_digits_and_delimiter'] : null; } /** @@ -325,6 +337,14 @@ class FormatTest implements ModelInterface, ArrayAccess $invalidProperties[] = "invalid value for 'password', the character length must be bigger than or equal to 10."; } + if (!is_null($this->container['pattern_with_digits']) && !preg_match("/^\\d{10}$/", $this->container['pattern_with_digits'])) { + $invalidProperties[] = "invalid value for 'pattern_with_digits', must be conform to the pattern /^\\d{10}$/."; + } + + if (!is_null($this->container['pattern_with_digits_and_delimiter']) && !preg_match("/^image_\\d{1,3}$/i", $this->container['pattern_with_digits_and_delimiter'])) { + $invalidProperties[] = "invalid value for 'pattern_with_digits_and_delimiter', must be conform to the pattern /^image_\\d{1,3}$/i."; + } + return $invalidProperties; } @@ -703,6 +723,64 @@ class FormatTest implements ModelInterface, ArrayAccess return $this; } + + /** + * Gets pattern_with_digits + * + * @return string|null + */ + public function getPatternWithDigits() + { + return $this->container['pattern_with_digits']; + } + + /** + * Sets pattern_with_digits + * + * @param string|null $pattern_with_digits A string that is a 10 digit number. Can have leading zeros. + * + * @return $this + */ + public function setPatternWithDigits($pattern_with_digits) + { + + if (!is_null($pattern_with_digits) && (!preg_match("/^\\d{10}$/", $pattern_with_digits))) { + throw new \InvalidArgumentException("invalid value for $pattern_with_digits when calling FormatTest., must conform to the pattern /^\\d{10}$/."); + } + + $this->container['pattern_with_digits'] = $pattern_with_digits; + + return $this; + } + + /** + * Gets pattern_with_digits_and_delimiter + * + * @return string|null + */ + public function getPatternWithDigitsAndDelimiter() + { + return $this->container['pattern_with_digits_and_delimiter']; + } + + /** + * Sets pattern_with_digits_and_delimiter + * + * @param string|null $pattern_with_digits_and_delimiter A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * + * @return $this + */ + public function setPatternWithDigitsAndDelimiter($pattern_with_digits_and_delimiter) + { + + if (!is_null($pattern_with_digits_and_delimiter) && (!preg_match("/^image_\\d{1,3}$/i", $pattern_with_digits_and_delimiter))) { + throw new \InvalidArgumentException("invalid value for $pattern_with_digits_and_delimiter when calling FormatTest., must conform to the pattern /^image_\\d{1,3}$/i."); + } + + $this->container['pattern_with_digits_and_delimiter'] = $pattern_with_digits_and_delimiter; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 9b5f6738ba3..eabfd782201 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -161,6 +161,16 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase { } + /** + * Test case for testGroupParameters + * + * Fake endpoint to test group parameters (optional). + * + */ + public function testTestGroupParameters() + { + } + /** * Test case for testInlineAdditionalProperties * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index efe91f079fe..48d76711345 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -166,4 +166,18 @@ class FormatTestTest extends \PHPUnit_Framework_TestCase public function testPropertyPassword() { } + + /** + * Test attribute "pattern_with_digits" + */ + public function testPropertyPatternWithDigits() + { + } + + /** + * Test attribute "pattern_with_digits_and_delimiter" + */ + public function testPropertyPatternWithDigitsAndDelimiter() + { + } } diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index 6d94c9c2e12..875e2d486ac 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.0-SNAPSHOT \ No newline at end of file +3.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql index 808ea185ea5..5870b90fab9 100644 --- a/samples/schema/petstore/mysql/mysql_schema.sql +++ b/samples/schema/petstore/mysql/mysql_schema.sql @@ -106,7 +106,7 @@ CREATE TABLE IF NOT EXISTS `Cat` ( CREATE TABLE IF NOT EXISTS `Category` ( `id` BIGINT DEFAULT NULL, - `name` TEXT DEFAULT NULL + `name` TEXT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 6d94c9c2e12..e24c1f857e0 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.0-SNAPSHOT \ No newline at end of file +3.3.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-pistache/api/PetApi.h b/samples/server/petstore/cpp-pistache/api/PetApi.h index 5f4e983458e..d34ff4afa7e 100644 --- a/samples/server/petstore/cpp-pistache/api/PetApi.h +++ b/samples/server/petstore/cpp-pistache/api/PetApi.h @@ -22,9 +22,9 @@ #include #include #include - #include + #include "ApiResponse.h" #include "Pet.h" #include diff --git a/samples/server/petstore/cpp-pistache/api/StoreApi.h b/samples/server/petstore/cpp-pistache/api/StoreApi.h index e75f9374d08..53117f32a2e 100644 --- a/samples/server/petstore/cpp-pistache/api/StoreApi.h +++ b/samples/server/petstore/cpp-pistache/api/StoreApi.h @@ -22,9 +22,9 @@ #include #include #include - #include + #include "Order.h" #include #include diff --git a/samples/server/petstore/cpp-pistache/api/UserApi.cpp b/samples/server/petstore/cpp-pistache/api/UserApi.cpp index 62dc29967ee..b534b87f219 100644 --- a/samples/server/petstore/cpp-pistache/api/UserApi.cpp +++ b/samples/server/petstore/cpp-pistache/api/UserApi.cpp @@ -71,7 +71,7 @@ void UserApi::create_users_with_array_input_handler(const Pistache::Rest::Reques try { nlohmann::json request_body = nlohmann::json::parse(request.body()); - user = ModelArrayHelper::fromJson(request_body); + user = ArrayHelper::fromJson(request_body); this->create_users_with_array_input(user, response); } catch (std::runtime_error & e) { //send a 400 error @@ -87,7 +87,7 @@ void UserApi::create_users_with_list_input_handler(const Pistache::Rest::Request try { nlohmann::json request_body = nlohmann::json::parse(request.body()); - user = ModelArrayHelper::fromJson(request_body); + user = ArrayHelper::fromJson(request_body); this->create_users_with_list_input(user, response); } catch (std::runtime_error & e) { //send a 400 error diff --git a/samples/server/petstore/cpp-pistache/api/UserApi.h b/samples/server/petstore/cpp-pistache/api/UserApi.h index cd81b195ed0..8ec6bb5692f 100644 --- a/samples/server/petstore/cpp-pistache/api/UserApi.h +++ b/samples/server/petstore/cpp-pistache/api/UserApi.h @@ -22,9 +22,9 @@ #include #include #include - #include + #include "User.h" #include #include diff --git a/samples/server/petstore/cpp-pistache/model/ApiResponse.cpp b/samples/server/petstore/cpp-pistache/model/ApiResponse.cpp index b565e4b2675..d316194ce8c 100644 --- a/samples/server/petstore/cpp-pistache/model/ApiResponse.cpp +++ b/samples/server/petstore/cpp-pistache/model/ApiResponse.cpp @@ -59,7 +59,7 @@ nlohmann::json ApiResponse::toJson() const return val; } -void ApiResponse::fromJson(nlohmann::json& val) +void ApiResponse::fromJson(const nlohmann::json& val) { if(val.find("code") != val.end()) { diff --git a/samples/server/petstore/cpp-pistache/model/ApiResponse.h b/samples/server/petstore/cpp-pistache/model/ApiResponse.h index 51c96e3838c..fb8cc43693f 100644 --- a/samples/server/petstore/cpp-pistache/model/ApiResponse.h +++ b/samples/server/petstore/cpp-pistache/model/ApiResponse.h @@ -44,7 +44,7 @@ public: void validate() override; nlohmann::json toJson() const override; - void fromJson(nlohmann::json& json) override; + void fromJson(const nlohmann::json& json) override; ///////////////////////////////////////////// /// ApiResponse members diff --git a/samples/server/petstore/cpp-pistache/model/Category.cpp b/samples/server/petstore/cpp-pistache/model/Category.cpp index a5a67cba1b8..9ae18edc686 100644 --- a/samples/server/petstore/cpp-pistache/model/Category.cpp +++ b/samples/server/petstore/cpp-pistache/model/Category.cpp @@ -53,7 +53,7 @@ nlohmann::json Category::toJson() const return val; } -void Category::fromJson(nlohmann::json& val) +void Category::fromJson(const nlohmann::json& val) { if(val.find("id") != val.end()) { diff --git a/samples/server/petstore/cpp-pistache/model/Category.h b/samples/server/petstore/cpp-pistache/model/Category.h index 19b951a44e7..4ed3fafc8c8 100644 --- a/samples/server/petstore/cpp-pistache/model/Category.h +++ b/samples/server/petstore/cpp-pistache/model/Category.h @@ -44,7 +44,7 @@ public: void validate() override; nlohmann::json toJson() const override; - void fromJson(nlohmann::json& json) override; + void fromJson(const nlohmann::json& json) override; ///////////////////////////////////////////// /// Category members diff --git a/samples/server/petstore/cpp-pistache/model/ModelBase.h b/samples/server/petstore/cpp-pistache/model/ModelBase.h index 98afcd48d78..6bc0dc92124 100644 --- a/samples/server/petstore/cpp-pistache/model/ModelBase.h +++ b/samples/server/petstore/cpp-pistache/model/ModelBase.h @@ -39,7 +39,7 @@ public: virtual void validate() = 0; virtual nlohmann::json toJson() const = 0; - virtual void fromJson(nlohmann::json& json) = 0; + virtual void fromJson(const nlohmann::json& json) = 0; static std::string toJson( std::string const& value ); static std::string toJson( std::time_t const& value ); @@ -50,100 +50,85 @@ public: static nlohmann::json toJson(ModelBase const& content ); }; -class ModelArrayHelper { -public: - template - static std::vector fromJson(nlohmann::json& json) { - T *ptrTest; - std::vector val; - if (dynamic_cast(ptrTest) != nullptr) { - if (!json.empty()) { - for (auto &item : json.items()) { - T entry; - entry.fromJson(item.value()); - val.push_back(entry); - } - } - } - return val; - } - template - static nlohmann::json toJson(std::vector val) { - nlohmann::json json; - for(auto item : val){ - json.push_back(item.toJson()); - } - return json; - } -}; - class ArrayHelper { +private: + template::value>::value> + static void itemFromJson(T& item, const nlohmann::json& json){ + item = json; + } + static void itemFromJson(ModelBase& item, const nlohmann::json& json){ + item.fromJson(json); + } + template::value>::value> + static nlohmann::json itemtoJson(const T& item){ + return item; + } + static nlohmann::json itemtoJson(const ModelBase& item){ + return item.toJson(); + } public: - template - static std::vector fromJson(nlohmann::json& json) { - std::vector val; - nlohmann::from_json(json, val); - return val; - } - template - static nlohmann::json toJson(std::vector val) { - nlohmann::json json; - nlohmann::to_json(json, val); - return json; - } -}; - -class ModelMapHelper { -public: - template - static std::map & fromJson(nlohmann::json& json) { - T *ptrTest; - std::map val; - if (dynamic_cast(ptrTest) != nullptr) { - if (!json.empty()) { - for (auto &item : json.items()) { - T entry; - entry.fromJson(item.value()); - val.insert(val.end(), - std::pair(item.key(), entry)); - } - } - } - return val; - } - template - static nlohmann::json toJson(std::map val) { - nlohmann::json json; - for (auto const& item : val) { - json[item.first] = item.second.toJson(); - } - return json; - } + template + static std::vector fromJson(const nlohmann::json& json) { + std::vector val; + if (!json.empty()) { + for (const auto& item : json.items()) { + T entry; + itemFromJson(entry, item.value()); + val.push_back(entry); + } + } + return val; + } + template + static nlohmann::json toJson(const std::vector& val) { + nlohmann::json json; + for(const auto& item : val){ + json.push_back(itemtoJson(item)); + } + return json; + } }; class MapHelper { +private: + template::value>::value> + static void itemFromJson(T &item, const nlohmann::json& json){ + item = json; + } + static void itemFromJson(ModelBase &item, const nlohmann::json& json){ + item.fromJson(json); + } + template::value>::value> + static nlohmann::json itemtoJson(const T& item){ + return item; + } + static nlohmann::json itemtoJson(const ModelBase& item){ + return item.toJson(); + } + public: - template - static std::map & fromJson(nlohmann::json& json) { - std::map val; - if (!json.empty()) { - for (auto &item : json.items()) { - T entry = item.value(); - val.insert(val.end(), - std::pair(item.key(), entry)); - } - } - return val; - } - template - static nlohmann::json toJson(std::map val) { - nlohmann::json json; - for (auto const& item : val) { - nlohmann::json jitem = item.second; - json[item.first] = jitem; - } - return json; - } + template + static std::map fromJson(const nlohmann::json& json) { + std::map val; + if (!json.empty()) { + for (const auto& item : json.items()) { + T entry; + itemfromJson(entry, item.value()); + val.insert(val.end(), + std::pair(item.key(), entry)); + } + } + return val; + } + template + static nlohmann::json toJson(const std::map& val) { + nlohmann::json json; + for (const auto& item : val) { + nlohmann::json jitem = itemtoJson(item.second); + json[item.first] = jitem; + } + return json; + } }; } diff --git a/samples/server/petstore/cpp-pistache/model/Order.cpp b/samples/server/petstore/cpp-pistache/model/Order.cpp index 223fa7cfe99..6baadd493ac 100644 --- a/samples/server/petstore/cpp-pistache/model/Order.cpp +++ b/samples/server/petstore/cpp-pistache/model/Order.cpp @@ -77,7 +77,7 @@ nlohmann::json Order::toJson() const return val; } -void Order::fromJson(nlohmann::json& val) +void Order::fromJson(const nlohmann::json& val) { if(val.find("id") != val.end()) { diff --git a/samples/server/petstore/cpp-pistache/model/Order.h b/samples/server/petstore/cpp-pistache/model/Order.h index 548f9de0614..bc77d091059 100644 --- a/samples/server/petstore/cpp-pistache/model/Order.h +++ b/samples/server/petstore/cpp-pistache/model/Order.h @@ -44,7 +44,7 @@ public: void validate() override; nlohmann::json toJson() const override; - void fromJson(nlohmann::json& json) override; + void fromJson(const nlohmann::json& json) override; ///////////////////////////////////////////// /// Order members diff --git a/samples/server/petstore/cpp-pistache/model/Pet.cpp b/samples/server/petstore/cpp-pistache/model/Pet.cpp index ec3738e3510..834ac8ff632 100644 --- a/samples/server/petstore/cpp-pistache/model/Pet.cpp +++ b/samples/server/petstore/cpp-pistache/model/Pet.cpp @@ -59,7 +59,8 @@ nlohmann::json Pet::toJson() const jsonArray.push_back(ModelBase::toJson(item)); } val["photoUrls"] = jsonArray; - } + + } { nlohmann::json jsonArray; for( auto& item : m_Tags ) @@ -70,7 +71,7 @@ nlohmann::json Pet::toJson() const if(jsonArray.size() > 0) { val["tags"] = jsonArray; - } + } } if(m_StatusIsSet) { @@ -81,7 +82,7 @@ nlohmann::json Pet::toJson() const return val; } -void Pet::fromJson(nlohmann::json& val) +void Pet::fromJson(const nlohmann::json& val) { if(val.find("id") != val.end()) { @@ -100,33 +101,31 @@ void Pet::fromJson(nlohmann::json& val) setName(val.at("name")); { m_PhotoUrls.clear(); - nlohmann::json jsonArray; - for( auto& item : val["photoUrls"] ) - { - m_PhotoUrls.push_back(item); - - } + for( auto& item : val["photoUrls"] ) + { + m_PhotoUrls.push_back(item); + + } } { m_Tags.clear(); - nlohmann::json jsonArray; if(val.find("tags") != val.end()) { - for( auto& item : val["tags"] ) - { - - if(item.is_null()) + for( auto& item : val["tags"] ) { - m_Tags.push_back( Tag() ); + + if(item.is_null()) + { + m_Tags.push_back( Tag() ); + } + else + { + Tag newItem; + newItem.fromJson(item); + m_Tags.push_back( newItem ); + } + } - else - { - Tag newItem; - newItem.fromJson(item); - m_Tags.push_back( newItem ); - } - - } } } if(val.find("status") != val.end()) diff --git a/samples/server/petstore/cpp-pistache/model/Pet.h b/samples/server/petstore/cpp-pistache/model/Pet.h index 4117dcf468d..6f7e9a565a6 100644 --- a/samples/server/petstore/cpp-pistache/model/Pet.h +++ b/samples/server/petstore/cpp-pistache/model/Pet.h @@ -47,7 +47,7 @@ public: void validate() override; nlohmann::json toJson() const override; - void fromJson(nlohmann::json& json) override; + void fromJson(const nlohmann::json& json) override; ///////////////////////////////////////////// /// Pet members diff --git a/samples/server/petstore/cpp-pistache/model/Tag.cpp b/samples/server/petstore/cpp-pistache/model/Tag.cpp index 6fdab108957..9efe5aeb9db 100644 --- a/samples/server/petstore/cpp-pistache/model/Tag.cpp +++ b/samples/server/petstore/cpp-pistache/model/Tag.cpp @@ -53,7 +53,7 @@ nlohmann::json Tag::toJson() const return val; } -void Tag::fromJson(nlohmann::json& val) +void Tag::fromJson(const nlohmann::json& val) { if(val.find("id") != val.end()) { diff --git a/samples/server/petstore/cpp-pistache/model/Tag.h b/samples/server/petstore/cpp-pistache/model/Tag.h index 1b5d79e31c9..f46aecf78b4 100644 --- a/samples/server/petstore/cpp-pistache/model/Tag.h +++ b/samples/server/petstore/cpp-pistache/model/Tag.h @@ -44,7 +44,7 @@ public: void validate() override; nlohmann::json toJson() const override; - void fromJson(nlohmann::json& json) override; + void fromJson(const nlohmann::json& json) override; ///////////////////////////////////////////// /// Tag members diff --git a/samples/server/petstore/cpp-pistache/model/User.cpp b/samples/server/petstore/cpp-pistache/model/User.cpp index cd93eadd64e..186fc58924d 100644 --- a/samples/server/petstore/cpp-pistache/model/User.cpp +++ b/samples/server/petstore/cpp-pistache/model/User.cpp @@ -89,7 +89,7 @@ nlohmann::json User::toJson() const return val; } -void User::fromJson(nlohmann::json& val) +void User::fromJson(const nlohmann::json& val) { if(val.find("id") != val.end()) { diff --git a/samples/server/petstore/cpp-pistache/model/User.h b/samples/server/petstore/cpp-pistache/model/User.h index b9a53345866..a52a183cd46 100644 --- a/samples/server/petstore/cpp-pistache/model/User.h +++ b/samples/server/petstore/cpp-pistache/model/User.h @@ -44,7 +44,7 @@ public: void validate() override; nlohmann::json toJson() const override; - void fromJson(nlohmann::json& json) override; + void fromJson(const nlohmann::json& json) override; ///////////////////////////////////////////// /// User members diff --git a/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION b/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION index f4cb97d56ce..a6527129083 100644 --- a/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION +++ b/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.1-SNAPSHOT \ No newline at end of file +3.3.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion-python2/requirements.txt b/samples/server/petstore/flaskConnexion-python2/requirements.txt index 27cb3a2fb7f..c764c056b3b 100644 --- a/samples/server/petstore/flaskConnexion-python2/requirements.txt +++ b/samples/server/petstore/flaskConnexion-python2/requirements.txt @@ -1,4 +1,4 @@ -connexion == 2.0.0rc3 +connexion == 2.0.0 swagger-ui-bundle == 0.0.2 python_dateutil == 2.6.0 typing == 3.5.2.2 diff --git a/samples/server/petstore/flaskConnexion-python2/setup.py b/samples/server/petstore/flaskConnexion-python2/setup.py index c8796a1f6e2..e18faf930bc 100644 --- a/samples/server/petstore/flaskConnexion-python2/setup.py +++ b/samples/server/petstore/flaskConnexion-python2/setup.py @@ -13,7 +13,12 @@ VERSION = "1.0.0" # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = ["connexion"] +REQUIRES = [ + "connexion==2.0.0", + "swagger-ui-bundle==0.0.2", + "python_dateutil==2.6.0", + "typing==3.5.2.2" +] setup( name=NAME, diff --git a/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION b/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION index f4cb97d56ce..a6527129083 100644 --- a/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION +++ b/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.1-SNAPSHOT \ No newline at end of file +3.3.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion/requirements.txt b/samples/server/petstore/flaskConnexion/requirements.txt index 0e74fd81c3e..52aca69de9a 100644 --- a/samples/server/petstore/flaskConnexion/requirements.txt +++ b/samples/server/petstore/flaskConnexion/requirements.txt @@ -1,4 +1,4 @@ -connexion == 2.0.0rc3 +connexion == 2.0.0 swagger-ui-bundle == 0.0.2 python_dateutil == 2.6.0 setuptools >= 21.0.0 diff --git a/samples/server/petstore/flaskConnexion/setup.py b/samples/server/petstore/flaskConnexion/setup.py index c8796a1f6e2..9d7b02fbd90 100644 --- a/samples/server/petstore/flaskConnexion/setup.py +++ b/samples/server/petstore/flaskConnexion/setup.py @@ -13,7 +13,11 @@ VERSION = "1.0.0" # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = ["connexion"] +REQUIRES = [ + "connexion==2.0.0", + "swagger-ui-bundle==0.0.2", + "python_dateutil==2.6.0" +] setup( name=NAME, diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml index 4b3f46c5c95..d63db78d634 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml @@ -197,8 +197,8 @@ 1.1.7 2.5 1.1.0.Final - 3.2.5 - 2.9.6 + 3.2.7 + 2.9.7 UTF-8 diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml index d419e953f5d..51d11ce59b6 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml @@ -197,8 +197,8 @@ 1.1.7 2.5 1.1.0.Final - 3.2.5 - 2.9.6 + 3.2.7 + 2.9.7 UTF-8 diff --git a/samples/server/petstore/jaxrs-cxf/pom.xml b/samples/server/petstore/jaxrs-cxf/pom.xml index d943dae8ac0..b12deeace2d 100644 --- a/samples/server/petstore/jaxrs-cxf/pom.xml +++ b/samples/server/petstore/jaxrs-cxf/pom.xml @@ -197,8 +197,8 @@ 1.1.7 2.5 1.1.0.Final - 3.2.5 - 2.9.6 + 3.2.7 + 2.9.7 UTF-8 diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java index dc4ad757c7b..b212f1c67d1 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java @@ -130,6 +130,19 @@ public interface FakeApi { @ApiResponse(code = 404, message = "Not found") }) public void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") @DefaultValue("new ArrayList()") List enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString); + /** + * Fake endpoint to test group parameters (optional) + * + * Fake endpoint to test group parameters (optional) + * + */ + @DELETE + @Path("/fake") + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + public void testGroupParameters(@QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group); + /** * test inline additionalProperties * diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 733a9c074e6..812581c5b14 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -101,6 +101,18 @@ public class FakeApiServiceImpl implements FakeApi { // TODO: Implement... + } + + /** + * Fake endpoint to test group parameters (optional) + * + * Fake endpoint to test group parameters (optional) + * + */ + public void testGroupParameters(Integer stringGroup, Boolean booleanGroup, Long int64Group) { + // TODO: Implement... + + } /** diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java index cb8105e8f6d..b476e5528d0 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java @@ -236,6 +236,26 @@ public class FakeApiTest { // TODO: test validations + } + + /** + * Fake endpoint to test group parameters (optional) + * + * Fake endpoint to test group parameters (optional) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testGroupParametersTest() { + Integer stringGroup = null; + Boolean booleanGroup = null; + Long int64Group = null; + //api.testGroupParameters(stringGroup, booleanGroup, int64Group); + + // TODO: test validations + + } /** diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java index 431bc556bc4..a8db12b2afc 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java @@ -201,6 +201,20 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString,securityContext); } + @DELETE + + + + @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + public Response testGroupParameters(@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup +,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testGroupParameters(stringGroup,booleanGroup,int64Group,securityContext); + } @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java index 3359bba8107..fbf3fc75bc5 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java @@ -35,6 +35,7 @@ public abstract class FakeApiService { public abstract Response testClientModel(Client client,SecurityContext securityContext) throws NotFoundException; public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,InputStream binaryInputStream, FormDataContentDisposition binaryDetail,LocalDate date,OffsetDateTime dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testGroupParameters( Integer stringGroup,Boolean booleanGroup, Long int64Group,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFileWithRequiredFile(Long petId,InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 4ce7aadf70d..52d6b276ae4 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -72,6 +72,11 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testGroupParameters( Integer stringGroup, Boolean booleanGroup, Long int64Group, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testInlineAdditionalProperties(Map requestBody, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index dd1384ecd0a..304ddc3d28c 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -200,6 +200,20 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString,securityContext); } + @DELETE + + + + @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + public Response testGroupParameters(@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup +,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testGroupParameters(stringGroup,booleanGroup,int64Group,securityContext); + } @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java index b4d3c8db5be..8ea44f5923d 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java @@ -34,6 +34,7 @@ public abstract class FakeApiService { public abstract Response testClientModel(Client client,SecurityContext securityContext) throws NotFoundException; public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,InputStream binaryInputStream, FormDataContentDisposition binaryDetail,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testGroupParameters( Integer stringGroup,Boolean booleanGroup, Long int64Group,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFileWithRequiredFile(Long petId,InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java index cbeec51b83b..6cb07696525 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java @@ -69,6 +69,12 @@ public class FormatTest { @JsonProperty("password") private String password; + @JsonProperty("pattern_with_digits") + private String patternWithDigits; + + @JsonProperty("pattern_with_digits_and_delimiter") + private String patternWithDigitsAndDelimiter; + public FormatTest integer(Integer integer) { this.integer = integer; return this; @@ -343,6 +349,46 @@ public class FormatTest { this.password = password; } + public FormatTest patternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + return this; + } + + /** + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits + **/ + @JsonProperty("pattern_with_digits") + @ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.") + @Pattern(regexp="^\\d{10}$") + public String getPatternWithDigits() { + return patternWithDigits; + } + + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @JsonProperty("pattern_with_digits_and_delimiter") + @ApiModelProperty(value = "A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") + @Pattern(regexp="/^image_\\d{1,3}$/i") + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + } + @Override public boolean equals(java.lang.Object o) { @@ -365,12 +411,14 @@ public class FormatTest { Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password); + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password); + return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @@ -392,6 +440,8 @@ public class FormatTest { sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 18ba5cd2bd7..37288374e7f 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -71,6 +71,11 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testGroupParameters( Integer stringGroup, Boolean booleanGroup, Long int64Group, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testInlineAdditionalProperties(Map requestBody, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java index b156fb2edfc..b8cd7c76872 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java @@ -100,6 +100,12 @@ public interface FakeApi { @ApiResponse(code = 404, message = "Not found", response = Void.class) }) void testEnumParameters(@HeaderParam("enum_header_string_array") @DefaultValue("new ArrayList()") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @DefaultValue("new ArrayList()") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); + @DELETE + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + void testGroupParameters(@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); + @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 35c5a92c1dd..799de419314 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -631,6 +631,36 @@ paths: x-tags: - tag: fake_classname_tags 123#$%^ /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-tags: + - tag: fake get: description: To test enum parameters operationId: testEnumParameters diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java index d670a9b7c3b..80e6cee3985 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java @@ -127,6 +127,15 @@ public class FakeApi { return Response.ok().entity("magic!").build(); } + @DELETE + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong", response = Void.class) + }) + public Response testGroupParameters(@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group) { + return Response.ok().entity("magic!").build(); + } + @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 35c5a92c1dd..799de419314 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -631,6 +631,36 @@ paths: x-tags: - tag: fake_classname_tags 123#$%^ /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-tags: + - tag: fake get: description: To test enum parameters operationId: testEnumParameters diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java index 56c055562fe..916ba073b33 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -183,6 +183,21 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString,securityContext); } + @DELETE + + + + @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + public Response testGroupParameters( + @ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup, + @ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group, + @Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testGroupParameters(stringGroup,booleanGroup,int64Group,securityContext); + } @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApiService.java index 2488573739b..55f5a5257d0 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApiService.java @@ -45,6 +45,8 @@ public abstract class FakeApiService { throws NotFoundException; public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testGroupParameters( Integer stringGroup,Boolean booleanGroup, Long int64Group,SecurityContext securityContext) + throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 4e90ac195f6..ae4238f4d82 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -82,6 +82,12 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testGroupParameters( Integer stringGroup, Boolean booleanGroup, Long int64Group, SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testInlineAdditionalProperties(Map requestBody, SecurityContext securityContext) throws NotFoundException { // do some magic! diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java index cb74e6c4e73..80d3018bcad 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java @@ -184,6 +184,21 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString,securityContext); } + @DELETE + + + + @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + public Response testGroupParameters( + @ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup, + @ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup, + @ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group, + @Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testGroupParameters(stringGroup,booleanGroup,int64Group,securityContext); + } @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApiService.java index 53d7685ed41..20f05383f60 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApiService.java @@ -46,6 +46,8 @@ public abstract class FakeApiService { throws NotFoundException; public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testGroupParameters( Integer stringGroup,Boolean booleanGroup, Long int64Group,SecurityContext securityContext) + throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 7696e0d3392..6861c8607aa 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -83,6 +83,12 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testGroupParameters( Integer stringGroup, Boolean booleanGroup, Long int64Group, SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testInlineAdditionalProperties(Map requestBody, SecurityContext securityContext) throws NotFoundException { // do some magic! diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java index 0a10473bdab..57b8c57a76b 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -199,6 +199,20 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString,securityContext); } + @DELETE + + + + @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + public Response testGroupParameters(@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup +,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testGroupParameters(stringGroup,booleanGroup,int64Group,securityContext); + } @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApiService.java index d60fb2d966b..d7e2031b5b5 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApiService.java @@ -33,6 +33,7 @@ public abstract class FakeApiService { public abstract Response testClientModel(Client client,SecurityContext securityContext) throws NotFoundException; public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,InputStream binaryInputStream, FormDataContentDisposition binaryDetail,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testGroupParameters( Integer stringGroup,Boolean booleanGroup, Long int64Group,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 26c242bc6da..fa4bb591ee6 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -70,6 +70,11 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testGroupParameters( Integer stringGroup, Boolean booleanGroup, Long int64Group, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testInlineAdditionalProperties(Map requestBody, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java index ecebe0d1c25..16131c7596c 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java @@ -200,6 +200,20 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString,securityContext); } + @DELETE + + + + @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + public Response testGroupParameters(@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup +,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testGroupParameters(stringGroup,booleanGroup,int64Group,securityContext); + } @POST @Path("/inline-additionalProperties") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java index b4d3c8db5be..8ea44f5923d 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java @@ -34,6 +34,7 @@ public abstract class FakeApiService { public abstract Response testClientModel(Client client,SecurityContext securityContext) throws NotFoundException; public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,InputStream binaryInputStream, FormDataContentDisposition binaryDetail,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testGroupParameters( Integer stringGroup,Boolean booleanGroup, Long int64Group,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFileWithRequiredFile(Long petId,InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 18ba5cd2bd7..37288374e7f 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -71,6 +71,11 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testGroupParameters( Integer stringGroup, Boolean booleanGroup, Long int64Group, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testInlineAdditionalProperties(Map requestBody, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/FakeApi.php b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/FakeApi.php index b1fa33f8ddd..decfebfb5f7 100644 --- a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/FakeApi.php +++ b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/FakeApi.php @@ -183,6 +183,31 @@ class FakeApi extends Controller return response('How about implementing testEnumParameters as a get method ?'); } + /** + * Operation testGroupParameters + * + * Fake endpoint to test group parameters (optional). + * + * + * @return Http response + */ + public function testGroupParameters() + { + $input = Request::all(); + + //path params validation + + + //not path params validation + $string_group = $input['string_group']; + + $boolean_group = $input['boolean_group']; + + $int64_group = $input['int64_group']; + + + return response('How about implementing testGroupParameters as a delete method ?'); + } /** * Operation testBodyWithFileSchema * diff --git a/samples/server/petstore/php-lumen/lib/routes/web.php b/samples/server/petstore/php-lumen/lib/routes/web.php index c538aed8cac..5be001e3841 100644 --- a/samples/server/petstore/php-lumen/lib/routes/web.php +++ b/samples/server/petstore/php-lumen/lib/routes/web.php @@ -45,6 +45,13 @@ $router->post('/v2/fake', 'FakeApi@testEndpointParameters'); * Notes: To test enum parameters */ $router->get('/v2/fake', 'FakeApi@testEnumParameters'); +/** + * delete testGroupParameters + * Summary: Fake endpoint to test group parameters (optional) + * Notes: Fake endpoint to test group parameters (optional) + + */ +$app->delete('/v2/fake', 'FakeApi@testGroupParameters'); /** * put testBodyWithFileSchema * Summary: diff --git a/samples/server/petstore/php-slim/README.md b/samples/server/petstore/php-slim/README.md index 33fb462b592..c8c96d9a893 100644 --- a/samples/server/petstore/php-slim/README.md +++ b/samples/server/petstore/php-slim/README.md @@ -61,6 +61,7 @@ Class | Method | HTTP request | Description *FakeApi* | **testClientModel** | **PATCH** /fake | To test \"client\" model *FakeApi* | **testEndpointParameters** | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | **testEnumParameters** | **GET** /fake | To test enum parameters +*FakeApi* | **testGroupParameters** | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | **testInlineAdditionalProperties** | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | **testJsonFormData** | **GET** /fake/jsonFormData | test json serialization of form data *FakeClassnameTags123Api* | **testClassname** | **PATCH** /fake_classname_test | To test class name in snake case diff --git a/samples/server/petstore/php-slim/lib/Api/FakeApi.php b/samples/server/petstore/php-slim/lib/Api/FakeApi.php index c93048cdfe5..5934463100a 100644 --- a/samples/server/petstore/php-slim/lib/Api/FakeApi.php +++ b/samples/server/petstore/php-slim/lib/Api/FakeApi.php @@ -206,6 +206,26 @@ class FakeApi extends AbstractApiController return $response; } + /** + * DELETE testGroupParameters + * Summary: Fake endpoint to test group parameters (optional) + * Notes: Fake endpoint to test group parameters (optional) + * + * @param \Psr\Http\Message\ServerRequestInterface $request Request + * @param \Psr\Http\Message\ResponseInterface $response Response + * @param array|null $args Path arguments + */ + public function testGroupParameters($request, $response, $args) + { + $headers = $request->getHeaders(); + $booleanGroup = $request->hasHeader('boolean_group') ? $headers['boolean_group'] : null; + $queryParams = $request->getQueryParams(); + $stringGroup = $request->getQueryParam('string_group'); + $int64Group = $request->getQueryParam('int64_group'); + $response->write('How about implementing testGroupParameters as a DELETE method ?'); + return $response; + } + /** * POST testInlineAdditionalProperties * Summary: test inline additionalProperties diff --git a/samples/server/petstore/php-slim/lib/SlimRouter.php b/samples/server/petstore/php-slim/lib/SlimRouter.php index ba105c70599..51071bb2f8f 100644 --- a/samples/server/petstore/php-slim/lib/SlimRouter.php +++ b/samples/server/petstore/php-slim/lib/SlimRouter.php @@ -115,6 +115,10 @@ class SlimRouter '/v2/fake', FakeApi::class . ':testEnumParameters' ); + $app->DELETE( + '/v2/fake', + FakeApi::class . ':testGroupParameters' + ); $app->POST( '/v2/fake/inline-additionalProperties', FakeApi::class . ':testInlineAdditionalProperties' diff --git a/samples/server/petstore/php-ze-ph/src/App/Handler/Fake.php b/samples/server/petstore/php-ze-ph/src/App/Handler/Fake.php index 1f2587eca03..2b70dfb709a 100644 --- a/samples/server/petstore/php-ze-ph/src/App/Handler/Fake.php +++ b/samples/server/petstore/php-ze-ph/src/App/Handler/Fake.php @@ -13,7 +13,7 @@ use Psr\Http\Message\ServerRequestInterface; /** * @PHA\Route(pattern="/fake") */ -class Fake implements Operation\PatchInterface, Operation\PostInterface, Operation\GetInterface +class Fake implements Operation\PatchInterface, Operation\PostInterface, Operation\GetInterface, Operation\DeleteInterface { /** * To test \"client\" model @@ -57,4 +57,15 @@ class Fake implements Operation\PatchInterface, Operation\PostInterface, Operati //TODO implement method throw new PHException\HttpCode(500, "Not implemented"); } + /** + * Fake endpoint to test group parameters (optional) + * @param ServerRequestInterface $request + * + * @throws PHException\HttpCode 500 if the method is not implemented + */ + public function handleDelete(ServerRequestInterface $request) + { + //TODO implement method + throw new PHException\HttpCode(500, "Not implemented"); + } } diff --git a/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml b/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml index c22996262e3..3a837e477ea 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml +++ b/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust-server-test" -version = "1.0.0" +version = "2.3.4" authors = [] description = "This spec is for testing rust-server-specific things" license = "Unlicense" diff --git a/samples/server/petstore/rust-server/output/rust-server-test/README.md b/samples/server/petstore/rust-server/output/rust-server-test/README.md index 5be314fa09b..e73332bb06f 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/README.md +++ b/samples/server/petstore/rust-server/output/rust-server-test/README.md @@ -12,7 +12,7 @@ To see how to make this your own, look here: [README]((https://openapi-generator.tech)) -- API version: 1.0.0 +- API version: 2.3.4 This autogenerated project defines an API crate `rust-server-test` which contains: * An `Api` trait defining the API in Rust. @@ -56,6 +56,8 @@ To run a client, follow one of the following simple steps: ``` cargo run --example client DummyGet +cargo run --example client DummyPut +cargo run --example client HtmlPost ``` ### HTTPS @@ -75,7 +77,7 @@ The server example is designed to form the basis for implementing your own serve * Set up a new Rust project, e.g., with `cargo init --bin`. * Insert `rust-server-test` into the `members` array under [workspace] in the root `Cargo.toml`, e.g., `members = [ "rust-server-test" ]`. -* Add `rust-server-test = {version = "1.0.0", path = "rust-server-test"}` under `[dependencies]` in the root `Cargo.toml`. +* Add `rust-server-test = {version = "2.3.4", path = "rust-server-test"}` under `[dependencies]` in the root `Cargo.toml`. * Copy the `[dependencies]` and `[dev-dependencies]` from `rust-server-test/Cargo.toml` into the root `Cargo.toml`'s `[dependencies]` section. * Copy all of the `[dev-dependencies]`, but only the `[dependencies]` that are required by the example server. These should be clearly indicated by comments. * Remove `"optional = true"` from each of these lines if present. diff --git a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml index 3ad35a166ff..a52f6a1d23a 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.1 info: description: This spec is for testing rust-server-specific things title: rust-server-test - version: 1.0.0 + version: 2.3.4 servers: - url: / paths: @@ -13,7 +13,61 @@ paths: content: {} description: Success summary: A dummy endpoint to make the spec valid. + put: + requestBody: + $ref: '#/components/requestBodies/inline_object' + content: + '*/*': + schema: + properties: + id: + type: string + password: + type: string + required: + - id + type: object + required: true + responses: + 200: + content: {} + description: Success + /html: + post: + requestBody: + content: + text/html: + schema: + type: string + required: true + responses: + 200: + content: + text/html: + schema: + type: string + description: Success + summary: Test HTML handling components: + requestBodies: + nested_response: + content: + '*/*': + schema: + properties: + id: + type: string + password: + type: string + required: + - id + type: object + required: true + inline_object: + content: + '*/*': + schema: + $ref: '#/components/schemas/inline_object' schemas: additionalPropertiesObject: additionalProperties: @@ -21,6 +75,29 @@ components: description: An additionalPropertiesObject example: foo type: object + ObjectOfObjects: + description: An object of objects + properties: + inner: + $ref: '#/components/schemas/ObjectOfObjects_inner' + type: object + inline_object: + properties: + id: + type: string + password: + type: string + required: + - id + type: object + ObjectOfObjects_inner: + properties: + optional_thing: + type: integer + required_thing: + type: string + required: + - required_thing aNullableContainer: properties: NullableThing: diff --git a/samples/server/petstore/rust-server/output/rust-server-test/examples/client.rs b/samples/server/petstore/rust-server/output/rust-server-test/examples/client.rs index 0862e3bd9e1..1217d78ab7e 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/examples/client.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/examples/client.rs @@ -19,7 +19,9 @@ use tokio_core::reactor; #[allow(unused_imports)] use rust_server_test::{ApiNoContext, ContextWrapperExt, ApiError, - DummyGetResponse + DummyGetResponse, + DummyPutResponse, + HtmlPostResponse }; use clap::{App, Arg}; @@ -29,6 +31,8 @@ fn main() { .help("Sets the operation to run") .possible_values(&[ "DummyGet", + "DummyPut", + "HtmlPost", ]) .required(true) .index(1)) @@ -74,6 +78,16 @@ fn main() { println!("{:?} (X-Span-ID: {:?})", result, (client.context() as &Has).get().clone()); }, + Some("DummyPut") => { + let result = core.run(client.dummy_put(None)); + println!("{:?} (X-Span-ID: {:?})", result, (client.context() as &Has).get().clone()); + }, + + Some("HtmlPost") => { + let result = core.run(client.html_post("body_example".to_string())); + println!("{:?} (X-Span-ID: {:?})", result, (client.context() as &Has).get().clone()); + }, + _ => { panic!("Invalid operation provided") } diff --git a/samples/server/petstore/rust-server/output/rust-server-test/examples/server_lib/server.rs b/samples/server/petstore/rust-server/output/rust-server-test/examples/server_lib/server.rs index e7b86f0313e..a5355d4862c 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/examples/server_lib/server.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/examples/server_lib/server.rs @@ -11,7 +11,9 @@ use swagger; use swagger::{Has, XSpanIdString}; use rust_server_test::{Api, ApiError, - DummyGetResponse + DummyGetResponse, + DummyPutResponse, + HtmlPostResponse }; use rust_server_test::models; @@ -35,4 +37,18 @@ impl Api for Server where C: Has{ Box::new(futures::failed("Generic failure".into())) } + + fn dummy_put(&self, inline_object: Option, context: &C) -> Box> { + let context = context.clone(); + println!("dummy_put({:?}) - X-Span-ID: {:?}", inline_object, context.get().0.clone()); + Box::new(futures::failed("Generic failure".into())) + } + + /// Test HTML handling + fn html_post(&self, body: String, context: &C) -> Box> { + let context = context.clone(); + println!("html_post(\"{}\") - X-Span-ID: {:?}", body, context.get().0.clone()); + Box::new(futures::failed("Generic failure".into())) + } + } diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs index 78aa49e0085..a3b62184eed 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs @@ -39,7 +39,9 @@ use swagger; use swagger::{ApiError, XSpanId, XSpanIdString, Has, AuthData}; use {Api, - DummyGetResponse + DummyGetResponse, + DummyPutResponse, + HtmlPostResponse }; use models; @@ -302,6 +304,142 @@ impl Api for Client where } + fn dummy_put(&self, param_inline_object: Option, context: &C) -> Box> { + + + let uri = format!( + "{}/dummy", + self.base_path + ); + + let uri = match Uri::from_str(&uri) { + Ok(uri) => uri, + Err(err) => return Box::new(futures::done(Err(ApiError(format!("Unable to build URI: {}", err))))), + }; + + let mut request = hyper::Request::new(hyper::Method::Put, uri); + + let body = param_inline_object.map(|ref body| { + + serde_json::to_string(body).expect("impossible to fail to serialize") + }); + +if let Some(body) = body { + request.set_body(body.into_bytes()); + } + + request.headers_mut().set(ContentType(mimetypes::requests::DUMMY_PUT.clone())); + request.headers_mut().set(XSpanId((context as &Has).get().0.clone())); + + + Box::new(self.client_service.call(request) + .map_err(|e| ApiError(format!("No response received: {}", e))) + .and_then(|mut response| { + match response.status().as_u16() { + 200 => { + let body = response.body(); + Box::new( + + future::ok( + DummyPutResponse::Success + ) + ) as Box> + }, + code => { + let headers = response.headers().clone(); + Box::new(response.body() + .take(100) + .concat2() + .then(move |body| + future::err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", + code, + headers, + match body { + Ok(ref body) => match str::from_utf8(body) { + Ok(body) => Cow::from(body), + Err(e) => Cow::from(format!("", e)), + }, + Err(e) => Cow::from(format!("", e)), + }))) + ) + ) as Box> + } + } + })) + + } + + fn html_post(&self, param_body: String, context: &C) -> Box> { + + + let uri = format!( + "{}/html", + self.base_path + ); + + let uri = match Uri::from_str(&uri) { + Ok(uri) => uri, + Err(err) => return Box::new(futures::done(Err(ApiError(format!("Unable to build URI: {}", err))))), + }; + + let mut request = hyper::Request::new(hyper::Method::Post, uri); + + let body = param_body; + + + request.set_body(body.into_bytes()); + + + request.headers_mut().set(ContentType(mimetypes::requests::HTML_POST.clone())); + request.headers_mut().set(XSpanId((context as &Has).get().0.clone())); + + + Box::new(self.client_service.call(request) + .map_err(|e| ApiError(format!("No response received: {}", e))) + .and_then(|mut response| { + match response.status().as_u16() { + 200 => { + let body = response.body(); + Box::new( + body + .concat2() + .map_err(|e| ApiError(format!("Failed to read response: {}", e))) + .and_then(|body| str::from_utf8(&body) + .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e))) + .and_then(|body| + + Ok(body.to_string()) + + )) + .map(move |body| + HtmlPostResponse::Success(body) + ) + ) as Box> + }, + code => { + let headers = response.headers().clone(); + Box::new(response.body() + .take(100) + .concat2() + .then(move |body| + future::err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", + code, + headers, + match body { + Ok(ref body) => match str::from_utf8(body) { + Ok(body) => Cow::from(body), + Err(e) => Cow::from(format!("", e)), + }, + Err(e) => Cow::from(format!("", e)), + }))) + ) + ) as Box> + } + } + })) + + } + } #[derive(Debug)] diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/lib.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/lib.rs index aceb8e42ccc..d10d7aa2e43 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/lib.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/lib.rs @@ -36,7 +36,7 @@ mod mimetypes; pub use swagger::{ApiError, ContextWrapper}; pub const BASE_PATH: &'static str = ""; -pub const API_VERSION: &'static str = "1.0.0"; +pub const API_VERSION: &'static str = "2.3.4"; #[derive(Debug, PartialEq)] @@ -45,6 +45,18 @@ pub enum DummyGetResponse { Success , } +#[derive(Debug, PartialEq)] +pub enum DummyPutResponse { + /// Success + Success , +} + +#[derive(Debug, PartialEq)] +pub enum HtmlPostResponse { + /// Success + Success ( String ) , +} + /// API pub trait Api { @@ -52,6 +64,12 @@ pub trait Api { /// A dummy endpoint to make the spec valid. fn dummy_get(&self, context: &C) -> Box>; + + fn dummy_put(&self, inline_object: Option, context: &C) -> Box>; + + /// Test HTML handling + fn html_post(&self, body: String, context: &C) -> Box>; + } /// API without a `Context` @@ -60,6 +78,12 @@ pub trait ApiNoContext { /// A dummy endpoint to make the spec valid. fn dummy_get(&self) -> Box>; + + fn dummy_put(&self, inline_object: Option) -> Box>; + + /// Test HTML handling + fn html_post(&self, body: String) -> Box>; + } /// Trait to extend an API to make it easy to bind it to a context. @@ -81,6 +105,16 @@ impl<'a, T: Api, C> ApiNoContext for ContextWrapper<'a, T, C> { self.api().dummy_get(&self.context()) } + + fn dummy_put(&self, inline_object: Option) -> Box> { + self.api().dummy_put(inline_object, &self.context()) + } + + /// Test HTML handling + fn html_post(&self, body: String) -> Box> { + self.api().html_post(body, &self.context()) + } + } #[cfg(feature = "client")] diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/mimetypes.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/mimetypes.rs index 304c686b3e5..e7dd9bc1076 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/mimetypes.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/mimetypes.rs @@ -4,10 +4,22 @@ pub mod responses { use hyper::mime::*; // The macro is called per-operation to beat the recursion limit + /// Create Mime objects for the response content types for HtmlPost + lazy_static! { + pub static ref HTML_POST_SUCCESS: Mime = "text/html".parse().unwrap(); + } } pub mod requests { use hyper::mime::*; + /// Create Mime objects for the request content types for DummyPut + lazy_static! { + pub static ref DUMMY_PUT: Mime = "application/json".parse().unwrap(); + } + /// Create Mime objects for the request content types for HtmlPost + lazy_static! { + pub static ref HTML_POST: Mime = "text/html".parse().unwrap(); + } } diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs index f4c3e1b36a3..03a3b955945 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs @@ -43,3 +43,60 @@ impl AdditionalPropertiesObject { } } } + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct InlineObject { + #[serde(rename = "id")] + pub id: String, + + #[serde(rename = "password")] + #[serde(skip_serializing_if="Option::is_none")] + pub password: Option, + +} + +impl InlineObject { + pub fn new(id: String, ) -> InlineObject { + InlineObject { + id: id, + password: None, + } + } +} + +/// An object of objects +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct ObjectOfObjects { + #[serde(rename = "inner")] + #[serde(skip_serializing_if="Option::is_none")] + pub inner: Option, + +} + +impl ObjectOfObjects { + pub fn new() -> ObjectOfObjects { + ObjectOfObjects { + inner: None, + } + } +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct ObjectOfObjectsInner { + #[serde(rename = "optional_thing")] + #[serde(skip_serializing_if="Option::is_none")] + pub optional_thing: Option, + + #[serde(rename = "required_thing")] + pub required_thing: String, + +} + +impl ObjectOfObjectsInner { + pub fn new(required_thing: String, ) -> ObjectOfObjectsInner { + ObjectOfObjectsInner { + optional_thing: None, + required_thing: required_thing, + } + } +} diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs index 919e430b084..cec0ed8e38f 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs @@ -37,7 +37,9 @@ use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; use {Api, - DummyGetResponse + DummyGetResponse, + DummyPutResponse, + HtmlPostResponse }; #[allow(unused_imports)] use models; @@ -51,10 +53,12 @@ mod paths { lazy_static! { pub static ref GLOBAL_REGEX_SET: regex::RegexSet = regex::RegexSet::new(&[ - r"^/dummy$" + r"^/dummy$", + r"^/html$" ]).unwrap(); } pub static ID_DUMMY: usize = 0; + pub static ID_HTML: usize = 1; } pub struct NewService { @@ -166,6 +170,156 @@ where }, + // DummyPut - PUT /dummy + &hyper::Method::Put if path.matched(paths::ID_DUMMY) => { + + + + + + + // Body parameters (note that non-required body parameters will ignore garbage + // values, rather than causing a 400 response). Produce warning header and logs for + // any unused fields. + Box::new(body.concat2() + .then(move |result| -> Box> { + match result { + Ok(body) => { + + let mut unused_elements = Vec::new(); + let param_inline_object: Option = if !body.is_empty() { + + let deserializer = &mut serde_json::Deserializer::from_slice(&*body); + + match serde_ignored::deserialize(deserializer, |path| { + warn!("Ignoring unknown field in body: {}", path); + unused_elements.push(path.to_string()); + }) { + Ok(param_inline_object) => param_inline_object, + + Err(_) => None, + } + + } else { + None + }; + + + Box::new(api_impl.dummy_put(param_inline_object, &context) + .then(move |result| { + let mut response = Response::new(); + response.headers_mut().set(XSpanId((&context as &Has).get().0.to_string())); + + if !unused_elements.is_empty() { + response.headers_mut().set(Warning(format!("Ignoring unknown fields in body: {:?}", unused_elements))); + } + + match result { + Ok(rsp) => match rsp { + DummyPutResponse::Success + + + => { + response.set_status(StatusCode::try_from(200).unwrap()); + + }, + }, + Err(_) => { + // Application code returned an error. This should not happen, as the implementation should + // return a valid response. + response.set_status(StatusCode::InternalServerError); + response.set_body("An internal error occurred"); + }, + } + + future::ok(response) + } + )) + + + }, + Err(e) => Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't read body parameter InlineObject: {}", e)))), + } + }) + ) as Box> + + }, + + + // HtmlPost - POST /html + &hyper::Method::Post if path.matched(paths::ID_HTML) => { + + + + + + + // Body parameters (note that non-required body parameters will ignore garbage + // values, rather than causing a 400 response). Produce warning header and logs for + // any unused fields. + Box::new(body.concat2() + .then(move |result| -> Box> { + match result { + Ok(body) => { + let param_body: Option = if !body.is_empty() { + + match String::from_utf8(body.to_vec()) { + Ok(param_body) => Some(param_body), + Err(e) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't parse body parameter body - not valid UTF-8: {}", e)))), + } + + } else { + None + }; + let param_body = match param_body { + Some(param_body) => param_body, + None => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body("Missing required body parameter body"))), + }; + + + Box::new(api_impl.html_post(param_body, &context) + .then(move |result| { + let mut response = Response::new(); + response.headers_mut().set(XSpanId((&context as &Has).get().0.to_string())); + + match result { + Ok(rsp) => match rsp { + HtmlPostResponse::Success + + (body) + + + => { + response.set_status(StatusCode::try_from(200).unwrap()); + + response.headers_mut().set(ContentType(mimetypes::responses::HTML_POST_SUCCESS.clone())); + + + response.set_body(body); + }, + }, + Err(_) => { + // Application code returned an error. This should not happen, as the implementation should + // return a valid response. + response.set_status(StatusCode::InternalServerError); + response.set_body("An internal error occurred"); + }, + } + + future::ok(response) + } + )) + + + }, + Err(e) => Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't read body parameter body: {}", e)))), + } + }) + ) as Box> + + }, + + _ => Box::new(future::ok(Response::new().with_status(StatusCode::NotFound))) as Box>, } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 19ecdbcf5a4..148ad6f1485 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -178,6 +178,17 @@ public interface FakeApi { } + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + default CompletableFuture> testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); + + } + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 15cad846649..73d1926afdd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6834615c4cc..b435e834c8b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 480f0c5bb67..c9583813e8c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java index 45c1df96c8e..a1e93f40627 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java index 1bf86d35fa3..f2b794bde99 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 931b0dec01e..be3e2e1e86c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java index 6b1af9b08be..6e403c6b5ce 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java index 93a2b1e7b22..541bf0981ae 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f1212179a3..4f8a86dec57 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java index 0a09f15f309..33255a79815 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java index d3bca13a64b..5c0704400bb 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index c0161fc2f13..20854d3e1b6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -173,6 +173,17 @@ public interface FakeApi { } + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + default ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 15cad846649..73d1926afdd 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6834615c4cc..b435e834c8b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 480f0c5bb67..c9583813e8c 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java index 45c1df96c8e..a1e93f40627 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java index 1bf86d35fa3..f2b794bde99 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 931b0dec01e..be3e2e1e86c 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java index 25e4f22e27d..a6e1c3fff11 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java index 93a2b1e7b22..541bf0981ae 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3a30f4a90cc..08326500ceb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java index 99e9c3bde59..4459686b086 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java index d3bca13a64b..5c0704400bb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 6605d282465..26bb3aaea6e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -122,6 +122,14 @@ public interface FakeApi { ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList()") @RequestHeader(value="enum_header_string_array", required=false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $", defaultValue = "new ArrayList()") @Valid @RequestParam(value = "enum_query_string_array", required = false, defaultValue="new ArrayList()") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString); + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group); + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java index 481c3797c6f..98b54389e3a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java @@ -97,6 +97,11 @@ public class FakeApiController implements FakeApi { } + public ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true ) @Valid @RequestBody Map requestBody) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 9abfbad1152..8bef34c6d05 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 1023799257b..90d468096f0 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 9ced676ee36..5a21ab7d938 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java index a3017dfb67d..e8b4a419009 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java index 1a511c9422c..4ccdf3e8436 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 68fc98a8161..ab6a17b2c0e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java index 766d254301e..35d2b5deee8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java index 9909e432f63..6c238c06b71 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f4e900364e..8744cdeb6a4 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java index af33e77e1ef..3f2f47eb605 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java index 4e99f847257..50878ae0d2a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 6605d282465..26bb3aaea6e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -122,6 +122,14 @@ public interface FakeApi { ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList()") @RequestHeader(value="enum_header_string_array", required=false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $", defaultValue = "new ArrayList()") @Valid @RequestParam(value = "enum_query_string_array", required = false, defaultValue="new ArrayList()") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString); + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group); + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java index b7d39d47476..7981d705578 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java @@ -97,6 +97,11 @@ public class FakeApiController implements FakeApi { } + public ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true ) @Valid @RequestBody Map requestBody) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 9abfbad1152..8bef34c6d05 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 1023799257b..90d468096f0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 9ced676ee36..5a21ab7d938 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java index a3017dfb67d..e8b4a419009 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index 1a511c9422c..4ccdf3e8436 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 68fc98a8161..ab6a17b2c0e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index 766d254301e..35d2b5deee8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 9909e432f63..6c238c06b71 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f4e900364e..8744cdeb6a4 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index af33e77e1ef..3f2f47eb605 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 4e99f847257..50878ae0d2a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 52cac558634..cd4bf195af8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -144,6 +144,16 @@ public interface FakeApi { } + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + default ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + return getDelegate().testGroupParameters(stringGroup, booleanGroup, int64Group); + } + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index 9adde87bc49..2694060b724 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -141,6 +141,16 @@ public interface FakeApiDelegate { } + /** + * @see FakeApi#testGroupParameters + */ + default ResponseEntity testGroupParameters(Integer stringGroup, + Boolean booleanGroup, + Long int64Group) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + /** * @see FakeApi#testInlineAdditionalProperties */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 15cad846649..73d1926afdd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6834615c4cc..b435e834c8b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 480f0c5bb67..c9583813e8c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java index 45c1df96c8e..a1e93f40627 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index 1bf86d35fa3..f2b794bde99 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 931b0dec01e..be3e2e1e86c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index 6b1af9b08be..6e403c6b5ce 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 93a2b1e7b22..541bf0981ae 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f1212179a3..4f8a86dec57 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index 0a09f15f309..33255a79815 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index d3bca13a64b..5c0704400bb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 6605d282465..26bb3aaea6e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -122,6 +122,14 @@ public interface FakeApi { ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList()") @RequestHeader(value="enum_header_string_array", required=false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $", defaultValue = "new ArrayList()") @Valid @RequestParam(value = "enum_query_string_array", required = false, defaultValue="new ArrayList()") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString); + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group); + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index 8bdad30ceb5..41ebeb12176 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -74,6 +74,10 @@ public class FakeApiController implements FakeApi { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } + public ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + return delegate.testGroupParameters(stringGroup, booleanGroup, int64Group); + } + public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true ) @Valid @RequestBody Map requestBody) { return delegate.testInlineAdditionalProperties(requestBody); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index 0d6eb018765..cd84bcec314 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -90,6 +90,13 @@ public interface FakeApiDelegate { List enumFormStringArray, String enumFormString); + /** + * @see FakeApi#testGroupParameters + */ + ResponseEntity testGroupParameters(Integer stringGroup, + Boolean booleanGroup, + Long int64Group); + /** * @see FakeApi#testInlineAdditionalProperties */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 9abfbad1152..8bef34c6d05 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 1023799257b..90d468096f0 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 9ced676ee36..5a21ab7d938 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index a3017dfb67d..e8b4a419009 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index 1a511c9422c..4ccdf3e8436 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 68fc98a8161..ab6a17b2c0e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 766d254301e..35d2b5deee8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 9909e432f63..6c238c06b71 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f4e900364e..8744cdeb6a4 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index af33e77e1ef..3f2f47eb605 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 4e99f847257..50878ae0d2a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 66fa4cd9bcd..29575492dce 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -193,6 +193,20 @@ public interface FakeApi { } + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "booleanGroup", value = "Boolean in group parameters", dataType = "Boolean", paramType = "header") + }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + default ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 15cad846649..73d1926afdd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6834615c4cc..b435e834c8b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 480f0c5bb67..c9583813e8c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 45c1df96c8e..a1e93f40627 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index 1bf86d35fa3..f2b794bde99 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 931b0dec01e..be3e2e1e86c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 6b1af9b08be..6e403c6b5ce 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 93a2b1e7b22..541bf0981ae 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f1212179a3..4f8a86dec57 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index 0a09f15f309..33255a79815 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index d3bca13a64b..5c0704400bb 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index bb46f8aef8c..d27c6686535 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -147,6 +147,16 @@ public interface FakeApi { } + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + default Mono> testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group, ServerWebExchange exchange) { + return getDelegate().testGroupParameters(stringGroup, booleanGroup, int64Group, exchange); + } + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 10b7912741c..117a233a8e0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -167,6 +167,19 @@ public interface FakeApiDelegate { } + /** + * @see FakeApi#testGroupParameters + */ + default Mono> testGroupParameters(Integer stringGroup, + Boolean booleanGroup, + Long int64Group, + ServerWebExchange exchange) { + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + Mono result = Mono.empty(); + return result.then(Mono.empty()); + + } + /** * @see FakeApi#testInlineAdditionalProperties */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 15cad846649..73d1926afdd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6834615c4cc..b435e834c8b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 480f0c5bb67..c9583813e8c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index 45c1df96c8e..a1e93f40627 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index 1bf86d35fa3..f2b794bde99 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 931b0dec01e..be3e2e1e86c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 6b1af9b08be..6e403c6b5ce 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 93a2b1e7b22..541bf0981ae 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f1212179a3..4f8a86dec57 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index 0a09f15f309..33255a79815 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index d3bca13a64b..5c0704400bb 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 31ad15f3a9f..ad445e88402 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -662,6 +662,37 @@ paths: x-tags: - tag: fake_classname_tags 123#$%^ /fake: + delete: + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + parameters: + - description: String in group parameters + in: query + name: string_group + schema: + type: integer + - description: Boolean in group parameters + in: header + name: boolean_group + schema: + type: boolean + - description: Integer in group parameters + in: query + name: int64_group + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Someting wrong + summary: Fake endpoint to test group parameters (optional) + tags: + - fake + x-group-parameters: true + x-accepts: application/json + x-tags: + - tag: fake get: description: To test enum parameters operationId: testEnumParameters diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 5378f64c258..2b8966c4c27 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -173,6 +173,17 @@ public interface FakeApi { } + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + default ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Optional booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 15cad846649..73d1926afdd 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6834615c4cc..b435e834c8b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 480f0c5bb67..c9583813e8c 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index 45c1df96c8e..a1e93f40627 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index 1bf86d35fa3..f2b794bde99 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 931b0dec01e..be3e2e1e86c 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 6b1af9b08be..6e403c6b5ce 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 93a2b1e7b22..541bf0981ae 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f1212179a3..4f8a86dec57 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index 0a09f15f309..33255a79815 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index d3bca13a64b..5c0704400bb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION index 6d94c9c2e12..875e2d486ac 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.0-SNAPSHOT \ No newline at end of file +3.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index 7106b763d21..cc233303be3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.3.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/ApiUtil.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/ApiUtil.java index a1b15b821fb..896535c4595 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/ApiUtil.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/ApiUtil.java @@ -8,8 +8,10 @@ import java.io.IOException; public class ApiUtil { public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { try { - req.getNativeResponse(HttpServletResponse.class).addHeader("Content-Type", contentType); - req.getNativeResponse(HttpServletResponse.class).getOutputStream().print(example); + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 0555f06748f..5d28a9eca17 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.3.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -55,14 +55,6 @@ public interface FakeApi { produces = { "*/*" }, method = RequestMethod.POST) default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody Boolean body) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "null"); - break; - } - } - }); return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -97,14 +89,6 @@ public interface FakeApi { produces = { "*/*" }, method = RequestMethod.POST) default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid @RequestBody BigDecimal body) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "null"); - break; - } - } - }); return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,14 +102,6 @@ public interface FakeApi { produces = { "*/*" }, method = RequestMethod.POST) default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid @RequestBody String body) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "null"); - break; - } - } - }); return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -189,7 +165,7 @@ public interface FakeApi { @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true, defaultValue="null") @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true, defaultValue="null") @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true, defaultValue="null") @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true, defaultValue="null") @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="string", required=false) String string,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile binary,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None", defaultValue="null") @RequestParam(value="callback", required=false) String paramCallback) { + default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -203,7 +179,19 @@ public interface FakeApi { @RequestMapping(value = "/fake", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList<>()") @RequestHeader(value="enum_header_string_array", required=false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $", defaultValue = "new ArrayList<>()") @Valid @RequestParam(value = "enum_query_string_array", required = false, defaultValue="new ArrayList<>()") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + @ApiVirtual + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + default ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -229,7 +217,7 @@ public interface FakeApi { @RequestMapping(value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.GET) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true, defaultValue="null") @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true, defaultValue="null") @RequestParam(value="param2", required=true) String param2) { + default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -248,7 +236,7 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index d83dcb48787..db17d405edd 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.3.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index 21ad9cccb25..c7c470ed0da 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.3.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -88,11 +88,11 @@ public interface PetApi { @RequestMapping(value = "/pet/findByStatus", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold", defaultValue = "new ArrayList<>()") @Valid @RequestParam(value = "status", required = true, defaultValue="new ArrayList<>()") List status) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"); + ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { @@ -119,11 +119,11 @@ public interface PetApi { @RequestMapping(value = "/pet/findByTags", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true, defaultValue = "new ArrayList<>()") @Valid @RequestParam(value = "tags", required = true, defaultValue="new ArrayList<>()") List tags) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"); + ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { @@ -152,7 +152,7 @@ public interface PetApi { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"); + ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { @@ -198,7 +198,7 @@ public interface PetApi { @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet", defaultValue="null") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet", defaultValue="null") @RequestParam(value="status", required=false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -217,7 +217,7 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index f4f013f0f55..082739d5caf 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.3.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 36d28a4b1f7..c8bde7a680e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.3.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.4.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index 3fbea03c759..56304445adf 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java index 5c1ffdf5386..ee60cb1a21c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java @@ -22,7 +22,7 @@ import javax.validation.constraints.*; public class Animal { @JsonProperty("className") - private String className = null; + private String className; @JsonProperty("color") private String color = "red"; @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java index 486702883d2..83ca5fbd61c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java index 28875cb548b..4f4ad0761f1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java index 64e608900f8..b5d14b00730 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java index 7071e42a553..860a3b30904 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java @@ -14,22 +14,22 @@ import javax.validation.constraints.*; public class Capitalization { @JsonProperty("smallCamel") - private String smallCamel = null; + private String smallCamel; @JsonProperty("CapitalCamel") - private String capitalCamel = null; + private String capitalCamel; @JsonProperty("small_Snake") - private String smallSnake = null; + private String smallSnake; @JsonProperty("Capital_Snake") - private String capitalSnake = null; + private String capitalSnake; @JsonProperty("SCA_ETH_Flow_Points") - private String scAETHFlowPoints = null; + private String scAETHFlowPoints; @JsonProperty("ATT_NAME") - private String ATT_NAME = null; + private String ATT_NAME; public Capitalization smallCamel(String smallCamel) { this.smallCamel = smallCamel; @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java index a1f38af43e0..8759d4e8450 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java @@ -15,7 +15,7 @@ import javax.validation.constraints.*; public class Cat extends Animal { @JsonProperty("declawed") - private Boolean declawed = null; + private Boolean declawed; public Cat declawed(Boolean declawed) { this.declawed = declawed; @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java index 5a43da49eeb..a36ebae90c6 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java @@ -14,10 +14,10 @@ import javax.validation.constraints.*; public class Category { @JsonProperty("id") - private Long id = null; + private Long id; @JsonProperty("name") - private String name = null; + private String name = "default-name"; public Category id(Long id) { this.id = id; @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,8 +47,9 @@ public class Category { /** * Get name * @return name - **/ - @ApiModelProperty(value = "") + */ + @ApiModelProperty(required = true, value = "") + @NotNull public String getName() { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java index 92b739c6db7..b5f87ae6170 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java @@ -15,7 +15,7 @@ import javax.validation.constraints.*; public class ClassModel { @JsonProperty("_class") - private String propertyClass = null; + private String propertyClass; public ClassModel propertyClass(String propertyClass) { this.propertyClass = propertyClass; @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java index f689ff66b2d..10ebed01e54 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java @@ -14,7 +14,7 @@ import javax.validation.constraints.*; public class Client { @JsonProperty("client") - private String client = null; + private String client; public Client client(String client) { this.client = client; @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java index 7a5f1b21863..88e3a3ec05f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java @@ -15,7 +15,7 @@ import javax.validation.constraints.*; public class Dog extends Animal { @JsonProperty("breed") - private String breed = null; + private String breed; public Dog breed(String breed) { this.breed = breed; @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index 7f37a350cf4..803f267c5df 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -48,7 +48,7 @@ public class EnumArrays { } @JsonProperty("just_symbol") - private JustSymbolEnum justSymbol = null; + private JustSymbolEnum justSymbol; /** * Gets or Sets arrayEnum @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index 297d624ea58..c5da3beda28 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -49,7 +49,7 @@ public class EnumTest { } @JsonProperty("enum_string") - private EnumStringEnum enumString = null; + private EnumStringEnum enumString; /** * Gets or Sets enumStringRequired @@ -85,7 +85,7 @@ public class EnumTest { } @JsonProperty("enum_string_required") - private EnumStringRequiredEnum enumStringRequired = null; + private EnumStringRequiredEnum enumStringRequired; /** * Gets or Sets enumInteger @@ -119,7 +119,7 @@ public class EnumTest { } @JsonProperty("enum_integer") - private EnumIntegerEnum enumInteger = null; + private EnumIntegerEnum enumInteger; /** * Gets or Sets enumNumber @@ -153,7 +153,7 @@ public class EnumTest { } @JsonProperty("enum_number") - private EnumNumberEnum enumNumber = null; + private EnumNumberEnum enumNumber; @JsonProperty("outerEnum") private OuterEnum outerEnum = null; @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java index 1494da4da30..6af62b77523 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index de411628665..a81818cb1e6 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -19,43 +19,43 @@ import javax.validation.constraints.*; public class FormatTest { @JsonProperty("integer") - private Integer integer = null; + private Integer integer; @JsonProperty("int32") - private Integer int32 = null; + private Integer int32; @JsonProperty("int64") - private Long int64 = null; + private Long int64; @JsonProperty("number") - private BigDecimal number = null; + private BigDecimal number; @JsonProperty("float") - private Float _float = null; + private Float _float; @JsonProperty("double") - private Double _double = null; + private Double _double; @JsonProperty("string") - private String string = null; + private String string; @JsonProperty("byte") - private byte[] _byte = null; + private byte[] _byte; @JsonProperty("binary") - private Resource binary = null; + private Resource binary; @JsonProperty("date") - private LocalDate date = null; + private LocalDate date; @JsonProperty("dateTime") - private OffsetDateTime dateTime = null; + private OffsetDateTime dateTime; @JsonProperty("uuid") - private UUID uuid = null; + private UUID uuid; @JsonProperty("password") - private String password = null; + private String password; public FormatTest integer(Integer integer) { this.integer = integer; @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java index 45cc65677cb..179fdcdc9cb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java @@ -14,10 +14,10 @@ import javax.validation.constraints.*; public class HasOnlyReadOnly { @JsonProperty("bar") - private String bar = null; + private String bar; @JsonProperty("foo") - private String foo = null; + private String foo; public HasOnlyReadOnly bar(String bar) { this.bar = bar; @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index 14296751f1e..bc5747e62d1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -9,7 +9,6 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.virtualan.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,8 @@ public class MapTest { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + @Valid + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -149,24 +149,31 @@ public class MapTest { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") - @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8a55f4585d2..014a0a7b2b6 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -20,10 +20,10 @@ import javax.validation.constraints.*; public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") - private UUID uuid = null; + private UUID uuid; @JsonProperty("dateTime") - private OffsetDateTime dateTime = null; + private OffsetDateTime dateTime; @JsonProperty("map") @Valid @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java index 27598e36568..91bada12c56 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java @@ -15,10 +15,10 @@ import javax.validation.constraints.*; public class Model200Response { @JsonProperty("name") - private Integer name = null; + private Integer name; @JsonProperty("class") - private String propertyClass = null; + private String propertyClass; public Model200Response name(Integer name) { this.name = name; @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java index 2966dd98906..e05e2887d52 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java @@ -14,13 +14,13 @@ import javax.validation.constraints.*; public class ModelApiResponse { @JsonProperty("code") - private Integer code = null; + private Integer code; @JsonProperty("type") - private String type = null; + private String type; @JsonProperty("message") - private String message = null; + private String message; public ModelApiResponse code(Integer code) { this.code = code; @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java index ca8e032976d..59482164ae1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java @@ -15,7 +15,7 @@ import javax.validation.constraints.*; public class ModelReturn { @JsonProperty("return") - private Integer _return = null; + private Integer _return; public ModelReturn _return(Integer _return) { this._return = _return; @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java index 13c0933b1be..be4f6ee2131 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java @@ -15,16 +15,16 @@ import javax.validation.constraints.*; public class Name { @JsonProperty("name") - private Integer name = null; + private Integer name; @JsonProperty("snake_case") - private Integer snakeCase = null; + private Integer snakeCase; @JsonProperty("property") - private String property = null; + private String property; @JsonProperty("123Number") - private Integer _123number = null; + private Integer _123number; public Name name(Integer name) { this.name = name; @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java index 56a6e6eb908..5e84248183e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java @@ -15,7 +15,7 @@ import javax.validation.constraints.*; public class NumberOnly { @JsonProperty("JustNumber") - private BigDecimal justNumber = null; + private BigDecimal justNumber; public NumberOnly justNumber(BigDecimal justNumber) { this.justNumber = justNumber; @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index d424a8c4a9c..846ecfae7e3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -16,16 +16,16 @@ import javax.validation.constraints.*; public class Order { @JsonProperty("id") - private Long id = null; + private Long id; @JsonProperty("petId") - private Long petId = null; + private Long petId; @JsonProperty("quantity") - private Integer quantity = null; + private Integer quantity; @JsonProperty("shipDate") - private OffsetDateTime shipDate = null; + private OffsetDateTime shipDate; /** * Order Status @@ -61,7 +61,7 @@ public class Order { } @JsonProperty("status") - private StatusEnum status = null; + private StatusEnum status; @JsonProperty("complete") private Boolean complete = false; @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java index 18fa8134225..44c8f2f0c40 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java @@ -15,13 +15,13 @@ import javax.validation.constraints.*; public class OuterComposite { @JsonProperty("my_number") - private BigDecimal myNumber = null; + private BigDecimal myNumber; @JsonProperty("my_string") - private String myString = null; + private String myString; @JsonProperty("my_boolean") - private Boolean myBoolean = null; + private Boolean myBoolean; public OuterComposite myNumber(BigDecimal myNumber) { this.myNumber = myNumber; @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index beaa5cd32e3..60b90c900cb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -19,13 +19,13 @@ import javax.validation.constraints.*; public class Pet { @JsonProperty("id") - private Long id = null; + private Long id; @JsonProperty("category") private Category category = null; @JsonProperty("name") - private String name = null; + private String name; @JsonProperty("photoUrls") @Valid @@ -69,7 +69,7 @@ public class Pet { } @JsonProperty("status") - private StatusEnum status = null; + private StatusEnum status; public Pet id(Long id) { this.id = id; @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java index d0735af1ae3..3e0b3154fe3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java @@ -14,10 +14,10 @@ import javax.validation.constraints.*; public class ReadOnlyFirst { @JsonProperty("bar") - private String bar = null; + private String bar; @JsonProperty("baz") - private String baz = null; + private String baz; public ReadOnlyFirst bar(String bar) { this.bar = bar; @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java index baaaa7f81e3..c0449ae3d34 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java @@ -14,7 +14,7 @@ import javax.validation.constraints.*; public class SpecialModelName { @JsonProperty("$special[property.name]") - private Long $specialPropertyName = null; + private Long $specialPropertyName; public SpecialModelName $specialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java index 59c62dba854..dc4a11688bc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java @@ -14,10 +14,10 @@ import javax.validation.constraints.*; public class Tag { @JsonProperty("id") - private Long id = null; + private Long id; @JsonProperty("name") - private String name = null; + private String name; public Tag id(Long id) { this.id = id; @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java index ab17265faa4..bb20168178e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java @@ -14,28 +14,28 @@ import javax.validation.constraints.*; public class User { @JsonProperty("id") - private Long id = null; + private Long id; @JsonProperty("username") - private String username = null; + private String username; @JsonProperty("firstName") - private String firstName = null; + private String firstName; @JsonProperty("lastName") - private String lastName = null; + private String lastName; @JsonProperty("email") - private String email = null; + private String email; @JsonProperty("password") - private String password = null; + private String password; @JsonProperty("phone") - private String phone = null; + private String phone; @JsonProperty("userStatus") - private Integer userStatus = null; + private Integer userStatus; public User id(Long id) { this.id = id; @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index ac562e64128..4ea161ebf22 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -173,6 +173,17 @@ public interface FakeApi { } + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) + @RequestMapping(value = "/fake", + method = RequestMethod.DELETE) + default ResponseEntity testGroupParameters(@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 15cad846649..73d1926afdd 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -40,7 +40,7 @@ public class AdditionalPropertiesClass { /** * Get mapProperty * @return mapProperty - **/ + */ @ApiModelProperty(value = "") @@ -68,7 +68,7 @@ public class AdditionalPropertiesClass { /** * Get mapOfMapProperty * @return mapOfMapProperty - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java index b9df0761fa2..f11373372b9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java @@ -35,7 +35,7 @@ public class Animal { /** * Get className * @return className - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -56,7 +56,7 @@ public class Animal { /** * Get color * @return color - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6834615c4cc..b435e834c8b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfArrayOfNumberOnly { /** * Get arrayArrayNumber * @return arrayArrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 480f0c5bb67..c9583813e8c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -36,7 +36,7 @@ public class ArrayOfNumberOnly { /** * Get arrayNumber * @return arrayNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java index 45c1df96c8e..a1e93f40627 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java @@ -44,7 +44,7 @@ public class ArrayTest { /** * Get arrayOfString * @return arrayOfString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class ArrayTest { /** * Get arrayArrayOfInteger * @return arrayArrayOfInteger - **/ + */ @ApiModelProperty(value = "") @Valid @@ -101,7 +101,7 @@ public class ArrayTest { /** * Get arrayArrayOfModel * @return arrayArrayOfModel - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java index cf8e0184c75..987bdb03dc5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java @@ -39,7 +39,7 @@ public class Capitalization { /** * Get smallCamel * @return smallCamel - **/ + */ @ApiModelProperty(value = "") @@ -59,7 +59,7 @@ public class Capitalization { /** * Get capitalCamel * @return capitalCamel - **/ + */ @ApiModelProperty(value = "") @@ -79,7 +79,7 @@ public class Capitalization { /** * Get smallSnake * @return smallSnake - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Capitalization { /** * Get capitalSnake * @return capitalSnake - **/ + */ @ApiModelProperty(value = "") @@ -119,7 +119,7 @@ public class Capitalization { /** * Get scAETHFlowPoints * @return scAETHFlowPoints - **/ + */ @ApiModelProperty(value = "") @@ -139,7 +139,7 @@ public class Capitalization { /** * Name of the pet * @return ATT_NAME - **/ + */ @ApiModelProperty(value = "Name of the pet ") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java index db751abc2d8..97c3302c72e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java @@ -25,7 +25,7 @@ public class Cat extends Animal { /** * Get declawed * @return declawed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index 540f07d205a..a09ed25bd4e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -27,7 +27,7 @@ public class Category { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Category { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java index 1a44b03b0bc..9c2dc39d81b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java @@ -25,7 +25,7 @@ public class ClassModel { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java index cf73d18603d..782a2dfa242 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java @@ -24,7 +24,7 @@ public class Client { /** * Get client * @return client - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java index 59f5507d573..f766c99aaaf 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java @@ -25,7 +25,7 @@ public class Dog extends Animal { /** * Get breed * @return breed - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java index 1bf86d35fa3..f2b794bde99 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java @@ -93,7 +93,7 @@ public class EnumArrays { /** * Get justSymbol * @return justSymbol - **/ + */ @ApiModelProperty(value = "") @@ -121,7 +121,7 @@ public class EnumArrays { /** * Get arrayEnum * @return arrayEnum - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java index dcb97236e4b..e6864fdc4b5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java @@ -166,7 +166,7 @@ public class EnumTest { /** * Get enumString * @return enumString - **/ + */ @ApiModelProperty(value = "") @@ -186,7 +186,7 @@ public class EnumTest { /** * Get enumStringRequired * @return enumStringRequired - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -207,7 +207,7 @@ public class EnumTest { /** * Get enumInteger * @return enumInteger - **/ + */ @ApiModelProperty(value = "") @@ -227,7 +227,7 @@ public class EnumTest { /** * Get enumNumber * @return enumNumber - **/ + */ @ApiModelProperty(value = "") @@ -247,7 +247,7 @@ public class EnumTest { /** * Get outerEnum * @return outerEnum - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 931b0dec01e..be3e2e1e86c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -30,7 +30,7 @@ public class FileSchemaTestClass { /** * Get file * @return file - **/ + */ @ApiModelProperty(value = "") @Valid @@ -59,7 +59,7 @@ public class FileSchemaTestClass { /** * Get files * @return files - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java index 6b1af9b08be..6e403c6b5ce 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java @@ -67,7 +67,7 @@ public class FormatTest { * minimum: 10 * maximum: 100 * @return integer - **/ + */ @ApiModelProperty(value = "") @Min(10) @Max(100) @@ -89,7 +89,7 @@ public class FormatTest { * minimum: 20 * maximum: 200 * @return int32 - **/ + */ @ApiModelProperty(value = "") @Min(20) @Max(200) @@ -109,7 +109,7 @@ public class FormatTest { /** * Get int64 * @return int64 - **/ + */ @ApiModelProperty(value = "") @@ -131,7 +131,7 @@ public class FormatTest { * minimum: 32.1 * maximum: 543.2 * @return number - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -155,7 +155,7 @@ public class FormatTest { * minimum: 54.3 * maximum: 987.6 * @return _float - **/ + */ @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") @@ -177,7 +177,7 @@ public class FormatTest { * minimum: 67.8 * maximum: 123.4 * @return _double - **/ + */ @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") @@ -197,7 +197,7 @@ public class FormatTest { /** * Get string * @return string - **/ + */ @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") @@ -217,7 +217,7 @@ public class FormatTest { /** * Get _byte * @return _byte - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -238,7 +238,7 @@ public class FormatTest { /** * Get binary * @return binary - **/ + */ @ApiModelProperty(value = "") @Valid @@ -259,7 +259,7 @@ public class FormatTest { /** * Get date * @return date - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -281,7 +281,7 @@ public class FormatTest { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -302,7 +302,7 @@ public class FormatTest { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -323,7 +323,7 @@ public class FormatTest { /** * Get password * @return password - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 1818546ce32..c68254f2c8e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -27,7 +27,7 @@ public class HasOnlyReadOnly { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class HasOnlyReadOnly { /** * Get foo * @return foo - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index 93a2b1e7b22..541bf0981ae 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -80,7 +80,7 @@ public class MapTest { /** * Get mapMapOfString * @return mapMapOfString - **/ + */ @ApiModelProperty(value = "") @Valid @@ -109,7 +109,7 @@ public class MapTest { /** * Get mapOfEnumString * @return mapOfEnumString - **/ + */ @ApiModelProperty(value = "") @@ -137,7 +137,7 @@ public class MapTest { /** * Get directMap * @return directMap - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class MapTest { /** * Get indirectMap * @return indirectMap - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5f1212179a3..4f8a86dec57 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get uuid * @return uuid - **/ + */ @ApiModelProperty(value = "") @Valid @@ -58,7 +58,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get dateTime * @return dateTime - **/ + */ @ApiModelProperty(value = "") @Valid @@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** * Get map * @return map - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java index 6a77de5e22a..98190d7ad19 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java @@ -28,7 +28,7 @@ public class Model200Response { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") @@ -48,7 +48,7 @@ public class Model200Response { /** * Get propertyClass * @return propertyClass - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index a05b204bece..8712360f7a7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { /** * Get code * @return code - **/ + */ @ApiModelProperty(value = "") @@ -50,7 +50,7 @@ public class ModelApiResponse { /** * Get type * @return type - **/ + */ @ApiModelProperty(value = "") @@ -70,7 +70,7 @@ public class ModelApiResponse { /** * Get message * @return message - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java index b21e712510d..a64ca866ed3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java @@ -25,7 +25,7 @@ public class ModelReturn { /** * Get _return * @return _return - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java index ba9701e1b7d..6c702dcf583 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java @@ -34,7 +34,7 @@ public class Name { /** * Get name * @return name - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -55,7 +55,7 @@ public class Name { /** * Get snakeCase * @return snakeCase - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -75,7 +75,7 @@ public class Name { /** * Get property * @return property - **/ + */ @ApiModelProperty(value = "") @@ -95,7 +95,7 @@ public class Name { /** * Get _123number * @return _123number - **/ + */ @ApiModelProperty(readOnly = true, value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java index 275529bafe1..2cc007cf602 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java @@ -25,7 +25,7 @@ public class NumberOnly { /** * Get justNumber * @return justNumber - **/ + */ @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index 0a09f15f309..33255a79815 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -74,7 +74,7 @@ public class Order { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -94,7 +94,7 @@ public class Order { /** * Get petId * @return petId - **/ + */ @ApiModelProperty(value = "") @@ -114,7 +114,7 @@ public class Order { /** * Get quantity * @return quantity - **/ + */ @ApiModelProperty(value = "") @@ -134,7 +134,7 @@ public class Order { /** * Get shipDate * @return shipDate - **/ + */ @ApiModelProperty(value = "") @Valid @@ -155,7 +155,7 @@ public class Order { /** * Order Status * @return status - **/ + */ @ApiModelProperty(value = "Order Status") @@ -175,7 +175,7 @@ public class Order { /** * Get complete * @return complete - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java index f522765ede1..d1e12b80ea9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java @@ -31,7 +31,7 @@ public class OuterComposite { /** * Get myNumber * @return myNumber - **/ + */ @ApiModelProperty(value = "") @Valid @@ -52,7 +52,7 @@ public class OuterComposite { /** * Get myString * @return myString - **/ + */ @ApiModelProperty(value = "") @@ -72,7 +72,7 @@ public class OuterComposite { /** * Get myBoolean * @return myBoolean - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index d3bca13a64b..5c0704400bb 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -79,7 +79,7 @@ public class Pet { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -99,7 +99,7 @@ public class Pet { /** * Get category * @return category - **/ + */ @ApiModelProperty(value = "") @Valid @@ -120,7 +120,7 @@ public class Pet { /** * Get name * @return name - **/ + */ @ApiModelProperty(example = "doggie", required = true, value = "") @NotNull @@ -146,7 +146,7 @@ public class Pet { /** * Get photoUrls * @return photoUrls - **/ + */ @ApiModelProperty(required = true, value = "") @NotNull @@ -175,7 +175,7 @@ public class Pet { /** * Get tags * @return tags - **/ + */ @ApiModelProperty(value = "") @Valid @@ -196,7 +196,7 @@ public class Pet { /** * pet status in the store * @return status - **/ + */ @ApiModelProperty(value = "pet status in the store") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f0c6b763e9f..8ce8467a8bd 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -27,7 +27,7 @@ public class ReadOnlyFirst { /** * Get bar * @return bar - **/ + */ @ApiModelProperty(readOnly = true, value = "") @@ -47,7 +47,7 @@ public class ReadOnlyFirst { /** * Get baz * @return baz - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java index 6b445cfa0d9..d2edd48e137 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java @@ -24,7 +24,7 @@ public class SpecialModelName { /** * Get $specialPropertyName * @return $specialPropertyName - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index d9a99a54704..bc9c1ed59dd 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -27,7 +27,7 @@ public class Tag { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -47,7 +47,7 @@ public class Tag { /** * Get name * @return name - **/ + */ @ApiModelProperty(value = "") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index d934073c84f..09a60b45d16 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -45,7 +45,7 @@ public class User { /** * Get id * @return id - **/ + */ @ApiModelProperty(value = "") @@ -65,7 +65,7 @@ public class User { /** * Get username * @return username - **/ + */ @ApiModelProperty(value = "") @@ -85,7 +85,7 @@ public class User { /** * Get firstName * @return firstName - **/ + */ @ApiModelProperty(value = "") @@ -105,7 +105,7 @@ public class User { /** * Get lastName * @return lastName - **/ + */ @ApiModelProperty(value = "") @@ -125,7 +125,7 @@ public class User { /** * Get email * @return email - **/ + */ @ApiModelProperty(value = "") @@ -145,7 +145,7 @@ public class User { /** * Get password * @return password - **/ + */ @ApiModelProperty(value = "") @@ -165,7 +165,7 @@ public class User { /** * Get phone * @return phone - **/ + */ @ApiModelProperty(value = "") @@ -185,7 +185,7 @@ public class User { /** * User Status * @return userStatus - **/ + */ @ApiModelProperty(value = "User Status") diff --git a/shippable.yml b/shippable.yml index a112f3bbf7b..85621905a47 100644 --- a/shippable.yml +++ b/shippable.yml @@ -1,7 +1,7 @@ language: java jdk: -- openjdk9 +- oraclejdk10 build: cache: true @@ -11,7 +11,7 @@ build: - $SHIPPABLE_REPO_DIR/samples/client/petstore/elixir/deps ci: - java -version - - mvn --quiet clean install + - mvn --quiet clean install -Dmaven.javadoc.skip=true # ensure all modifications created by 'mature' generators are in the git repo # below move to CircleCI ./bin/utils/ensure-up-to-date # prepare environment for tests